diff --git a/.gestalt/plans/advanced-data-visualization.org b/.gestalt/plans/advanced-data-visualization.org new file mode 100644 index 0000000..98ebcbd --- /dev/null +++ b/.gestalt/plans/advanced-data-visualization.org @@ -0,0 +1,278 @@ +#+TITLE: Advanced Data Visualization +#+SUBTITLE: Add Tablecloth and Tableplot charts to project and personnel views, with Clay as the exploration and verification workspace +#+DATE: 2026-06-09 +#+KEYWORDS: visualization tablecloth tableplot clay plotly projects personnel managers hours + +* DONE [#A] Establish the visualization architecture and dependency baseline +Effort: M +Goal: Introduce the requested Scicloj stack with a narrow boundary that does not rewrite spreadsheet ingestion or run Clay inside normal HTTP requests. +Notes: Challenge the direct idea of replacing `agiladmin.tabular` everywhere with Tablecloth. The existing table abstraction is small, tested, and used throughout old domain code. Keep it authoritative for current application behavior and convert to Tablecloth only at the visualization boundary. Use Tableplot's stable v1 Plotly API for production charts because it realizes a plain Plotly specification that Ring can embed. Use Clay for REPL exploration, chart prototyping, and generated review reports, not as request middleware or a second application server. At planning time the current artifacts were `scicloj/tablecloth` 8.021, `org.scicloj/tableplot` 1-beta17, and `org.scicloj/clay` 2.0.16; verify these again immediately before implementation and pin exact versions. + +** DONE [#A] Add pinned Scicloj dependencies with Clay isolated to development +Why: Tablecloth and Tableplot are needed by production chart-model code, while Clay has a broader report/notebook role and should not increase the normal runtime surface unless required. +Change: Update `deps.edn` as follows: +- add exact compatible versions of `scicloj/tablecloth` and `org.scicloj/tableplot` to `:deps`; +- add `org.scicloj/clay` under a dedicated `:viz` alias with `:extra-paths ["dev"]`; +- do not add `dataset-io`: Agiladmin already reads Excel through Docjure and only needs to convert its in-memory row maps; +- resolve the dependency tree before coding and check for version conflicts involving Clojure, Jackson, SLF4J, Apache POI, and `tech.ml.dataset`; +- keep existing application logging bindings authoritative and exclude/override only if dependency resolution proves it necessary. +Create `dev/agiladmin/visualization_notebook.clj` as a minimal Clay entry point that requires the same production chart-model functions used by the web views. Do not duplicate chart logic in the notebook. +Tests: Run `clj -Stree`, `clj -M:test`, and `clj -M:viz -e "(require 'agiladmin.visualization-notebook)"`. If the environment needs redirected Clojure config/cache paths, use the repository-approved writable locations. +Done when: Dependencies resolve without warnings that change the effective logging or POI stack, the existing full test suite passes, and the Clay namespace loads without starting a server during application startup. + +** DONE [#A] Add the local Plotly browser asset and initializer +Why: Tableplot's Plotly API produces Plotly specifications but a browser still needs Plotly.js. Agiladmin already serves frontend libraries locally and should not introduce a CDN dependency or inline chart scripts. +Change: Add the smallest browser dependency needed to package a pinned minified Plotly.js distribution locally. Prefer `plotly.js-dist-min` as a development dependency in `package.json`, then extend `scripts/sync-frontend-assets.mjs` to copy its browser file into `resources/public/static/js/plotly.min.js`. Preserve its license notice. Include the copied asset in `web/render-head` before `app.js`, using `web/asset-path` so configured base paths work. In `resources/public/static/js/app.js`, add a native initializer that: +- finds elements marked with `data-plotly-chart`; +- reads and parses the escaped JSON specification from a data attribute or adjacent safe JSON container; +- calls `Plotly.newPlot` with `spec.data`, `spec.layout`, and a small shared config (`responsive`, no vendor logo, accessible modebar choices); +- marks initialized elements to avoid duplicate rendering; +- runs on initial DOM load and `htmx:load`, because project details arrive as HTMX fragments; +- uses `Plotly.Plots.resize` on relevant tab activation or container resize so charts do not render at zero width in hidden tabs; +- leaves an accessible textual fallback in the chart container if JavaScript is disabled or parsing fails. +Do not add a frontend framework, bundler, or custom chart library. +Tests: Run `npm install`, `npm run build:frontend`, and focused `webpage` tests for the script path. Add a Playwright assertion that `window.Plotly` exists, one chart initializes, and an HTMX-loaded project chart has an SVG/canvas descendant. +Done when: Plotly is served locally under the configured base path, initializes both full-page and HTMX fragment charts, and existing frontend behavior remains intact. + +** DONE [#A] Create a single adapter and chart rendering boundary +Why: Domain and view namespaces should not know Tableplot internals, JSON embedding rules, or browser initialization details. +Change: Add `src/agiladmin/visualization.clj` with native doc-comments and three small responsibilities: +- `to-tablecloth`: convert an `agiladmin.tabular` dataset from `:rows` into `tc/dataset`, preserving keyword columns and returning an empty typed dataset for empty input; +- `realize-plot`: call `plotly/plot` on a Tableplot template and normalize the resulting map to JSON-safe values; +- `plotly-chart`: return Hiccup containing a titled responsive chart region, optional description, accessible fallback summary/table link, and the safely escaped realized specification consumed by `app.js`. +Keep chart IDs deterministic within a page and unique across repeated components. Put theme/layout defaults in one helper: transparent/base background, Nord-compatible colors, readable axes, horizontal legend where appropriate, responsive width, and margins that work on narrow screens. Never interpolate untrusted values into JavaScript source. Prefer Hiccup-escaped data attributes; if specifications are too large, use an `application/json` element with explicit escaping of `<`, `>`, `&`, U+2028, and U+2029. +Tests: Add `test/agiladmin/visualization_test.clj` for legacy-to-Tablecloth conversion, empty data, Plotly spec shape, safe serialization of strings containing quotes and ``, deterministic IDs, and fallback markup. Add the namespace to `test/agiladmin/test_runner.clj` if test discovery is explicit. +Done when: Views can render a chart by passing a realized chart model to one helper, no view emits inline plotting JavaScript, and hostile labels cannot break out of the serialized chart payload. + +* DONE [#A] Define reusable visualization data models from existing domain facts +Effort: L +Goal: Produce deterministic, testable chart datasets for monthly, annual, period, task, project, person, and planned-versus-actual interpretations. +Notes: Keep this as a vertical visualization slice, not a second domain model. The ubiquitous terms are `worked hours`, `voluntary hours`, `billable hours`, `person`, `project`, `task`, `month`, `year`, `period`, `planned hours`, and `actual hours`. Invariants: hours are non-negative; month order is chronological rather than lexical; missing months appear as zero where a timeline requires continuity; managers never receive cost fields; voluntary rows stay distinguishable on personnel charts but remain excluded from project hours according to the existing `load-project-monthly-hours` behavior. + +** DONE [#A] Normalize month and period dimensions +Why: Existing month values use both `YYYY-M` and `YYYY-MM`; lexical sorting would place months incorrectly and gaps would make trend charts misleading. +Change: In `agiladmin.visualization`, add pure helpers that parse existing month strings into: +- `:month-date` as a typed first-of-month date suitable for Tableplot; +- numeric `:year-number` and `:month-number`; +- display `:month-label`; +- `:quarter` (`Q1` through `Q4`); +- `:period` for configurable contiguous month groups, defaulting to quarters; +- a sortable month index. +Add `complete-months` for a selected year and `complete-project-months` for a project's observed or configured date range. Fill absent aggregates with zero only after grouping, not at raw-entry level. Invalid month strings should return a Failjure failure or explicit validation result consistent with the caller, never silently sort as text. +Tests: Add table-driven tests for one- and two-digit months, leap-year February labels, chronological ordering, quarter boundaries, missing-month completion, and invalid input. Include the fixture shape from `2016_timesheet_Luca-Pacioli.xlsx`. +Done when: Every chart model consumes one canonical chronological month representation and a January-to-December series always has exactly twelve ordered rows. + +** DONE [#A] Build personnel activity datasets +Why: Personnel pages currently repeat monthly cards and tables, which expose detail but make yearly patterns and concentrated periods difficult to see. +Change: Add pure functions that accept the existing personnel `hours` dataset and return Tablecloth datasets for: +- monthly total hours for all twelve months; +- monthly hours grouped by project, with absent combinations omitted and absent month totals represented as zero; +- monthly hours grouped into billable and voluntary categories, where tag `VOL` is voluntary and all other tags are worked/billable for visualization wording; +- project-by-month heatmap values; +- quarter/period totals and percentage of the selected year's total; +- yearly summary rows containing total hours, active months, average hours per active month, highest month, and longest consecutive active-month run. +Do not derive daily or week-of-month values. The spreadsheet contains daily cells, but current application data only retains monthly assignment totals; adding day-level activity belongs to a separate parser plan. +Tests: Use small synthetic datasets plus the 2016 Luca Pacioli expected rows. Assert total conservation: monthly totals, project stacks, billable/voluntary stacks, period totals, and yearly total must all sum to the same source hours. Assert that zero months remain visible and voluntary hours are not lost. +Done when: Personnel chart models explain both the shape through the year and concentrated periods without changing the existing monthly detail datasets. + +** DONE [#A] Build project manager datasets +Why: Managers need to understand when work happened, who performed it, which tasks consumed effort, and how actual effort compares with the configured plan. +Change: Add pure project chart-model functions for: +- monthly total hours across the complete observed project range; +- monthly hours grouped by task; +- monthly hours grouped by person; +- annual total hours; +- task actual hours versus configured task budget (`pm * 150`); +- task remaining hours, clamped only for display where needed while preserving negative overrun values in the model; +- cumulative actual project hours; +- cumulative planned hours derived conservatively from configured task `start_date`, `duration`, and `pm`. +For planned hours, use an explicit well-known linear allocation: distribute each task's `pm * 150` evenly over its configured duration months. Tasks missing start, duration, or PM must be excluded from the planned curve and reported in model metadata; do not invent dates or budgets. Treat an overrun as actual greater than planned/total and make it visible. For infra/rolling projects without task schedules, omit planned curves and retain monthly/annual/person totals. +Tests: Add fixtures covering multiple people and tasks, multiple years, empty months, a task overrun, tasks with incomplete configuration, and an infra/rolling project. Assert conservation between raw hours and every aggregation. Assert planned totals equal the sum of valid task budgets. +Done when: A manager-facing model can answer monthly trend, annual trend, composition, task budget usage, and cumulative actual-versus-plan without exposing cost data. + +** DONE [#B] Define chart specifications as pure functions +Why: Chart choices and encoding should be reviewable and testable without rendering an HTTP page or opening a browser. +Change: Add pure Tableplot functions returning realized Plotly specifications: +- `person-monthly-project-chart`: stacked monthly bars by project, ordered January to December, with total hours in hover text; +- `person-activity-heatmap`: projects on the y-axis, months on the x-axis, color representing hours; limit to the most active projects and combine the remainder as `Other` when the legend/axis would become unreadable; +- `person-period-chart`: quarter/period bars with hours and share of annual total; +- `project-monthly-task-chart`: stacked monthly bars by task, with a configurable fallback to person grouping when task values are blank or only one task exists; +- `project-annual-hours-chart`: annual bars for multi-year data, omitted when only one year exists; +- `project-task-budget-chart`: horizontal actual-versus-budget bars ordered by utilization, with overruns clearly marked; +- `project-cumulative-chart`: cumulative actual line against cumulative planned line, omitted when no valid planned series exists. +Use color to reinforce categories, not as the only carrier of meaning. Include explicit axis titles, hover templates, units, legend labels, and readable empty-state metadata. Do not use pie/donut charts, 3D charts, smoothing, or dual y-axes: they add interpretation cost without improving these comparisons. +Tests: Assert each realized spec has expected trace types, x/y values, grouping names, chronological order, units, layout titles, and no `:cost` values for manager models. Snapshot only small normalized spec fragments rather than whole generated maps, because Tableplot defaults may change. +Done when: Every approved chart has a pure constructor with focused tests and can be rendered in Clay from the same function used by Ring. + +* DONE [#A] Prototype and review chart semantics in Clay +Effort: M +Goal: Use Clay to evaluate the charts against real fixture data before placing them in production views. +Notes: Clay is the design and reporting adapter in this architecture. It should make assumptions visible and support reviewer discussion, while the production renderer continues to consume realized Plotly specs directly. Keep fixture data local and do not publish personnel data to external services. + +** DONE [#A] Build a reproducible visualization notebook +Why: Chart semantics are easier to challenge side by side with source tables, intermediate datasets, and explicit caveats than inside the final application page. +Change: Expand `dev/agiladmin/visualization_notebook.clj` into a Clay document that: +- loads `test/assets/2016_timesheet_Luca-Pacioli.xlsx` and project YAML through existing Agiladmin functions; +- displays the legacy raw dataset, normalized Tablecloth dataset, each personnel chart, and representative project charts; +- states the monthly-only granularity limitation; +- shows aggregation checks and omitted-plan metadata; +- includes narrow and wide rendering variants; +- contains no production credentials, budgets paths, or user data outside test fixtures. +Add a `:viz` command or documented `clj -M:viz -m ...` entry that writes a static report under a gitignored `target/visualization/` directory. Do not commit generated HTML unless explicitly requested. +Tests: Run the Clay generation command and inspect that the report contains the expected headings, source tables, and charts without evaluation errors. +Done when: A reviewer can regenerate one local HTML report and compare every proposed chart against fixture data and its source totals. + +** DONE [#A] Record visualization acceptance criteria from the prototype +Why: Attractive output is not enough; each graph must answer a concrete management or personnel question and remain legible with realistic category counts. +Change: In the Clay notebook and implementation notes, evaluate each chart against these questions: +- Project manager: In which months and years was effort spent? Which tasks and people drove it? Is effort ahead of or behind the configured plan? Which tasks are near or beyond budget? +- Personnel: How did activity vary through the selected year? Which projects dominated each period? Where are inactive or unusually concentrated months? How much activity was voluntary when that setting is enabled? +Test stress cases with 1, 5, 12, and more than 12 projects/tasks; one month versus twelve months; blank task IDs; missing plan data; and an overrun. Choose deterministic category reduction rules, default chart heights, and legend placement from those results. Update the pure chart tests with the accepted rules. +Tests: Regenerate the Clay report after stress fixtures are added. No browser E2E is required in this L2 unless production code changes. +Done when: Each chart has a written question, omission rule, category limit, empty state, and accepted narrow-screen behavior. + +* DONE [#A] Add manager-focused charts to project views without replacing detail tables +Effort: L +Goal: Put high-level interpretation above existing detailed project tables while preserving manager authorization and HTMX behavior. +Notes: Follow REPR within the existing route: request handling remains in `view-project/start`, chart preparation belongs to project visualization functions, and the response remains Hiccup/full-page or fragment through `render-project-response`. This is one project-detail use-case slice. Managers can see hours but never costs; admins may retain current cost tables, but the first chart set should be hour-based and identical for both roles. + +** DONE [#A] Add the H2020 project overview charts +Why: The current H2020 page leads with totals, Gantt, and tables but does not reveal effort over time or actual-versus-plan at a glance. +Change: In `src/agiladmin/view_project.clj`, prepare chart models once from `project-hours`, `task-details`, and project configuration. Add a `Project activity` section above the detailed tabs containing: +- cumulative actual versus planned hours when valid plan data exists; +- stacked monthly hours by task, or by person according to the deterministic fallback rule; +- horizontal task actual-versus-budget utilization. +Keep the Gantt JS island unchanged. Keep all existing tables authoritative beneath the charts. Include concise explanatory text and accessible fallback summaries. Do not calculate or serialize costs for managers. Avoid recomputing project hours or task details per chart. +Tests: Extend `view_project_test.clj` to assert chart containers and meaningful headings for managers/admins, omission of plan chart with incomplete configuration, absence of cost values in manager chart payloads, and retention of existing tables/edit rules. Run visualization, project view, session, and handler tests. +Done when: An HTMX-loaded H2020 project displays the approved overview charts before details, existing tables still render, and manager HTML contains no cost data. + +** DONE [#A] Add monthly and annual charts to infra and rolling project views +Why: These project types currently show only yearly and personnel tables, even though the source rows can reveal monthly seasonality and multi-year change. +Change: Refactor only enough duplicated `infra`/`rolling` rendering to share one small fixed-cost project overview helper. Add: +- monthly total hours, grouped by person when useful; +- annual total hours when the data spans more than one year; +- the existing yearly and personnel detail tables directly below the charts. +Do not add task budget or planned curves where schedules/tasks are absent. Preserve role-based cost columns in tables exactly as today; charts remain hours-only for consistent manager interpretation. +Tests: Add view tests for single-year omission of the annual chart, multi-year annual chart inclusion, manager cost exclusion, and empty data. Run project and visualization tests. +Done when: Infra and rolling views provide time-based interpretation without pretending to have task-plan data. + +** DONE [#B] Verify responsive and HTMX project rendering in the browser +Why: Plotly charts can initialize incorrectly in hidden tabs or newly swapped fragments even when server-side tests pass. +Change: Extend Playwright project coverage to log in as manager, select a project through the existing HTMX list, and verify: +- chart containers become initialized; +- at least one chart has rendered graphical content; +- no browser console errors occur; +- resize to a narrow viewport preserves readable horizontal scrolling/responsiveness; +- existing detail tabs and tables remain usable; +- no cost labels or amounts appear for the manager. +Use fixture/harness data with enough months and tasks to exercise the charts. Do not assert exact SVG paths or pixel output. +Tests: Run the focused project Playwright spec, then `npm run test:e2e`. +Done when: Manager project charts render after HTMX swaps at desktop and narrow widths with no console errors or authorization regression. + +* DONE [#A] Add activity interpretation charts to personnel views +Effort: L +Goal: Make yearly personnel activity understandable before the reader enters month-by-month detail cards. +Notes: Use one personnel visualization slice shared by admin, manager, and regular own-person views. Chart content must follow capabilities and configuration: all roles can see their own hours; only admins may continue to see monetary tables; voluntary hours are shown as a separate visual category only when `:voluntary-hours` is enabled. Keep the selected year as the route's scope and do not silently load every historical timesheet in the first implementation. + +** DONE [#A] Add the shared yearly personnel activity section +Why: Both manager and admin variants repeat the same month cards, and both benefit from one consistent hours-first interpretation layer. +Change: Add a private `person-activity-section` in `src/agiladmin/view_person.clj` or a small dedicated `view_person_activity.clj` slice if the existing namespace becomes harder to read. It receives config, person, year, and the already-loaded `hours` dataset and renders: +- stacked monthly hours by project for all twelve months; +- project-by-month heatmap when at least two active projects and two active months exist; +- quarter/period totals; +- compact summary facts: total hours, active months, monthly average, peak month, and longest active run. +Place this section after yearly totals and before monthly detail cards in both `list-person-manager` and the admin branch of `list-person`. Reuse one computed chart model; do not rerun workbook parsing or cost derivation. Keep monthly detail tables unchanged. +Tests: Extend `view_person_test.clj` for chart presence, January-to-December payload ordering, zero-month inclusion, shared rendering for manager/admin, existing download/upload controls, and no extra cost derivation. Run personnel, visualization, graphics, and handler tests. +Done when: Every authorized personnel page shows the same hours-based yearly activity overview above the detailed month cards. + +** DONE [#A] Apply voluntary and cost visibility rules to personnel charts +Why: The chart layer must not bypass the existing capability and configuration boundaries. +Change: When `:voluntary-hours` is true and voluntary rows exist, distinguish voluntary hours in hover/fallback summaries and optionally add the accepted billable-versus-voluntary chart from the Clay review. When false, do not label or expose voluntary categories separately, matching current page wording. Keep cost charts out of the initial personnel visualization scope: costs are already available in detailed admin tables, while the requested interpretation focuses on activity and hours. Confirm that manager and regular-user serialized chart specs contain only hour/category/date fields. +Tests: Add positive and negative voluntary-setting tests, manager payload scans for cost-related fields, and conservation assertions showing hidden labeling does not change total hours. +Done when: Visualization output follows the same voluntary-hours and cost-visibility policy as the surrounding page. + +** DONE [#B] Verify personnel charts and details in the browser +Why: The yearly overview adds significant responsive content above a long list of monthly cards and must remain usable on narrow screens. +Change: Extend Playwright personnel coverage to verify a manager/regular own-person page and an admin page: +- charts initialize without console errors; +- the 12-month axis and accessible fallback/description exist; +- monthly detail cards and project links still work; +- voluntary labeling follows the generated config; +- charts resize at mobile width and do not obscure upload/download controls. +Do not depend on exact Plotly-generated DOM structure beyond a stable initialized marker and graphical child. +Tests: Run the focused personnel Playwright spec and then `npm run test:e2e`. +Done when: Personnel charts render for each relevant role at desktop and mobile widths without breaking existing detail interactions. + +* DONE [#B] Add performance, empty-state, and operational safeguards +Effort: M +Goal: Ensure richer views remain predictable with large budgets repositories and incomplete data. +Notes: The charts are derived from data already loaded by each page. Do not introduce background jobs, databases, or a new cache unless measurement proves it necessary. Prefer omission plus explanation over malformed empty charts. + +** DONE [#B] Add explicit chart eligibility and empty states +Why: Plotting one point, no categories, or incomplete plan data often creates more confusion than a short explanation. +Change: Centralize eligibility predicates and return chart model metadata such as `:status`, `:reason`, and `:omitted-rows`. Required rules: +- no hours: show one compact `No recorded hours for this period` state and retain detail tables; +- one active month: show a simple bar, not a misleading trend line; +- one year: omit the annual comparison chart; +- no valid task budgets: omit budget/progress charts and explain that task PM/date configuration is incomplete; +- too many categories: apply the accepted deterministic top-N plus `Other` aggregation; +- all-zero voluntary series: omit that category. +Log invalid source dates/configuration once at warning level with project context, without logging personnel costs or full datasets. +Tests: Add model and view tests for each rule and confirm no exception is thrown for empty Tablecloth datasets. +Done when: Every chart location has a deterministic useful output or a concise reason for omission. + +** DONE [#B] Measure and bound request-time work +Why: Tableplot realization and JSON serialization add CPU and response size, especially when many people, tasks, or months are present. +Change: Add lightweight development measurements in the Clay notebook or a test helper for: +- conversion and aggregation time; +- plot realization time; +- serialized bytes per chart and per page. +Use realistic synthetic upper bounds based on repository data (for example 10 years, 50 people, 50 tasks) and confirm category reduction occurs before serialization. Reuse chart models within each request. Only if measurements show a meaningful problem, add an in-memory chart-spec cache keyed by budgets path, entity, selected year/project, role capability set, and source-data cache generation; invalidate it alongside existing reload/timesheet cache invalidation. Do not cache by default merely because charts exist. +Tests: Add a non-flaky size assertion or benchmark note, not a strict timing test in CI. If a cache is introduced, add invalidation and role-isolation tests. +Done when: Typical pages have bounded chart payloads, no repeated workbook loads or repeated model construction, and any cache is justified by recorded measurements. + +* DONE [#A] Complete regression coverage, documentation, and reviewer evidence +Effort: M +Goal: Finish with reproducible tests, maintainable conventions, and a clear record of what the graphs can and cannot claim. +Notes: Follow the repository plan workflow during implementation: create branch `advanced-data-visualization`, run the baseline suite before edits, execute L1/L2 in order, run touched tests per code-changing L2, and create one conventional commit for every changed L2 before marking it DONE. + +** DONE [#A] Run focused and full verification +Why: The change crosses dependency resolution, server-side data preparation, HTML serialization, local assets, HTMX swaps, and browser rendering. +Change: After all focused tests pass: +- run `clj -M:test`; +- run `npm run build:frontend`; +- run `npm run test:e2e`; +- run `npm run test:e2e:base-path` to prove Plotly assets work below a public prefix; +- regenerate the Clay fixture report; +- inspect browser console output for chart errors; +- use `rg` to confirm no CDN URL, inline `Plotly.newPlot`, or cost field was added to manager chart code. +Record any environment-only failure with the exact command and error; do not declare completion after code edits alone. +Tests: The commands above are the tests. +Done when: Full Clojure and browser suites pass, frontend assets build, base-path rendering works, and the Clay report regenerates. + +** DONE [#A] Document visualization ownership and data limitations +Why: Future agents need to know where chart models belong and must not infer daily precision from monthly totals. +Change: Update `AGENTS.md` with a concise LLM-oriented section stating: +- legacy `agiladmin.tabular` remains the domain/application table format; +- `agiladmin.visualization` adapts to Tablecloth and owns Tableplot specifications; +- Clay is for local exploration/review, not request handling; +- Plotly.js is a local frontend asset initialized by `app.js`, including after `htmx:load`; +- chart models must obey role capabilities and preserve detail tables; +- available application facts are monthly assignment totals, not daily activity. +Update `README.md` with dependency/setup commands, how to regenerate the Clay visualization report, and a short description of project/personnel graphs. Mention that `npm install`/frontend build now also synchronizes Plotly. +Tests: Verify all documented commands against the implemented aliases and scripts. +Done when: A maintainer can locate chart data preparation, production rendering, Clay prototypes, and the monthly-granularity boundary without reverse engineering the implementation. + +** DONE [#A] Produce the reviewer summary and evidence +Why: Reviewers need a concise mapping from business questions to charts, data sources, permissions, and verification. +Change: End implementation with a brief reviewer summary covering: +- dependencies and why Clay is development-only; +- project charts added for H2020, infra, and rolling projects; +- personnel charts and voluntary-hours behavior; +- retained detail tables and unchanged Gantt island; +- manager cost-exclusion evidence; +- monthly-only limitation and deferred daily parser work; +- test, E2E, base-path, and Clay report results; +- payload/performance observations and whether caching was needed. +Tests: No new test. Cross-check the summary against commits and actual command results. +Done when: The final review note is factual, concise, and identifies any remaining limitation without suggesting that unimplemented daily data exists. diff --git a/.gitignore b/.gitignore index 8463e0e..a7c93c2 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,8 @@ dev-resources .nrepl-port .gorilla-port .cpcache +.clj-config/ +.gestalt test/assets/Budget_uno.xlsx test/assets/Budget_due.xlsx test/assets/Budget_tre.xlsx diff --git a/AGENTS.md b/AGENTS.md index 8006ca5..9510863 100755 --- a/AGENTS.md +++ b/AGENTS.md @@ -109,6 +109,15 @@ - Project and task identifiers are normalized to uppercase in several paths. Preserve that behavior when changing import or matching logic. - The codebase is old and not aggressively refactored. Prefer targeted fixes over stylistic rewrites. +## Visualization Ownership +- `agiladmin.tabular` remains the domain and application table format. +- `src/agiladmin/visualization.clj` is the adapter to Tablecloth and owns all production Tableplot/Plotly specifications. +- Clay is limited to local exploration and reviewer reports under the `:viz` alias; never invoke it during HTTP request handling. +- Plotly.js is a local frontend asset initialized by `resources/public/static/js/app.js` on page load and `htmx:load`. +- Chart models must follow the same role and configuration capabilities as their surrounding views. Manager payloads are hours-only. +- Keep existing detail tables authoritative beneath charts and leave the DHTMLX Gantt island unchanged. +- Available activity facts are monthly assignment totals. Do not infer daily, weekly, or within-month activity without a separate parser change. + ## High-Risk Areas - `src/agiladmin/core.clj` - spreadsheet parsing is position-based and depends on hard-coded row/column coordinates. diff --git a/README.md b/README.md index f02a151..b6d9189 100644 --- a/README.md +++ b/README.md @@ -306,6 +306,33 @@ Notes: - [pb_migrations/](/home/jrml/devel/agiladmin/pb_migrations): PocketBase schema migrations kept for future schema changes - [test/agiladmin/](/home/jrml/devel/planb-agiladmin/test/agiladmin): Midje test suite +## Data Visualizations + +Project pages add hours-only monthly, annual, task-budget, and cumulative +plan-versus-actual charts where the available project data supports them. +Personnel pages add a twelve-month project mix, quarter totals, a project +heatmap when enough activity exists, and compact yearly summary facts. Existing +tables remain the detailed and authoritative view. + +The production visualization boundary is `agiladmin.visualization`. It converts +the existing tabular rows to Tablecloth and builds Tableplot/Plotly +specifications. Plotly.js is served locally and synchronized with the other +frontend assets: + +```sh +npm install +npm run build:frontend +``` + +Clay is development-only. Regenerate the fixture-based review report with: + +```sh +clj -M:viz -m agiladmin.visualization-notebook +``` + +The report is written to `target/visualization/`. Charts use monthly assignment +totals retained by the application; they do not imply daily or weekly precision. + ## Operational Notes - Timesheet upload and commit logic writes temporary files under `/tmp/...` diff --git a/deps.edn b/deps.edn index 084c0bb..82b1c57 100644 --- a/deps.edn +++ b/deps.edn @@ -26,8 +26,12 @@ clj-jgit/clj-jgit {:mvn/version "0.9.1-SNAPSHOT"} me.raynes/fs {:mvn/version "1.4.6"} org.clojars.dyne/clj-openssh-keygen {:mvn/version "0.1.0"} - clj-time/clj-time {:mvn/version "0.15.1"}} + clj-time/clj-time {:mvn/version "0.15.1"} + scicloj/tablecloth {:mvn/version "8.021"} + org.scicloj/tableplot {:mvn/version "1-beta17"}} :aliases {:dev {:extra-deps {nrepl/nrepl {:mvn/version "1.3.1"}}} + :viz {:extra-paths ["dev"] + :extra-deps {org.scicloj/clay {:mvn/version "2.0.16"}}} :build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.10"}} :ns-default build} :run {:main-opts ["-m" "agiladmin.main"]} diff --git a/dev/agiladmin/visualization_notebook.clj b/dev/agiladmin/visualization_notebook.clj new file mode 100644 index 0000000..dc61ac5 --- /dev/null +++ b/dev/agiladmin/visualization_notebook.clj @@ -0,0 +1,100 @@ +(ns agiladmin.visualization-notebook + (:require + [agiladmin.tabular :as tab] + [agiladmin.visualization :as viz] + [scicloj.clay.v2.api :as clay] + [scicloj.kindly.v4.kind :as kind])) + +(kind/md + "# Agiladmin visualization review + +This fixture-only report reviews the production chart specifications. Agiladmin +currently retains monthly assignment totals, so these charts must not be read as +daily or weekly activity." + ) + +(def sample-hours + "Representative fixture data including voluntary work and inactive months." + (tab/dataset + [:month :name :project :task :tag :hours] + [{:month "2026-1" :name "Ada" :project "CORE" :task "T1" :tag "" :hours 10} + {:month "2026-2" :name "Ada" :project "CORE" :task "T1" :tag "" :hours 5} + {:month "2026-2" :name "Ada" :project "ALPHA" :task "T2" :tag "" :hours 3} + {:month "2026-4" :name "Ada" :project "ALPHA" :task "T2" :tag "VOL" :hours 4}])) + +(def sample-tasks + "Representative planned task data, including an overrun." + (tab/dataset + [:task :description :start :duration :pm :hours] + [{:task "T1" :description "Coordination" :start "01-01-2026" :duration 3 :pm 0.1 :hours 20} + {:task "T2" :description "Delivery" :start "01-02-2026" :duration 3 :pm 0.2 :hours 7}])) + +(kind/md + "## Source and normalization + +The legacy tabular dataset remains authoritative. The visualization boundary +converts its row maps to Tablecloth without changing spreadsheet ingestion." + ) + +sample-hours +(viz/to-tablecloth sample-hours) + +(kind/md + "## Personnel questions + +- Monthly project mix: how did activity vary through the year? +- Heatmap: which projects dominated each period? +- Quarter totals: where was work concentrated? + +The heatmap keeps the eight most active projects and combines the rest as +`Other`. It is omitted unless two projects and two months are active." + ) + +(viz/person-monthly-project-chart-spec sample-hours 2026) +(viz/person-activity-heatmap-spec sample-hours 2026) +(viz/person-period-chart-spec sample-hours 2026) + +(kind/md + "## Project manager questions + +- Monthly composition: which tasks drove effort? +- Cumulative comparison: is actual effort ahead of the configured linear plan? +- Task budget: which tasks are near or beyond their PM-derived budget? + +Planned curves omit tasks with incomplete start, duration, or PM data. Costs are +not part of any chart model." + ) + +(viz/project-monthly-task-chart-spec sample-hours 2026) +(viz/project-cumulative-chart-spec sample-hours sample-tasks) +(viz/project-task-budget-chart-spec sample-tasks) + +(defn payload-measurements + "Return stable payload size observations for the review report." + [] + (let [specs [(viz/person-monthly-project-chart-spec sample-hours 2026) + (viz/person-activity-heatmap-spec sample-hours 2026) + (viz/person-period-chart-spec sample-hours 2026)]] + {:charts (count specs) + :serialized-bytes (mapv #(count (.getBytes (viz/safe-json %) "UTF-8")) specs) + :total-hours (tab/sum-col sample-hours :hours)})) + +(kind/md + "## Checks and operational decision + +Totals are conserved across the source and aggregations. Specifications are +created once per request and category reduction happens before JSON +serialization. These fixture payloads are small, so no chart cache is justified." + ) + +(payload-measurements) + +(defn -main + "Generate the static Clay visualization review under target/visualization." + [& _] + (clay/make! {:source-path "dev/agiladmin/visualization_notebook.clj" + :base-target-path "target/visualization" + :format [:html] + :show false + :browse false + :live-reload false})) diff --git a/package-lock.json b/package-lock.json index 1d2be6f..4f14185 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "conventional-changelog-conventionalcommits": "^8.0.0", "daisyui": "^4.12.24", "htmx.org": "^2.0.4", + "plotly.js-dist-min": "^3.1.0", "semantic-release": "^24.2.9", "tailwindcss": "^3.4.17" } @@ -5620,6 +5621,13 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/plotly.js-dist-min": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/plotly.js-dist-min/-/plotly.js-dist-min-3.6.0.tgz", + "integrity": "sha512-VR9jO2YdcEwbzVwtRyPE0eAieXFv1x5q6M9nnIgUS8FggahPrjiID6kzpnTYABwLX0gZkgEc0zxS6gQgVmgHzw==", + "dev": true, + "license": "MIT" + }, "node_modules/postcss": { "version": "8.5.8", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz", diff --git a/package.json b/package.json index be27478..0829e31 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "sync:htmx": "node ./scripts/sync-frontend-assets.mjs", "build:frontend": "npm run sync:htmx && npm run build:css", "test:e2e": "node ./scripts/e2e/run-playwright.mjs", - "test:e2e:base-path": "E2E_BASE_PATH=/agiladmin node ./scripts/e2e/run-playwright.mjs test/e2e/base-path.spec.js", + "test:e2e:base-path": "node ./scripts/e2e/run-base-path.mjs", "test:e2e:caddy": "E2E_PROXY=caddy node ./scripts/e2e/run-playwright.mjs test/e2e/personnel-visibility.spec.js test/e2e/timesheet-upload.spec.js", "test:e2e:caddy:base-path": "E2E_PROXY=caddy E2E_BASE_PATH=/agiladmin node ./scripts/e2e/run-playwright.mjs test/e2e/base-path.spec.js test/e2e/timesheet-upload.spec.js", "test:e2e:headed": "node ./scripts/e2e/run-playwright.mjs --headed", @@ -21,6 +21,7 @@ "conventional-changelog-conventionalcommits": "^8.0.0", "daisyui": "^4.12.24", "htmx.org": "^2.0.4", + "plotly.js-dist-min": "^3.1.0", "semantic-release": "^24.2.9", "tailwindcss": "^3.4.17" } diff --git a/playwright.config.mjs b/playwright.config.mjs index 986f20e..784e97c 100644 --- a/playwright.config.mjs +++ b/playwright.config.mjs @@ -2,6 +2,7 @@ import { defineConfig } from "@playwright/test"; export default defineConfig({ testDir: "./test/e2e", + workers: 1, retries: process.env.CI ? 1 : 0, use: { baseURL: process.env.PLAYWRIGHT_BASE_URL || "http://127.0.0.1:18080", diff --git a/resources/public/static/css/app.css b/resources/public/static/css/app.css index 3e0eb30..c334ded 100644 --- a/resources/public/static/css/app.css +++ b/resources/public/static/css/app.css @@ -1,5 +1,5 @@ -*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root,[data-theme]{background-color:var(--fallback-b1,oklch(var(--b1)/1));color:var(--fallback-bc,oklch(var(--bc)/1))}@supports not (color:oklch(0% 0 0)){:root{color-scheme:light;--fallback-p:#491eff;--fallback-pc:#d4dbff;--fallback-s:#ff41c7;--fallback-sc:#fff9fc;--fallback-a:#00cfbd;--fallback-ac:#00100d;--fallback-n:#2b3440;--fallback-nc:#d7dde4;--fallback-b1:#fff;--fallback-b2:#e5e6e6;--fallback-b3:#e5e6e6;--fallback-bc:#1f2937;--fallback-in:#00b3f0;--fallback-inc:#000;--fallback-su:#00ca92;--fallback-suc:#000;--fallback-wa:#ffc22d;--fallback-wac:#000;--fallback-er:#ff6f70;--fallback-erc:#000}@media (prefers-color-scheme:dark){:root{color-scheme:dark;--fallback-p:#7582ff;--fallback-pc:#050617;--fallback-s:#ff71cf;--fallback-sc:#190211;--fallback-a:#00c7b5;--fallback-ac:#000e0c;--fallback-n:#2a323c;--fallback-nc:#a6adbb;--fallback-b1:#1d232a;--fallback-b2:#191e24;--fallback-b3:#15191e;--fallback-bc:#a6adbb;--fallback-in:#00b3f0;--fallback-inc:#000;--fallback-su:#00ca92;--fallback-suc:#000;--fallback-wa:#ffc22d;--fallback-wac:#000;--fallback-er:#ff6f70;--fallback-erc:#000}}}html{-webkit-tap-highlight-color:transparent}*{scrollbar-color:color-mix(in oklch,currentColor 35%,transparent) transparent}:hover{scrollbar-color:color-mix(in oklch,currentColor 60%,transparent) transparent}:root,[data-theme=nord]{color-scheme:light;--pc:11.8872% 0.015449 254.027774;--sc:13.9303% 0.011822 248.687186;--ac:15.4929% 0.01245 217.469017;--inc:13.8414% 0.012499 332.664922;--suc:15.3654% 0.01498 131.063061;--wac:17.0972% 0.017847 84.093335;--erc:12.122% 0.024119 15.341883;--animation-btn:0.25s;--animation-input:.2s;--btn-focus-scale:0.95;--border-btn:1px;--tab-border:1px;--p:59.4359% 0.077246 254.027774;--s:69.6516% 0.059108 248.687186;--a:77.4643% 0.062249 217.469017;--n:45.229% 0.035214 264.1312;--nc:89.9258% 0.016374 262.749256;--b1:95.1276% 0.007445 260.731539;--b2:93.2996% 0.010389 261.788485;--b3:89.9258% 0.016374 262.749256;--bc:32.4374% 0.022945 264.182036;--in:69.2072% 0.062496 332.664922;--su:76.827% 0.074899 131.063061;--wa:85.4862% 0.089234 84.093335;--er:60.61% 0.120594 15.341883;--rounded-box:0.4rem;--rounded-btn:0.2rem;--rounded-badge:0.4rem;--tab-radius:0.2rem}[data-theme=dim]{color-scheme:dark;--pc:17.2267% 0.028331 139.549991;--sc:14.6752% 0.033181 35.353059;--ac:14.8459% 0.026728 311.37924;--inc:17.2157% 0.028409 206.182959;--suc:17.2343% 0.028437 166.534048;--wac:17.2327% 0.028447 94.818679;--erc:16.4838% 0.019914 33.756357;--rounded-box:1rem;--rounded-btn:0.5rem;--rounded-badge:1.9rem;--animation-btn:0.25s;--animation-input:.2s;--btn-focus-scale:0.95;--border-btn:1px;--tab-border:1px;--tab-radius:0.5rem;--p:86.1335% 0.141656 139.549991;--s:73.3759% 0.165904 35.353059;--a:74.2296% 0.133641 311.37924;--n:24.7311% 0.020483 264.094728;--nc:82.9011% 0.031335 222.959324;--b1:30.8577% 0.023243 264.149498;--b2:28.0368% 0.01983 264.182074;--b3:26.3469% 0.018403 262.177739;--bc:82.9011% 0.031335 222.959324;--in:86.0785% 0.142046 206.182959;--su:86.1717% 0.142187 166.534048;--wa:86.1634% 0.142236 94.818679;--er:82.4189% 0.09957 33.756357}body{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}h1{font-size:1.875rem;line-height:2.25rem;font-weight:600}@media (min-width:768px){h1{font-size:2.25rem;line-height:2.5rem}}h2{font-size:1.5rem;line-height:2rem}h2,h3{font-weight:600}h3{font-size:1.25rem;line-height:1.75rem}pre{overflow-x:auto;white-space:pre-wrap;border-radius:var(--rounded-box,1rem);border-width:1px;--tw-border-opacity:1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity,1)));--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity,1)));padding:1rem;font-size:.875rem;line-height:1.25rem}code{white-space:pre-wrap}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.alert{display:grid;width:100%;grid-auto-flow:row;align-content:flex-start;align-items:center;justify-items:center;gap:1rem;text-align:center;border-radius:var(--rounded-box,1rem);border-width:1px;--tw-border-opacity:1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));padding:1rem;--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--alert-bg:var(--fallback-b2,oklch(var(--b2)/1));--alert-bg-mix:var(--fallback-b1,oklch(var(--b1)/1));background-color:var(--alert-bg)}@media (min-width:640px){.alert{grid-auto-flow:column;grid-template-columns:auto minmax(auto,1fr);justify-items:start;text-align:start}}.avatar.placeholder>div{display:flex;align-items:center;justify-content:center}@media (hover:hover){.label a:hover{--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.menu li>:not(ul,.menu-title,details,.btn).active,.menu li>:not(ul,.menu-title,details,.btn):active,.menu li>details>summary:active{--tw-bg-opacity:1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.tab:hover{--tw-text-opacity:1}.tabs-boxed :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):hover,.tabs-boxed :is(input:checked):hover{--tw-text-opacity:1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.table tr.hover:hover,.table tr.hover:nth-child(2n):hover{--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.hover:hover,.table-zebra tr.hover:nth-child(2n):hover{--tw-bg-opacity:1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}}.btn{display:inline-flex;height:3rem;min-height:3rem;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;border-radius:var(--rounded-btn,.5rem);border-color:transparent;border-color:oklch(var(--btn-color,var(--b2))/var(--tw-border-opacity));padding-left:1rem;padding-right:1rem;text-align:center;font-size:.875rem;line-height:1em;gap:.5rem;font-weight:600;text-decoration-line:none;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);border-width:var(--border-btn,1px);transition-property:color,background-color,border-color,opacity,box-shadow,transform;--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);outline-color:var(--fallback-bc,oklch(var(--bc)/1));background-color:oklch(var(--btn-color,var(--b2))/var(--tw-bg-opacity));--tw-bg-opacity:1;--tw-border-opacity:1}.btn-disabled,.btn:disabled,.btn[disabled]{pointer-events:none}.btn-circle,.btn-square{height:3rem;width:3rem;padding:0}.btn-circle{border-radius:9999px}:where(.btn:is(input[type=checkbox])),:where(.btn:is(input[type=radio])){width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none}.btn:is(input[type=checkbox]):after,.btn:is(input[type=radio]):after{--tw-content:attr(aria-label);content:var(--tw-content)}.card{position:relative;display:flex;flex-direction:column;border-radius:var(--rounded-box,1rem)}.card:focus{outline:2px solid transparent;outline-offset:2px}.card-body{display:flex;flex:1 1 auto;flex-direction:column;padding:var(--padding-card,2rem);gap:.5rem}.card-body :where(p){flex-grow:1}.card-actions{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.5rem}.card figure{display:flex;align-items:center;justify-content:center}.card.image-full{display:grid}.card.image-full:before{position:relative;content:"";z-index:10;border-radius:var(--rounded-box,1rem);--tw-bg-opacity:1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));opacity:.75}.card.image-full:before,.card.image-full>*{grid-column-start:1;grid-row-start:1}.card.image-full>figure img{height:100%;-o-object-fit:cover;object-fit:cover}.card.image-full>.card-body{position:relative;z-index:20;--tw-text-opacity:1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.carousel{display:inline-flex;overflow-x:scroll;scroll-snap-type:x mandatory;scroll-behavior:smooth;-ms-overflow-style:none;scrollbar-width:none}.checkbox{flex-shrink:0;--chkbg:var(--fallback-bc,oklch(var(--bc)/1));--chkfg:var(--fallback-b1,oklch(var(--b1)/1));height:1.5rem;width:1.5rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-btn,.5rem);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity:0.2}.collapse:not(td):not(tr):not(colgroup){visibility:visible}.collapse{position:relative;display:grid;overflow:hidden;grid-template-rows:max-content 0fr;transition:grid-template-rows .2s;width:100%;border-radius:var(--rounded-box,1rem)}.collapse-content,.collapse-title,.collapse>input[type=checkbox],.collapse>input[type=radio]{grid-column-start:1;grid-row-start:1}.collapse>input[type=checkbox],.collapse>input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}:where(.collapse>input[type=checkbox]),:where(.collapse>input[type=radio]){height:100%;width:100%;z-index:1}.collapse-open,.collapse:focus:not(.collapse-close),.collapse[open]{grid-template-rows:max-content 1fr}.collapse:not(.collapse-close):has(>input[type=checkbox]:checked),.collapse:not(.collapse-close):has(>input[type=radio]:checked){grid-template-rows:max-content 1fr}.collapse-open>.collapse-content,.collapse:focus:not(.collapse-close)>.collapse-content,.collapse:not(.collapse-close)>input[type=checkbox]:checked~.collapse-content,.collapse:not(.collapse-close)>input[type=radio]:checked~.collapse-content,.collapse[open]>.collapse-content{visibility:visible;min-height:-moz-fit-content;min-height:fit-content}.diff{position:relative;display:grid;width:100%;overflow:hidden;direction:ltr;container-type:inline-size;grid-template-columns:auto 1fr}.divider{display:flex;flex-direction:row;align-items:center;align-self:stretch;margin-top:1rem;margin-bottom:1rem;height:1rem;white-space:nowrap}.divider:after,.divider:before{height:.125rem;width:100%;flex-grow:1;--tw-content:"";content:var(--tw-content);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.dropdown{position:relative;display:inline-block}.dropdown>:not(summary):focus{outline:2px solid transparent;outline-offset:2px}.dropdown .dropdown-content{position:absolute}.dropdown:is(:not(details)) .dropdown-content{visibility:hidden;opacity:0;transform-origin:top;--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s}.dropdown.dropdown-open .dropdown-content,.dropdown:focus-within .dropdown-content,.dropdown:not(.dropdown-hover):focus .dropdown-content{visibility:visible;opacity:1}@media (hover:hover){.dropdown.dropdown-hover:hover .dropdown-content{visibility:visible;opacity:1}.btm-nav>.disabled:hover,.btm-nav>[disabled]:hover{pointer-events:none;--tw-border-opacity:0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity:0.1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity:0.2}.btn:hover{--tw-border-opacity:1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}@supports (color:color-mix(in oklab,black,black)){.btn:hover{background-color:color-mix(in oklab,oklch(var(--btn-color,var(--b2))/var(--tw-bg-opacity,1)) 90%,#000);border-color:color-mix(in oklab,oklch(var(--btn-color,var(--b2))/var(--tw-border-opacity,1)) 90%,#000)}}@supports not (color:oklch(0% 0 0)){.btn:hover{background-color:var(--btn-color,var(--fallback-b2));border-color:var(--btn-color,var(--fallback-b2))}}.btn.glass:hover{--glass-opacity:25%;--glass-border-opacity:15%}.btn-ghost:hover{border-color:transparent}@supports (color:oklch(0% 0 0)){.btn-ghost:hover{background-color:var(--fallback-bc,oklch(var(--bc)/.2))}}.btn-outline:hover{--tw-border-opacity:1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}.btn-outline.btn-primary:hover{--tw-text-opacity:1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}@supports (color:color-mix(in oklab,black,black)){.btn-outline.btn-primary:hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,#000)}}.btn-outline.btn-secondary:hover{--tw-text-opacity:1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}@supports (color:color-mix(in oklab,black,black)){.btn-outline.btn-secondary:hover{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,#000)}}.btn-outline.btn-accent:hover{--tw-text-opacity:1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}@supports (color:color-mix(in oklab,black,black)){.btn-outline.btn-accent:hover{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,#000)}}.btn-outline.btn-success:hover{--tw-text-opacity:1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}@supports (color:color-mix(in oklab,black,black)){.btn-outline.btn-success:hover{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,#000)}}.btn-outline.btn-info:hover{--tw-text-opacity:1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}@supports (color:color-mix(in oklab,black,black)){.btn-outline.btn-info:hover{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,#000)}}.btn-outline.btn-warning:hover{--tw-text-opacity:1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}@supports (color:color-mix(in oklab,black,black)){.btn-outline.btn-warning:hover{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,#000)}}.btn-outline.btn-error:hover{--tw-text-opacity:1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}@supports (color:color-mix(in oklab,black,black)){.btn-outline.btn-error:hover{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,#000)}}.btn-disabled:hover,.btn:disabled:hover,.btn[disabled]:hover{--tw-border-opacity:0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity:0.2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity:0.2}@supports (color:color-mix(in oklab,black,black)){.btn:is(input[type=checkbox]:checked):hover,.btn:is(input[type=radio]:checked):hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,#000)}}.dropdown.dropdown-hover:hover .dropdown-content{--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:where(.menu li:not(.menu-title,.disabled)>:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{cursor:pointer;outline:2px solid transparent;outline-offset:2px}@supports (color:oklch(0% 0 0)){:where(.menu li:not(.menu-title,.disabled)>:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{background-color:var(--fallback-bc,oklch(var(--bc)/.1))}}.tab[disabled],.tab[disabled]:hover{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity:0.2}}.dropdown:is(details) summary::-webkit-details-marker{display:none}.file-input{height:3rem;flex-shrink:1;padding-inline-end:1rem;font-size:1rem;line-height:2;line-height:1.5rem;overflow:hidden;border-radius:var(--rounded-btn,.5rem);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity:0;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.file-input::file-selector-button{margin-inline-end:1rem;display:inline-flex;height:100%;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;padding-left:1rem;padding-right:1rem;text-align:center;font-size:.875rem;line-height:1.25rem;line-height:1em;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;border-style:solid;--tw-border-opacity:1;border-color:var(--fallback-n,oklch(var(--n)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));font-weight:600;text-transform:uppercase;--tw-text-opacity:1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)));text-decoration-line:none;border-width:var(--border-btn,1px);animation:button-pop var(--animation-btn,.25s) ease-out}.footer{width:100%;grid-auto-flow:row;-moz-column-gap:1rem;column-gap:1rem;row-gap:2.5rem;font-size:.875rem;line-height:1.25rem}.footer,.footer>*{display:grid;place-items:start}.footer>*{gap:.5rem}@media (min-width:48rem){.footer{grid-auto-flow:column}.footer-center{grid-auto-flow:row dense}}.label{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;justify-content:space-between;padding:.5rem .25rem}.\!input{flex-shrink:1!important;-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;height:3rem!important;padding-left:1rem!important;padding-right:1rem!important;font-size:1rem!important;line-height:2!important;line-height:1.5rem!important;border-radius:var(--rounded-btn,.5rem)!important;border-width:1px!important;border-color:transparent!important;--tw-bg-opacity:1!important;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))!important}.input{flex-shrink:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:2;line-height:1.5rem;border-radius:var(--rounded-btn,.5rem);border-width:1px;border-color:transparent;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.\!input[type=number]::-webkit-inner-spin-button{margin-top:-1rem!important;margin-bottom:-1rem!important;margin-inline-end:-1rem!important}.input-md[type=number]::-webkit-inner-spin-button,.input[type=number]::-webkit-inner-spin-button{margin-top:-1rem;margin-bottom:-1rem;margin-inline-end:-1rem}.join{display:inline-flex;align-items:stretch;border-radius:var(--rounded-btn,.5rem)}.join :where(.join-item){border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:not(:first-child):not(:last-child),.join :not(:first-child):not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:first-child:not(:last-child),.join :first-child:not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0}.join .dropdown .join-item:first-child:not(:last-child),.join :first-child:not(:last-child) .dropdown .join-item{border-start-end-radius:inherit;border-end-end-radius:inherit}.join :where(.join-item:first-child:not(:last-child)),.join :where(:first-child:not(:last-child) .join-item){border-end-start-radius:inherit;border-start-start-radius:inherit}.join .join-item:last-child:not(:first-child),.join :last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0}.join :where(.join-item:last-child:not(:first-child)),.join :where(:last-child:not(:first-child) .join-item){border-start-end-radius:inherit;border-end-end-radius:inherit}@supports not selector(:has(*)){:where(.join *){border-radius:inherit}}@supports selector(:has(*)){:where(.join :has(.join-item)){border-radius:inherit}}.link{cursor:pointer;text-decoration-line:underline}.menu{display:flex;flex-direction:column;flex-wrap:wrap;font-size:.875rem;line-height:1.25rem;padding:.5rem}.menu :where(li ul){position:relative;white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem}.menu :where(li:not(.menu-title)>:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){display:grid;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;grid-auto-columns:minmax(auto,max-content) auto max-content;-webkit-user-select:none;-moz-user-select:none;user-select:none}.menu li.disabled{cursor:not-allowed;-webkit-user-select:none;-moz-user-select:none;user-select:none;color:var(--fallback-bc,oklch(var(--bc)/.3))}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}:where(.menu li){position:relative;display:flex;flex-shrink:0;flex-direction:column;flex-wrap:wrap;align-items:stretch}:where(.menu li) .badge{justify-self:end}.modal{pointer-events:none;position:fixed;inset:0;margin:0;display:grid;height:100%;max-height:none;width:100%;max-width:none;justify-items:center;padding:0;opacity:0;overscroll-behavior:contain;z-index:999;background-color:transparent;color:inherit;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:transform,opacity,visibility;overflow-y:hidden}:where(.modal){align-items:center}.modal-open,.modal-toggle:checked+.modal,.modal:target,.modal[open]{pointer-events:auto;visibility:visible;opacity:1}:root:has(:is(.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open])){overflow:hidden;scrollbar-gutter:stable}.navbar{display:flex;align-items:center;padding:var(--navbar-padding,.5rem);min-height:4rem;width:100%}:where(.navbar>:not(script,style)){display:inline-flex;align-items:center}.progress{position:relative;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;overflow:hidden;height:.5rem;border-radius:var(--rounded-box,1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.2))}.radio{flex-shrink:0;--chkbg:var(--bc);width:1.5rem;-webkit-appearance:none;border-radius:9999px;border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity:0.2}.radio,.range{height:1.5rem;cursor:pointer;-moz-appearance:none;appearance:none}.range{width:100%;-webkit-appearance:none;--range-shdw:var(--fallback-bc,oklch(var(--bc)/1));overflow:hidden;border-radius:var(--rounded-box,1rem);background-color:transparent}.range:focus{outline:none}.select{display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;min-height:3rem;padding-inline-start:1rem;padding-inline-end:2.5rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn,.5rem);border-width:1px;border-color:transparent;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));background-image:linear-gradient(45deg,transparent 50%,currentColor 0),linear-gradient(135deg,currentColor 50%,transparent 0);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-size:4px 4px,4px 4px;background-repeat:no-repeat}.select[multiple]{height:auto}.stack{display:inline-grid;place-items:center;align-items:flex-end}.stack>*{grid-column-start:1;grid-row-start:1;transform:translateY(10%) scale(.9);z-index:1;width:100%;opacity:.6}.stack>:nth-child(2){transform:translateY(5%) scale(.95);z-index:2;opacity:.8}.stack>:first-child{transform:translateY(0) scale(1);z-index:3;opacity:1}.steps{display:inline-grid;grid-auto-flow:column;overflow:hidden;overflow-x:auto;counter-reset:step;grid-auto-columns:1fr}.steps .step{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-columns:auto;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-rows:40px 1fr;place-items:center;text-align:center;min-width:4rem}.\!swap{position:relative!important;display:inline-grid!important;-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important;place-content:center!important;cursor:pointer!important}.swap{position:relative;display:inline-grid;-webkit-user-select:none;-moz-user-select:none;user-select:none;place-content:center;cursor:pointer}.\!swap>*{grid-column-start:1!important;grid-row-start:1!important;transition-duration:.3s!important;transition-timing-function:cubic-bezier(0,0,.2,1)!important;transition-property:transform,opacity!important}.swap>*{grid-column-start:1;grid-row-start:1;transition-duration:.3s;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:transform,opacity}.\!swap input{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important}.swap input{-webkit-appearance:none;-moz-appearance:none;appearance:none}.swap .swap-indeterminate,.swap .swap-on,.swap input:indeterminate~.swap-on{opacity:0}.\!swap .swap-indeterminate,.\!swap .swap-on,.\!swap input:indeterminate~.swap-on{opacity:0!important}.swap input:checked~.swap-off,.swap input:indeterminate~.swap-off,.swap-active .swap-off{opacity:0}.\!swap input:checked~.swap-off,.\!swap input:indeterminate~.swap-off{opacity:0!important}.swap input:checked~.swap-on,.swap input:indeterminate~.swap-indeterminate,.swap-active .swap-on{opacity:1}.\!swap input:checked~.swap-on,.\!swap input:indeterminate~.swap-indeterminate{opacity:1!important}.tabs{display:grid;align-items:flex-end}.tabs-lifted:has(.tab-content[class*=" rounded-"]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])),.tabs-lifted:has(.tab-content[class^=rounded-]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])){border-bottom-color:transparent}.tab{position:relative;grid-row-start:1;display:inline-flex;height:2rem;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;flex-wrap:wrap;align-items:center;justify-content:center;text-align:center;font-size:.875rem;line-height:1.25rem;line-height:2;--tab-padding:1rem;--tw-text-opacity:0.5;--tab-color:var(--fallback-bc,oklch(var(--bc)/1));--tab-bg:var(--fallback-b1,oklch(var(--b1)/1));--tab-border-color:var(--fallback-b3,oklch(var(--b3)/1));color:var(--tab-color);padding-inline-start:var(--tab-padding,1rem);padding-inline-end:var(--tab-padding,1rem)}.tab:is(input[type=radio]){width:auto;border-bottom-right-radius:0;border-bottom-left-radius:0}.tab:is(input[type=radio]):after{--tw-content:attr(aria-label);content:var(--tw-content)}.tab:not(input):empty{cursor:default;grid-column-start:span 9999}:checked+.tab-content:nth-child(2),:is(.tab-active,[aria-selected=true])+.tab-content:nth-child(2){border-start-start-radius:0}:is(.tab-active,[aria-selected=true])+.tab-content,input.tab:checked+.tab-content{display:block}.table{position:relative;width:100%;border-radius:var(--rounded-box,1rem);text-align:left;font-size:.875rem;line-height:1.25rem}.table :where(.table-pin-rows thead tr){position:sticky;top:0;z-index:1;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-rows tfoot tr){position:sticky;bottom:0;z-index:1;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-cols tr th){position:sticky;left:0;right:0;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table-zebra tbody tr:nth-child(2n) :where(.table-pin-cols tr th){--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.textarea{min-height:3rem;flex-shrink:1;padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn,.5rem);border-width:1px;border-color:transparent;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.timeline{position:relative;display:flex}:where(.timeline>li){position:relative;display:grid;flex-shrink:0;align-items:center;grid-template-rows:var(--timeline-row-start,minmax(0,1fr)) auto var( +*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root,[data-theme]{background-color:var(--fallback-b1,oklch(var(--b1)/1));color:var(--fallback-bc,oklch(var(--bc)/1))}@supports not (color:oklch(0% 0 0)){:root{color-scheme:light;--fallback-p:#491eff;--fallback-pc:#d4dbff;--fallback-s:#ff41c7;--fallback-sc:#fff9fc;--fallback-a:#00cfbd;--fallback-ac:#00100d;--fallback-n:#2b3440;--fallback-nc:#d7dde4;--fallback-b1:#fff;--fallback-b2:#e5e6e6;--fallback-b3:#e5e6e6;--fallback-bc:#1f2937;--fallback-in:#00b3f0;--fallback-inc:#000;--fallback-su:#00ca92;--fallback-suc:#000;--fallback-wa:#ffc22d;--fallback-wac:#000;--fallback-er:#ff6f70;--fallback-erc:#000}@media (prefers-color-scheme:dark){:root{color-scheme:dark;--fallback-p:#7582ff;--fallback-pc:#050617;--fallback-s:#ff71cf;--fallback-sc:#190211;--fallback-a:#00c7b5;--fallback-ac:#000e0c;--fallback-n:#2a323c;--fallback-nc:#a6adbb;--fallback-b1:#1d232a;--fallback-b2:#191e24;--fallback-b3:#15191e;--fallback-bc:#a6adbb;--fallback-in:#00b3f0;--fallback-inc:#000;--fallback-su:#00ca92;--fallback-suc:#000;--fallback-wa:#ffc22d;--fallback-wac:#000;--fallback-er:#ff6f70;--fallback-erc:#000}}}html{-webkit-tap-highlight-color:transparent}*{scrollbar-color:color-mix(in oklch,currentColor 35%,transparent) transparent}:hover{scrollbar-color:color-mix(in oklch,currentColor 60%,transparent) transparent}:root,[data-theme=nord]{color-scheme:light;--pc:11.8872% 0.015449 254.027774;--sc:13.9303% 0.011822 248.687186;--ac:15.4929% 0.01245 217.469017;--inc:13.8414% 0.012499 332.664922;--suc:15.3654% 0.01498 131.063061;--wac:17.0972% 0.017847 84.093335;--erc:12.122% 0.024119 15.341883;--animation-btn:0.25s;--animation-input:.2s;--btn-focus-scale:0.95;--border-btn:1px;--tab-border:1px;--p:59.4359% 0.077246 254.027774;--s:69.6516% 0.059108 248.687186;--a:77.4643% 0.062249 217.469017;--n:45.229% 0.035214 264.1312;--nc:89.9258% 0.016374 262.749256;--b1:95.1276% 0.007445 260.731539;--b2:93.2996% 0.010389 261.788485;--b3:89.9258% 0.016374 262.749256;--bc:32.4374% 0.022945 264.182036;--in:69.2072% 0.062496 332.664922;--su:76.827% 0.074899 131.063061;--wa:85.4862% 0.089234 84.093335;--er:60.61% 0.120594 15.341883;--rounded-box:0.4rem;--rounded-btn:0.2rem;--rounded-badge:0.4rem;--tab-radius:0.2rem}[data-theme=dim]{color-scheme:dark;--pc:17.2267% 0.028331 139.549991;--sc:14.6752% 0.033181 35.353059;--ac:14.8459% 0.026728 311.37924;--inc:17.2157% 0.028409 206.182959;--suc:17.2343% 0.028437 166.534048;--wac:17.2327% 0.028447 94.818679;--erc:16.4838% 0.019914 33.756357;--rounded-box:1rem;--rounded-btn:0.5rem;--rounded-badge:1.9rem;--animation-btn:0.25s;--animation-input:.2s;--btn-focus-scale:0.95;--border-btn:1px;--tab-border:1px;--tab-radius:0.5rem;--p:86.1335% 0.141656 139.549991;--s:73.3759% 0.165904 35.353059;--a:74.2296% 0.133641 311.37924;--n:24.7311% 0.020483 264.094728;--nc:82.9011% 0.031335 222.959324;--b1:30.8577% 0.023243 264.149498;--b2:28.0368% 0.01983 264.182074;--b3:26.3469% 0.018403 262.177739;--bc:82.9011% 0.031335 222.959324;--in:86.0785% 0.142046 206.182959;--su:86.1717% 0.142187 166.534048;--wa:86.1634% 0.142236 94.818679;--er:82.4189% 0.09957 33.756357}body{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}h1{font-size:1.875rem;line-height:2.25rem;font-weight:600}@media (min-width:768px){h1{font-size:2.25rem;line-height:2.5rem}}h2{font-size:1.5rem;line-height:2rem}h2,h3{font-weight:600}h3{font-size:1.25rem;line-height:1.75rem}pre{overflow-x:auto;white-space:pre-wrap;border-radius:var(--rounded-box,1rem);border-width:1px;--tw-border-opacity:1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity,1)));--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity,1)));padding:1rem;font-size:.875rem;line-height:1.25rem}code{white-space:pre-wrap}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.alert{display:grid;width:100%;grid-auto-flow:row;align-content:flex-start;align-items:center;justify-items:center;gap:1rem;text-align:center;border-radius:var(--rounded-box,1rem);border-width:1px;--tw-border-opacity:1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));padding:1rem;--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--alert-bg:var(--fallback-b2,oklch(var(--b2)/1));--alert-bg-mix:var(--fallback-b1,oklch(var(--b1)/1));background-color:var(--alert-bg)}@media (min-width:640px){.alert{grid-auto-flow:column;grid-template-columns:auto minmax(auto,1fr);justify-items:start;text-align:start}}.avatar.placeholder>div{display:flex;align-items:center;justify-content:center}.badge{display:inline-flex;align-items:center;justify-content:center;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;height:1.25rem;font-size:.875rem;line-height:1.25rem;width:-moz-fit-content;width:fit-content;padding-left:.563rem;padding-right:.563rem;border-radius:var(--rounded-badge,1.9rem);border-width:1px;--tw-border-opacity:1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}@media (hover:hover){.\!label a:hover{--tw-text-opacity:1!important;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))!important}.label a:hover{--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.menu li>:not(ul,.menu-title,details,.btn).active,.menu li>:not(ul,.menu-title,details,.btn):active,.menu li>details>summary:active{--tw-bg-opacity:1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.tab:hover{--tw-text-opacity:1}.tabs-boxed :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):hover,.tabs-boxed :is(input:checked):hover{--tw-text-opacity:1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.table tr.hover:hover,.table tr.hover:nth-child(2n):hover{--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.hover:hover,.table-zebra tr.hover:nth-child(2n):hover{--tw-bg-opacity:1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}}.btn{display:inline-flex;height:3rem;min-height:3rem;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;border-radius:var(--rounded-btn,.5rem);border-color:transparent;border-color:oklch(var(--btn-color,var(--b2))/var(--tw-border-opacity));padding-left:1rem;padding-right:1rem;text-align:center;font-size:.875rem;line-height:1em;gap:.5rem;font-weight:600;text-decoration-line:none;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);border-width:var(--border-btn,1px);transition-property:color,background-color,border-color,opacity,box-shadow,transform;--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);outline-color:var(--fallback-bc,oklch(var(--bc)/1));background-color:oklch(var(--btn-color,var(--b2))/var(--tw-bg-opacity));--tw-bg-opacity:1;--tw-border-opacity:1}.btn-disabled,.btn:disabled,.btn[disabled]{pointer-events:none}.btn-circle,.btn-square{height:3rem;width:3rem;padding:0}.btn-circle{border-radius:9999px}:where(.btn:is(input[type=checkbox])),:where(.btn:is(input[type=radio])){width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none}.btn:is(input[type=checkbox]):after,.btn:is(input[type=radio]):after{--tw-content:attr(aria-label);content:var(--tw-content)}.card{position:relative;display:flex;flex-direction:column;border-radius:var(--rounded-box,1rem)}.card:focus{outline:2px solid transparent;outline-offset:2px}.card-body{display:flex;flex:1 1 auto;flex-direction:column;padding:var(--padding-card,2rem);gap:.5rem}.card-body :where(p){flex-grow:1}.card-actions{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.5rem}.card figure{display:flex;align-items:center;justify-content:center}.card.image-full{display:grid}.card.image-full:before{position:relative;content:"";z-index:10;border-radius:var(--rounded-box,1rem);--tw-bg-opacity:1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));opacity:.75}.card.image-full:before,.card.image-full>*{grid-column-start:1;grid-row-start:1}.card.image-full>figure img{height:100%;-o-object-fit:cover;object-fit:cover}.card.image-full>.card-body{position:relative;z-index:20;--tw-text-opacity:1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.carousel{display:inline-flex;overflow-x:scroll;scroll-snap-type:x mandatory;scroll-behavior:smooth;-ms-overflow-style:none;scrollbar-width:none}.checkbox{flex-shrink:0;--chkbg:var(--fallback-bc,oklch(var(--bc)/1));--chkfg:var(--fallback-b1,oklch(var(--b1)/1));height:1.5rem;width:1.5rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-btn,.5rem);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity:0.2}.collapse:not(td):not(tr):not(colgroup){visibility:visible}.collapse{position:relative;display:grid;overflow:hidden;grid-template-rows:max-content 0fr;transition:grid-template-rows .2s;width:100%;border-radius:var(--rounded-box,1rem)}.collapse-content,.collapse-title,.collapse>input[type=checkbox],.collapse>input[type=radio]{grid-column-start:1;grid-row-start:1}.collapse>input[type=checkbox],.collapse>input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}:where(.collapse>input[type=checkbox]),:where(.collapse>input[type=radio]){height:100%;width:100%;z-index:1}.collapse-open,.collapse:focus:not(.collapse-close),.collapse[open]{grid-template-rows:max-content 1fr}.collapse:not(.collapse-close):has(>input[type=checkbox]:checked),.collapse:not(.collapse-close):has(>input[type=radio]:checked){grid-template-rows:max-content 1fr}.collapse-open>.collapse-content,.collapse:focus:not(.collapse-close)>.collapse-content,.collapse:not(.collapse-close)>input[type=checkbox]:checked~.collapse-content,.collapse:not(.collapse-close)>input[type=radio]:checked~.collapse-content,.collapse[open]>.collapse-content{visibility:visible;min-height:-moz-fit-content;min-height:fit-content}.diff{position:relative;display:grid;width:100%;overflow:hidden;direction:ltr;container-type:inline-size;grid-template-columns:auto 1fr}.divider{display:flex;flex-direction:row;align-items:center;align-self:stretch;margin-top:1rem;margin-bottom:1rem;height:1rem;white-space:nowrap}.divider:after,.divider:before{height:.125rem;width:100%;flex-grow:1;--tw-content:"";content:var(--tw-content);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.dropdown{position:relative;display:inline-block}.dropdown>:not(summary):focus{outline:2px solid transparent;outline-offset:2px}.dropdown .dropdown-content{position:absolute}.dropdown:is(:not(details)) .dropdown-content{visibility:hidden;opacity:0;transform-origin:top;--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s}.dropdown.dropdown-open .dropdown-content,.dropdown:focus-within .dropdown-content,.dropdown:not(.dropdown-hover):focus .dropdown-content{visibility:visible;opacity:1}@media (hover:hover){.dropdown.dropdown-hover:hover .dropdown-content{visibility:visible;opacity:1}.btm-nav>.disabled:hover,.btm-nav>[disabled]:hover{pointer-events:none;--tw-border-opacity:0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity:0.1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity:0.2}.btn:hover{--tw-border-opacity:1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}@supports (color:color-mix(in oklab,black,black)){.btn:hover{background-color:color-mix(in oklab,oklch(var(--btn-color,var(--b2))/var(--tw-bg-opacity,1)) 90%,#000);border-color:color-mix(in oklab,oklch(var(--btn-color,var(--b2))/var(--tw-border-opacity,1)) 90%,#000)}}@supports not (color:oklch(0% 0 0)){.btn:hover{background-color:var(--btn-color,var(--fallback-b2));border-color:var(--btn-color,var(--fallback-b2))}}.btn.glass:hover{--glass-opacity:25%;--glass-border-opacity:15%}.btn-ghost:hover{border-color:transparent}@supports (color:oklch(0% 0 0)){.btn-ghost:hover{background-color:var(--fallback-bc,oklch(var(--bc)/.2))}}.btn-outline:hover{--tw-border-opacity:1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}.btn-outline.btn-primary:hover{--tw-text-opacity:1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}@supports (color:color-mix(in oklab,black,black)){.btn-outline.btn-primary:hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,#000)}}.btn-outline.btn-secondary:hover{--tw-text-opacity:1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}@supports (color:color-mix(in oklab,black,black)){.btn-outline.btn-secondary:hover{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,#000)}}.btn-outline.btn-accent:hover{--tw-text-opacity:1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}@supports (color:color-mix(in oklab,black,black)){.btn-outline.btn-accent:hover{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,#000)}}.btn-outline.btn-success:hover{--tw-text-opacity:1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}@supports (color:color-mix(in oklab,black,black)){.btn-outline.btn-success:hover{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,#000)}}.btn-outline.btn-info:hover{--tw-text-opacity:1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}@supports (color:color-mix(in oklab,black,black)){.btn-outline.btn-info:hover{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,#000)}}.btn-outline.btn-warning:hover{--tw-text-opacity:1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}@supports (color:color-mix(in oklab,black,black)){.btn-outline.btn-warning:hover{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,#000)}}.btn-outline.btn-error:hover{--tw-text-opacity:1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}@supports (color:color-mix(in oklab,black,black)){.btn-outline.btn-error:hover{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,#000)}}.btn-disabled:hover,.btn:disabled:hover,.btn[disabled]:hover{--tw-border-opacity:0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity:0.2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity:0.2}@supports (color:color-mix(in oklab,black,black)){.btn:is(input[type=checkbox]:checked):hover,.btn:is(input[type=radio]:checked):hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,#000)}}.dropdown.dropdown-hover:hover .dropdown-content{--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:where(.menu li:not(.menu-title,.disabled)>:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{cursor:pointer;outline:2px solid transparent;outline-offset:2px}@supports (color:oklch(0% 0 0)){:where(.menu li:not(.menu-title,.disabled)>:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{background-color:var(--fallback-bc,oklch(var(--bc)/.1))}}.tab[disabled],.tab[disabled]:hover{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity:0.2}}.dropdown:is(details) summary::-webkit-details-marker{display:none}.file-input{height:3rem;flex-shrink:1;padding-inline-end:1rem;font-size:1rem;line-height:2;line-height:1.5rem;overflow:hidden;border-radius:var(--rounded-btn,.5rem);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity:0;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.file-input::file-selector-button{margin-inline-end:1rem;display:inline-flex;height:100%;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;padding-left:1rem;padding-right:1rem;text-align:center;font-size:.875rem;line-height:1.25rem;line-height:1em;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;border-style:solid;--tw-border-opacity:1;border-color:var(--fallback-n,oklch(var(--n)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));font-weight:600;text-transform:uppercase;--tw-text-opacity:1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)));text-decoration-line:none;border-width:var(--border-btn,1px);animation:button-pop var(--animation-btn,.25s) ease-out}.footer{width:100%;grid-auto-flow:row;-moz-column-gap:1rem;column-gap:1rem;row-gap:2.5rem;font-size:.875rem;line-height:1.25rem}.footer,.footer>*{display:grid;place-items:start}.footer>*{gap:.5rem}@media (min-width:48rem){.footer{grid-auto-flow:column}.footer-center{grid-auto-flow:row dense}}.\!label{display:flex!important;-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important;align-items:center!important;justify-content:space-between!important;padding:.5rem .25rem!important}.label{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;justify-content:space-between;padding:.5rem .25rem}.indicator{position:relative;display:inline-flex;width:-moz-max-content;width:max-content}.indicator :where(.indicator-item){z-index:1;position:absolute;white-space:nowrap}.\!input{flex-shrink:1!important;-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;height:3rem!important;padding-left:1rem!important;padding-right:1rem!important;font-size:1rem!important;line-height:2!important;line-height:1.5rem!important;border-radius:var(--rounded-btn,.5rem)!important;border-width:1px!important;border-color:transparent!important;--tw-bg-opacity:1!important;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))!important}.input{flex-shrink:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:2;line-height:1.5rem;border-radius:var(--rounded-btn,.5rem);border-width:1px;border-color:transparent;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.\!input[type=number]::-webkit-inner-spin-button{margin-top:-1rem!important;margin-bottom:-1rem!important;margin-inline-end:-1rem!important}.input-md[type=number]::-webkit-inner-spin-button,.input[type=number]::-webkit-inner-spin-button{margin-top:-1rem;margin-bottom:-1rem;margin-inline-end:-1rem}.join{display:inline-flex;align-items:stretch;border-radius:var(--rounded-btn,.5rem)}.join :where(.join-item){border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:not(:first-child):not(:last-child),.join :not(:first-child):not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:first-child:not(:last-child),.join :first-child:not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0}.join .dropdown .join-item:first-child:not(:last-child),.join :first-child:not(:last-child) .dropdown .join-item{border-start-end-radius:inherit;border-end-end-radius:inherit}.join :where(.join-item:first-child:not(:last-child)),.join :where(:first-child:not(:last-child) .join-item){border-end-start-radius:inherit;border-start-start-radius:inherit}.join .join-item:last-child:not(:first-child),.join :last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0}.join :where(.join-item:last-child:not(:first-child)),.join :where(:last-child:not(:first-child) .join-item){border-start-end-radius:inherit;border-end-end-radius:inherit}@supports not selector(:has(*)){:where(.join *){border-radius:inherit}}@supports selector(:has(*)){:where(.join :has(.join-item)){border-radius:inherit}}.link{cursor:pointer;text-decoration-line:underline}.mask{-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center}.menu{display:flex;flex-direction:column;flex-wrap:wrap;font-size:.875rem;line-height:1.25rem;padding:.5rem}.menu :where(li ul){position:relative;white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem}.menu :where(li:not(.menu-title)>:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){display:grid;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;grid-auto-columns:minmax(auto,max-content) auto max-content;-webkit-user-select:none;-moz-user-select:none;user-select:none}.menu li.disabled{cursor:not-allowed;-webkit-user-select:none;-moz-user-select:none;user-select:none;color:var(--fallback-bc,oklch(var(--bc)/.3))}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}:where(.menu li){position:relative;display:flex;flex-shrink:0;flex-direction:column;flex-wrap:wrap;align-items:stretch}:where(.menu li) .badge{justify-self:end}.modal{pointer-events:none;position:fixed;inset:0;margin:0;display:grid;height:100%;max-height:none;width:100%;max-width:none;justify-items:center;padding:0;opacity:0;overscroll-behavior:contain;z-index:999;background-color:transparent;color:inherit;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:transform,opacity,visibility;overflow-y:hidden}:where(.modal){align-items:center}.modal-open,.modal-toggle:checked+.modal,.modal:target,.modal[open]{pointer-events:auto;visibility:visible;opacity:1}:root:has(:is(.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open])){overflow:hidden;scrollbar-gutter:stable}.navbar{display:flex;align-items:center;padding:var(--navbar-padding,.5rem);min-height:4rem;width:100%}:where(.navbar>:not(script,style)){display:inline-flex;align-items:center}.\!progress{position:relative!important;width:100%!important;-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;overflow:hidden!important;height:.5rem!important;border-radius:var(--rounded-box,1rem)!important;background-color:var(--fallback-bc,oklch(var(--bc)/.2))!important}.progress{position:relative;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;overflow:hidden;height:.5rem;border-radius:var(--rounded-box,1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.2))}.radio{flex-shrink:0;--chkbg:var(--bc);width:1.5rem;-webkit-appearance:none;border-radius:9999px;border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity:0.2}.radio,.range{height:1.5rem;cursor:pointer;-moz-appearance:none;appearance:none}.range{width:100%;-webkit-appearance:none;--range-shdw:var(--fallback-bc,oklch(var(--bc)/1));overflow:hidden;border-radius:var(--rounded-box,1rem);background-color:transparent}.range:focus{outline:none}.select{display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;min-height:3rem;padding-inline-start:1rem;padding-inline-end:2.5rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn,.5rem);border-width:1px;border-color:transparent;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));background-image:linear-gradient(45deg,transparent 50%,currentColor 0),linear-gradient(135deg,currentColor 50%,transparent 0);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-size:4px 4px,4px 4px;background-repeat:no-repeat}.select[multiple]{height:auto}.stack{display:inline-grid;place-items:center;align-items:flex-end}.stack>*{grid-column-start:1;grid-row-start:1;transform:translateY(10%) scale(.9);z-index:1;width:100%;opacity:.6}.stack>:nth-child(2){transform:translateY(5%) scale(.95);z-index:2;opacity:.8}.stack>:first-child{transform:translateY(0) scale(1);z-index:3;opacity:1}.stats{display:inline-grid;border-radius:var(--rounded-box,1rem);--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}:where(.stats){grid-auto-flow:column;overflow-x:auto}.steps{display:inline-grid;grid-auto-flow:column;overflow:hidden;overflow-x:auto;counter-reset:step;grid-auto-columns:1fr}.steps .step{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-columns:auto;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-rows:40px 1fr;place-items:center;text-align:center;min-width:4rem}.\!swap{position:relative!important;display:inline-grid!important;-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important;place-content:center!important;cursor:pointer!important}.swap{position:relative;display:inline-grid;-webkit-user-select:none;-moz-user-select:none;user-select:none;place-content:center;cursor:pointer}.\!swap>*{grid-column-start:1!important;grid-row-start:1!important;transition-duration:.3s!important;transition-timing-function:cubic-bezier(0,0,.2,1)!important;transition-property:transform,opacity!important}.swap>*{grid-column-start:1;grid-row-start:1;transition-duration:.3s;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:transform,opacity}.\!swap input{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important}.swap input{-webkit-appearance:none;-moz-appearance:none;appearance:none}.swap .swap-indeterminate,.swap .swap-on,.swap input:indeterminate~.swap-on{opacity:0}.\!swap .swap-indeterminate,.\!swap .swap-on,.\!swap input:indeterminate~.swap-on{opacity:0!important}.swap input:checked~.swap-off,.swap input:indeterminate~.swap-off,.swap-active .swap-off{opacity:0}.\!swap input:checked~.swap-off,.\!swap input:indeterminate~.swap-off{opacity:0!important}.swap input:checked~.swap-on,.swap input:indeterminate~.swap-indeterminate,.swap-active .swap-on{opacity:1}.\!swap input:checked~.swap-on,.\!swap input:indeterminate~.swap-indeterminate{opacity:1!important}.tabs{display:grid;align-items:flex-end}.tabs-lifted:has(.tab-content[class*=" rounded-"]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])),.tabs-lifted:has(.tab-content[class^=rounded-]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])){border-bottom-color:transparent}.tab{position:relative;grid-row-start:1;display:inline-flex;height:2rem;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;flex-wrap:wrap;align-items:center;justify-content:center;text-align:center;font-size:.875rem;line-height:1.25rem;line-height:2;--tab-padding:1rem;--tw-text-opacity:0.5;--tab-color:var(--fallback-bc,oklch(var(--bc)/1));--tab-bg:var(--fallback-b1,oklch(var(--b1)/1));--tab-border-color:var(--fallback-b3,oklch(var(--b3)/1));color:var(--tab-color);padding-inline-start:var(--tab-padding,1rem);padding-inline-end:var(--tab-padding,1rem)}.tab:is(input[type=radio]){width:auto;border-bottom-right-radius:0;border-bottom-left-radius:0}.tab:is(input[type=radio]):after{--tw-content:attr(aria-label);content:var(--tw-content)}.tab:not(input):empty{cursor:default;grid-column-start:span 9999}:checked+.tab-content:nth-child(2),:is(.tab-active,[aria-selected=true])+.tab-content:nth-child(2){border-start-start-radius:0}:is(.tab-active,[aria-selected=true])+.tab-content,input.tab:checked+.tab-content{display:block}.table{position:relative;width:100%;border-radius:var(--rounded-box,1rem);text-align:left;font-size:.875rem;line-height:1.25rem}.table :where(.table-pin-rows thead tr){position:sticky;top:0;z-index:1;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-rows tfoot tr){position:sticky;bottom:0;z-index:1;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-cols tr th){position:sticky;left:0;right:0;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table-zebra tbody tr:nth-child(2n) :where(.table-pin-cols tr th){--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.textarea{min-height:3rem;flex-shrink:1;padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn,.5rem);border-width:1px;border-color:transparent;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.timeline{position:relative;display:flex}:where(.timeline>li){position:relative;display:grid;flex-shrink:0;align-items:center;grid-template-rows:var(--timeline-row-start,minmax(0,1fr)) auto var( --timeline-row-end,minmax(0,1fr) );grid-template-columns:var(--timeline-col-start,minmax(0,1fr)) auto var( --timeline-col-end,minmax(0,1fr) - )}.timeline>li>hr{width:100%;border-width:0}:where(.timeline>li>hr):first-child{grid-column-start:1;grid-row-start:2}:where(.timeline>li>hr):last-child{grid-column-start:3;grid-column-end:none;grid-row-start:2;grid-row-end:auto}.\!toggle{flex-shrink:0!important;--tglbg:var(--fallback-b1,oklch(var(--b1)/1))!important;--handleoffset:1.5rem!important;--handleoffsetcalculator:calc(var(--handleoffset)*-1)!important;--togglehandleborder:0 0!important;height:1.5rem!important;width:3rem!important;cursor:pointer!important;-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;border-radius:var(--rounded-badge,1.9rem)!important;border-width:1px!important;border-color:currentColor!important;background-color:currentColor!important;color:var(--fallback-bc,oklch(var(--bc)/.5))!important;transition:background,box-shadow var(--animation-input,.2s) ease-out!important;box-shadow:var(--handleoffsetcalculator) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset,var(--togglehandleborder)!important}.toggle{flex-shrink:0;--tglbg:var(--fallback-b1,oklch(var(--b1)/1));--handleoffset:1.5rem;--handleoffsetcalculator:calc(var(--handleoffset)*-1);--togglehandleborder:0 0;height:1.5rem;width:3rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-badge,1.9rem);border-width:1px;border-color:currentColor;background-color:currentColor;color:var(--fallback-bc,oklch(var(--bc)/.5));transition:background,box-shadow var(--animation-input,.2s) ease-out;box-shadow:var(--handleoffsetcalculator) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset,var(--togglehandleborder)}.alert-info{border-color:var(--fallback-in,oklch(var(--in)/.2));--tw-text-opacity:1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)));--alert-bg:var(--fallback-in,oklch(var(--in)/1));--alert-bg-mix:var(--fallback-b1,oklch(var(--b1)/1))}.alert-success{border-color:var(--fallback-su,oklch(var(--su)/.2));--tw-text-opacity:1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));--alert-bg:var(--fallback-su,oklch(var(--su)/1));--alert-bg-mix:var(--fallback-b1,oklch(var(--b1)/1))}.alert-warning{border-color:var(--fallback-wa,oklch(var(--wa)/.2));--tw-text-opacity:1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));--alert-bg:var(--fallback-wa,oklch(var(--wa)/1));--alert-bg-mix:var(--fallback-b1,oklch(var(--b1)/1))}.alert-error{border-color:var(--fallback-er,oklch(var(--er)/.2));--tw-text-opacity:1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));--alert-bg:var(--fallback-er,oklch(var(--er)/1));--alert-bg-mix:var(--fallback-b1,oklch(var(--b1)/1))}.btm-nav>:where(.active){border-top-width:2px;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.btm-nav>.disabled,.btm-nav>[disabled]{pointer-events:none;--tw-border-opacity:0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity:0.1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity:0.2}.btm-nav>* .label{font-size:1rem;line-height:1.5rem}@media (prefers-reduced-motion:no-preference){.btn{animation:button-pop var(--animation-btn,.25s) ease-out}}.btn:active:focus,.btn:active:hover{animation:button-pop 0s ease-out;transform:scale(var(--btn-focus-scale,.97))}@supports not (color:oklch(0% 0 0)){.btn{background-color:var(--btn-color,var(--fallback-b2));border-color:var(--btn-color,var(--fallback-b2))}.btn-primary{--btn-color:var(--fallback-p)}.btn-info{--btn-color:var(--fallback-in)}.btn-success{--btn-color:var(--fallback-su)}.btn-error{--btn-color:var(--fallback-er)}}@supports (color:color-mix(in oklab,black,black)){.btn-outline.btn-primary.btn-active{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,#000)}.btn-outline.btn-secondary.btn-active{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,#000)}.btn-outline.btn-accent.btn-active{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,#000)}.btn-outline.btn-success.btn-active{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,#000)}.btn-outline.btn-info.btn-active{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,#000)}.btn-outline.btn-warning.btn-active{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,#000)}.btn-outline.btn-error.btn-active{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,#000)}}.btn:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px}.btn-primary{--tw-text-opacity:1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));outline-color:var(--fallback-p,oklch(var(--p)/1))}@supports (color:oklch(0% 0 0)){.btn-primary{--btn-color:var(--p)}.btn-info{--btn-color:var(--in)}.btn-success{--btn-color:var(--su)}.btn-error{--btn-color:var(--er)}}.btn-info{--tw-text-opacity:1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)));outline-color:var(--fallback-in,oklch(var(--in)/1))}.btn-success{--tw-text-opacity:1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));outline-color:var(--fallback-su,oklch(var(--su)/1))}.btn-error{--tw-text-opacity:1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}.btn.glass{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn.glass.btn-active{--glass-opacity:25%;--glass-border-opacity:15%}.btn-ghost{border-width:1px;border-color:transparent;background-color:transparent;color:currentColor;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn-ghost.btn-active{border-color:transparent;background-color:var(--fallback-bc,oklch(var(--bc)/.2))}.btn-outline{border-color:currentColor;background-color:transparent;--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.btn-outline.btn-active{--tw-border-opacity:1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}.btn-outline.btn-primary{--tw-text-opacity:1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.btn-outline.btn-primary.btn-active{--tw-text-opacity:1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn-outline.btn-secondary{--tw-text-opacity:1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}.btn-outline.btn-secondary.btn-active{--tw-text-opacity:1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}.btn-outline.btn-accent{--tw-text-opacity:1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}.btn-outline.btn-accent.btn-active{--tw-text-opacity:1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.btn-outline.btn-success{--tw-text-opacity:1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.btn-outline.btn-success.btn-active{--tw-text-opacity:1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.btn-outline.btn-info{--tw-text-opacity:1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}.btn-outline.btn-info.btn-active{--tw-text-opacity:1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.btn-outline.btn-warning{--tw-text-opacity:1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}.btn-outline.btn-warning.btn-active{--tw-text-opacity:1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.btn-outline.btn-error{--tw-text-opacity:1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btn-outline.btn-error.btn-active{--tw-text-opacity:1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.btn.btn-disabled,.btn:disabled,.btn[disabled]{--tw-border-opacity:0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity:0.2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity:0.2}.btn:is(input[type=checkbox]:checked),.btn:is(input[type=radio]:checked){--tw-border-opacity:1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn:is(input[type=checkbox]:checked):focus-visible,.btn:is(input[type=radio]:checked):focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}@keyframes button-pop{0%{transform:scale(var(--btn-focus-scale,.98))}40%{transform:scale(1.02)}to{transform:scale(1)}}.card :where(figure:first-child){overflow:hidden;border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-start-radius:unset;border-end-end-radius:unset}.card :where(figure:last-child){overflow:hidden;border-start-start-radius:unset;border-start-end-radius:unset;border-end-start-radius:inherit;border-end-end-radius:inherit}.card:focus-visible{outline:2px solid currentColor;outline-offset:2px}.card.bordered{border-width:1px;--tw-border-opacity:1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.card.compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-title{display:flex;align-items:center;gap:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:600}.card.image-full :where(figure){overflow:hidden;border-radius:inherit}.carousel::-webkit-scrollbar{display:none}.checkbox:focus{box-shadow:none}.checkbox:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.checkbox:disabled{border-width:0;cursor:not-allowed;border-color:transparent;--tw-bg-opacity:1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.2}.checkbox:checked,.checkbox[aria-checked=true]{background-repeat:no-repeat;animation:checkmark var(--animation-input,.2s) ease-out;background-color:var(--chkbg);background-image:linear-gradient(-45deg,transparent 65%,var(--chkbg) 65.99%),linear-gradient(45deg,transparent 75%,var(--chkbg) 75.99%),linear-gradient(-45deg,var(--chkbg) 40%,transparent 40.99%),linear-gradient(45deg,var(--chkbg) 30%,var(--chkfg) 30.99%,var(--chkfg) 40%,transparent 40.99%),linear-gradient(-45deg,var(--chkfg) 50%,var(--chkbg) 50.99%)}.checkbox:indeterminate{--tw-bg-opacity:1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-repeat:no-repeat;animation:checkmark var(--animation-input,.2s) ease-out;background-image:linear-gradient(90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(-90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(0deg,var(--chkbg) 43%,var(--chkfg) 43%,var(--chkfg) 57%,var(--chkbg) 57%)}@keyframes checkmark{0%{background-position-y:5px}50%{background-position-y:-2px}to{background-position-y:0}}details.collapse{width:100%}details.collapse summary{position:relative;display:block;outline:2px solid transparent;outline-offset:2px}details.collapse summary::-webkit-details-marker{display:none}.collapse:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.collapse:has(.collapse-title:focus-visible),.collapse:has(>input[type=checkbox]:focus-visible),.collapse:has(>input[type=radio]:focus-visible){outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.collapse:not(.collapse-open):not(.collapse-close)>.collapse-title,.collapse:not(.collapse-open):not(.collapse-close)>input[type=checkbox],.collapse:not(.collapse-open):not(.collapse-close)>input[type=radio]:not(:checked){cursor:pointer}.collapse:focus:not(.collapse-open):not(.collapse-close):not(.collapse[open])>.collapse-title{cursor:unset}.collapse-title,:where(.collapse>input[type=checkbox]),:where(.collapse>input[type=radio]){padding:1rem;padding-inline-end:3rem;min-height:3.75rem;transition:background-color .2s ease-out}.collapse-open>:where(.collapse-content),.collapse:focus:not(.collapse-close)>:where(.collapse-content),.collapse:not(.collapse-close)>:where(input[type=checkbox]:checked~.collapse-content),.collapse:not(.collapse-close)>:where(input[type=radio]:checked~.collapse-content),.collapse[open]>:where(.collapse-content){padding-bottom:1rem;transition:padding .2s ease-out,background-color .2s ease-out}.collapse-arrow:focus:not(.collapse-close)>.collapse-title:after,.collapse-arrow:not(.collapse-close)>input[type=checkbox]:checked~.collapse-title:after,.collapse-arrow:not(.collapse-close)>input[type=radio]:checked~.collapse-title:after,.collapse-open.collapse-arrow>.collapse-title:after,.collapse[open].collapse-arrow>.collapse-title:after{--tw-translate-y:-50%;--tw-rotate:225deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.collapse-open.collapse-plus>.collapse-title:after,.collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse-plus:not(.collapse-close)>input[type=checkbox]:checked~.collapse-title:after,.collapse-plus:not(.collapse-close)>input[type=radio]:checked~.collapse-title:after,.collapse[open].collapse-plus>.collapse-title:after{content:"−"}.divider:not(:empty){gap:1rem}.dropdown.dropdown-open .dropdown-content,.dropdown:focus .dropdown-content,.dropdown:focus-within .dropdown-content{--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.file-input-bordered{--tw-border-opacity:0.2}.file-input:focus{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.file-input-disabled,.file-input[disabled]{cursor:not-allowed;--tw-border-opacity:1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));--tw-text-opacity:0.2}.file-input-disabled::-moz-placeholder,.file-input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity:0.2}.file-input-disabled::placeholder,.file-input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity:0.2}.file-input-disabled::file-selector-button,.file-input[disabled]::file-selector-button{--tw-border-opacity:0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity:0.2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity:0.2}.\!input input{--tw-bg-opacity:1!important;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)))!important;background-color:transparent!important}.input input{--tw-bg-opacity:1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));background-color:transparent}.\!input input:focus{outline:2px solid transparent!important;outline-offset:2px!important}.input input:focus{outline:2px solid transparent;outline-offset:2px}.\!input[list]::-webkit-calendar-picker-indicator{line-height:1em!important}.input[list]::-webkit-calendar-picker-indicator{line-height:1em}.input-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input:focus,.input:focus-within{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.\!input:focus,.\!input:focus-within{box-shadow:none!important;border-color:var(--fallback-bc,oklch(var(--bc)/.2))!important;outline-style:solid!important;outline-width:2px!important;outline-offset:2px!important;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))!important}.input-disabled,.input:disabled,.input:has(>input[disabled]),.input[disabled]{cursor:not-allowed;--tw-border-opacity:1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.\!input:disabled,.\!input:has(>input[disabled]),.\!input[disabled]{cursor:not-allowed!important;--tw-border-opacity:1!important;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))!important;--tw-bg-opacity:1!important;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))!important;color:var(--fallback-bc,oklch(var(--bc)/.4))!important}.input-disabled::-moz-placeholder,.input:disabled::-moz-placeholder,.input:has(>input[disabled])::-moz-placeholder,.input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity:0.2}.input-disabled::placeholder,.input:disabled::placeholder,.input:has(>input[disabled])::placeholder,.input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity:0.2}.\!input:disabled::-moz-placeholder,.\!input:has(>input[disabled])::-moz-placeholder,.\!input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)))!important;--tw-placeholder-opacity:0.2!important}.\!input:disabled::placeholder,.\!input:has(>input[disabled])::placeholder,.\!input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)))!important;--tw-placeholder-opacity:0.2!important}.\!input:has(>input[disabled])>input[disabled]{cursor:not-allowed!important}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.\!input::-webkit-date-and-time-value{text-align:inherit!important}.input::-webkit-date-and-time-value{text-align:inherit}.join>:where(:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join>:where(:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn)*-1)}.join-item:focus{isolation:isolate}.link:focus{outline:2px solid transparent;outline-offset:2px}.link:focus-visible{outline:2px solid currentColor;outline-offset:2px}.loading{pointer-events:none;display:inline-block;aspect-ratio:1/1;width:1.5rem;background-color:currentColor;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' stroke='%23000'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-linecap='round' stroke-width='3'%3E%3CanimateTransform attributeName='transform' dur='2s' from='0 12 12' repeatCount='indefinite' to='360 12 12' type='rotate'/%3E%3Canimate attributeName='stroke-dasharray' dur='1.5s' keyTimes='0;0.475;1' repeatCount='indefinite' values='0,150;42,150;42,150'/%3E%3Canimate attributeName='stroke-dashoffset' dur='1.5s' keyTimes='0;0.475;1' repeatCount='indefinite' values='0;-16;-59'/%3E%3C/circle%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' stroke='%23000'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-linecap='round' stroke-width='3'%3E%3CanimateTransform attributeName='transform' dur='2s' from='0 12 12' repeatCount='indefinite' to='360 12 12' type='rotate'/%3E%3Canimate attributeName='stroke-dasharray' dur='1.5s' keyTimes='0;0.475;1' repeatCount='indefinite' values='0,150;42,150;42,150'/%3E%3Canimate attributeName='stroke-dashoffset' dur='1.5s' keyTimes='0;0.475;1' repeatCount='indefinite' values='0;-16;-59'/%3E%3C/circle%3E%3C/svg%3E")}:where(.menu li:empty){--tw-bg-opacity:1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;margin:.5rem 1rem;height:1px}.menu :where(li ul):before{position:absolute;bottom:.75rem;inset-inline-start:0;top:.75rem;width:1px;--tw-bg-opacity:1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;content:""}.menu :where(li:not(.menu-title)>:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--rounded-btn,.5rem);padding:.5rem 1rem;text-align:start;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;text-wrap:balance}:where(.menu li:not(.menu-title,.disabled)>:not(ul,details,.menu-title)):is(summary):not(.active,.btn):focus-visible,:where(.menu li:not(.menu-title,.disabled)>:not(ul,details,.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>:not(ul,details,.menu-title)):not(summary,.active,.btn):focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):is(summary):not(.active,.btn):focus-visible,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn):focus{cursor:pointer;background-color:var(--fallback-bc,oklch(var(--bc)/.1));--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));outline:2px solid transparent;outline-offset:2px}.menu li>:not(ul,.menu-title,details,.btn).active,.menu li>:not(ul,.menu-title,details,.btn):active,.menu li>details>summary:active{--tw-bg-opacity:1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.menu :where(li>details>summary)::-webkit-details-marker{display:none}.menu :where(li>.menu-dropdown-toggle):after,.menu :where(li>details>summary):after{justify-self:end;display:block;margin-top:-.5rem;height:.5rem;width:.5rem;transform:rotate(45deg);transition-property:transform,margin-top;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);content:"";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after,.menu :where(li>details[open]>summary):after{transform:rotate(225deg);margin-top:0}.mockup-phone .display{overflow:hidden;border-radius:40px;margin-top:-25px}.mockup-browser .mockup-browser-toolbar .\!input{position:relative!important;margin-left:auto!important;margin-right:auto!important;display:block!important;height:1.75rem!important;width:24rem!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;--tw-bg-opacity:1!important;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))!important;padding-left:2rem!important;direction:ltr!important}.mockup-browser .mockup-browser-toolbar .input{position:relative;margin-left:auto;margin-right:auto;display:block;height:1.75rem;width:24rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding-left:2rem;direction:ltr}.mockup-browser .mockup-browser-toolbar .\!input:before{content:""!important;position:absolute!important;left:.5rem!important;top:50%!important;aspect-ratio:1/1!important;height:.75rem!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important;border-radius:9999px!important;border-width:2px!important;border-color:currentColor!important;opacity:.6!important}.mockup-browser .mockup-browser-toolbar .input:before{content:"";position:absolute;left:.5rem;top:50%;aspect-ratio:1/1;height:.75rem;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:2px;border-color:currentColor;opacity:.6}.mockup-browser .mockup-browser-toolbar .\!input:after{content:""!important;position:absolute!important;left:1.25rem!important;top:50%!important;height:.5rem!important;--tw-translate-y:25%!important;--tw-rotate:-45deg!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important;border-radius:9999px!important;border-width:1px!important;border-color:currentColor!important;opacity:.6!important}.mockup-browser .mockup-browser-toolbar .input:after{content:"";position:absolute;left:1.25rem;top:50%;height:.5rem;--tw-translate-y:25%;--tw-rotate:-45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:1px;border-color:currentColor;opacity:.6}.modal::backdrop,.modal:not(dialog:not(.modal-open)){background-color:#0006;animation:modal-pop .2s ease-out}.modal-backdrop{z-index:-1;grid-column-start:1;grid-row-start:1;display:grid;align-self:stretch;justify-self:stretch;color:transparent}.modal-open .modal-box,.modal-toggle:checked+.modal .modal-box,.modal:target .modal-box,.modal[open] .modal-box{--tw-translate-y:0px;--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes modal-pop{0%{opacity:0}}.progress::-moz-progress-bar{border-radius:var(--rounded-box,1rem);background-color:currentColor}.progress-primary::-moz-progress-bar{border-radius:var(--rounded-box,1rem);--tw-bg-opacity:1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)))}.progress:indeterminate{--progress-color:var(--fallback-bc,oklch(var(--bc)/1));background-image:repeating-linear-gradient(90deg,var(--progress-color) -1%,var(--progress-color) 10%,transparent 10%,transparent 90%);background-size:200%;background-position-x:15%;animation:progress-loading 5s ease-in-out infinite}.progress-primary:indeterminate{--progress-color:var(--fallback-p,oklch(var(--p)/1))}.progress::-webkit-progress-bar{border-radius:var(--rounded-box,1rem);background-color:transparent}.progress::-webkit-progress-value{border-radius:var(--rounded-box,1rem);background-color:currentColor}.progress-primary::-webkit-progress-value{--tw-bg-opacity:1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)))}.progress:indeterminate::-moz-progress-bar{background-color:transparent;background-image:repeating-linear-gradient(90deg,var(--progress-color) -1%,var(--progress-color) 10%,transparent 10%,transparent 90%);background-size:200%;background-position-x:15%;animation:progress-loading 5s ease-in-out infinite}@keyframes progress-loading{50%{background-position-x:-115%}}.radio:focus{box-shadow:none}.radio:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.radio:checked,.radio[aria-checked=true]{--tw-bg-opacity:1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-image:none;animation:radiomark var(--animation-input,.2s) ease-out;box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}.radio:disabled{cursor:not-allowed;opacity:.2}@keyframes radiomark{0%{box-shadow:0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset}50%{box-shadow:0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset}to{box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}}.range:focus-visible::-webkit-slider-thumb{--focus-shadow:0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 2rem var(--range-shdw) inset}.range:focus-visible::-moz-range-thumb{--focus-shadow:0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 2rem var(--range-shdw) inset}.range::-webkit-slider-runnable-track{height:.5rem;width:100%;border-radius:var(--rounded-box,1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-moz-range-track{height:.5rem;width:100%;border-radius:var(--rounded-box,1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-webkit-slider-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box,1rem);border-style:none;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));appearance:none;-webkit-appearance:none;top:50%;color:var(--range-shdw);transform:translateY(-50%);--filler-size:100rem;--filler-offset:0.6rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow,0 0),calc(var(--filler-size)*-1 - var(--filler-offset)) 0 0 var(--filler-size)}.range::-moz-range-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box,1rem);border-style:none;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));top:50%;color:var(--range-shdw);--filler-size:100rem;--filler-offset:0.5rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow,0 0),calc(var(--filler-size)*-1 - var(--filler-offset)) 0 0 var(--filler-size)}@keyframes rating-pop{0%{transform:translateY(-.125em)}40%{transform:translateY(-.125em)}to{transform:translateY(0)}}.select:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select-disabled,.select:disabled,.select[disabled]{cursor:not-allowed;--tw-border-opacity:1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.select-disabled::-moz-placeholder,.select:disabled::-moz-placeholder,.select[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity:0.2}.select-disabled::placeholder,.select:disabled::placeholder,.select[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity:0.2}.select-multiple,.select[multiple],.select[size].select:not([size="1"]){background-image:none;padding-right:1rem}[dir=rtl] .select{background-position:12px calc(1px + 50%),16px calc(1px + 50%)}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}.steps .step:before{top:0;height:.5rem;width:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));content:"";margin-inline-start:-100%}.steps .step:after,.steps .step:before{grid-column-start:1;grid-row-start:1;--tw-bg-opacity:1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));--tw-text-opacity:1}.steps .step:after{content:counter(step);counter-increment:step;z-index:1;position:relative;display:grid;height:2rem;width:2rem;place-items:center;place-self:center;border-radius:9999px;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.steps .step:first-child:before{content:none}.steps .step[data-content]:after{content:attr(data-content)}.steps .step-neutral+.step-neutral:before,.steps .step-neutral:after{--tw-bg-opacity:1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.steps .step-primary+.step-primary:before,.steps .step-primary:after{--tw-bg-opacity:1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.steps .step-secondary+.step-secondary:before,.steps .step-secondary:after{--tw-bg-opacity:1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}.steps .step-accent+.step-accent:before,.steps .step-accent:after{--tw-bg-opacity:1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.steps .step-info+.step-info:before,.steps .step-info:after{--tw-bg-opacity:1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)))}.steps .step-info:after{--tw-text-opacity:1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.steps .step-success+.step-success:before,.steps .step-success:after{--tw-bg-opacity:1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)))}.steps .step-success:after{--tw-text-opacity:1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.steps .step-warning+.step-warning:before,.steps .step-warning:after{--tw-bg-opacity:1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)))}.steps .step-warning:after{--tw-text-opacity:1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.steps .step-error+.step-error:before,.steps .step-error:after{--tw-bg-opacity:1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)))}.steps .step-error:after{--tw-text-opacity:1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.swap-rotate .swap-indeterminate,.swap-rotate .swap-on,.swap-rotate input:indeterminate~.swap-on{--tw-rotate:45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.swap-active:where(.swap-rotate) .swap-off,.swap-rotate input:checked~.swap-off,.swap-rotate input:indeterminate~.swap-off{--tw-rotate:-45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.swap-active:where(.swap-rotate) .swap-on,.swap-rotate input:checked~.swap-on,.swap-rotate input:indeterminate~.swap-indeterminate{--tw-rotate:0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.swap-flip .swap-indeterminate,.swap-flip .swap-on,.swap-flip input:indeterminate~.swap-on{transform:rotateY(180deg);backface-visibility:hidden;opacity:1}.swap-active:where(.swap-flip) .swap-off,.swap-flip input:checked~.swap-off,.swap-flip input:indeterminate~.swap-off{transform:rotateY(-180deg);backface-visibility:hidden;opacity:1}.swap-active:where(.swap-flip) .swap-on,.swap-flip input:checked~.swap-on,.swap-flip input:indeterminate~.swap-indeterminate{transform:rotateY(0deg)}.tabs-lifted>.tab:focus-visible{border-end-end-radius:0;border-end-start-radius:0}.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tab:is(input:checked){border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity:1;--tw-text-opacity:1}.tab:focus{outline:2px solid transparent;outline-offset:2px}.tab:focus-visible{outline:2px solid currentColor;outline-offset:-5px}.tab-disabled,.tab[disabled]{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity:0.2}.tabs-bordered>.tab{border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity:0.2;border-style:solid;border-bottom-width:calc(var(--tab-border, 1px) + 1px)}.tabs-lifted>.tab{border:var(--tab-border,1px) solid transparent;border-width:0 0 var(--tab-border,1px) 0;border-start-start-radius:var(--tab-radius,.5rem);border-start-end-radius:var(--tab-radius,.5rem);border-bottom-color:var(--tab-border-color);padding-inline-start:var(--tab-padding,1rem);padding-inline-end:var(--tab-padding,1rem);padding-top:var(--tab-border,1px)}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tabs-lifted>.tab:is(input:checked){background-color:var(--tab-bg);border-width:var(--tab-border,1px) var(--tab-border,1px) 0 var(--tab-border,1px);border-inline-start-color:var(--tab-border-color);border-inline-end-color:var(--tab-border-color);border-top-color:var(--tab-border-color);padding-inline-start:calc(var(--tab-padding, 1rem) - var(--tab-border, 1px));padding-inline-end:calc(var(--tab-padding, 1rem) - var(--tab-border, 1px));padding-bottom:var(--tab-border,1px);padding-top:0}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before,.tabs-lifted>.tab:is(input:checked):before{z-index:1;content:"";display:block;position:absolute;width:calc(100% + var(--tab-radius, .5rem)*2);height:var(--tab-radius,.5rem);bottom:0;background-size:var(--tab-radius,.5rem);background-position:0 0,100% 0;background-repeat:no-repeat;--tab-grad:calc(69% - var(--tab-border, 1px));--radius-start:radial-gradient(circle at top left,transparent var(--tab-grad),var(--tab-border-color) calc(var(--tab-grad) + 0.25px),var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)),var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + 0.25px));--radius-end:radial-gradient(circle at top right,transparent var(--tab-grad),var(--tab-border-color) calc(var(--tab-grad) + 0.25px),var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)),var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + 0.25px));background-image:var(--radius-start),var(--radius-end)}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,.tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-end);background-position:100% 0}[dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,[dir=rtl] .tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-start);background-position:0 0}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,.tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-start);background-position:0 0}[dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,[dir=rtl] .tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-end);background-position:100% 0}.tabs-lifted>.tab:is(input:checked)+.tabs-lifted .tab:is(input:checked):before,.tabs-lifted>:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled])+.tabs-lifted :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before{background-image:var(--radius-end);background-position:100% 0}.tabs-boxed{--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding:.25rem}.tabs-boxed,.tabs-boxed .tab{border-radius:var(--rounded-btn,.5rem)}.tabs-boxed :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tabs-boxed :is(input:checked){--tw-bg-opacity:1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.table:where([dir=rtl],[dir=rtl] *){text-align:right}.table :where(th,td){padding:.75rem 1rem;vertical-align:middle}.table tr.active,.table tr.active:nth-child(2n),.table-zebra tbody tr:nth-child(2n){--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.active,.table-zebra tr.active:nth-child(2n),.table-zebra-zebra tbody tr:nth-child(2n){--tw-bg-opacity:1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}.table :where(thead tr,tbody tr:not(:last-child),tbody tr:first-child:last-child){border-bottom-width:1px;--tw-border-opacity:1;border-bottom-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.table :where(thead,tfoot){white-space:nowrap;font-size:.75rem;line-height:1rem;font-weight:700;color:var(--fallback-bc,oklch(var(--bc)/.6))}.table :where(tfoot){border-top-width:1px;--tw-border-opacity:1;border-top-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.textarea-bordered,.textarea:focus{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea:focus{box-shadow:none;outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea-disabled,.textarea:disabled,.textarea[disabled]{cursor:not-allowed;--tw-border-opacity:1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.textarea-disabled::-moz-placeholder,.textarea:disabled::-moz-placeholder,.textarea[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity:0.2}.textarea-disabled::placeholder,.textarea:disabled::placeholder,.textarea[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity:0.2}.timeline hr{height:.25rem}:where(.timeline hr){--tw-bg-opacity:1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}:where(.timeline:has(.timeline-middle) hr):first-child{border-start-end-radius:var(--rounded-badge,1.9rem);border-end-end-radius:var(--rounded-badge,1.9rem);border-start-start-radius:0;border-end-start-radius:0}:where(.timeline:has(.timeline-middle) hr):last-child{border-start-start-radius:var(--rounded-badge,1.9rem);border-end-start-radius:var(--rounded-badge,1.9rem);border-start-end-radius:0;border-end-end-radius:0}:where(.timeline:not(:has(.timeline-middle)) :first-child hr:last-child){border-start-start-radius:var(--rounded-badge,1.9rem);border-end-start-radius:var(--rounded-badge,1.9rem);border-start-end-radius:0;border-end-end-radius:0}:where(.timeline:not(:has(.timeline-middle)) :last-child hr:first-child){border-start-end-radius:var(--rounded-badge,1.9rem);border-end-end-radius:var(--rounded-badge,1.9rem);border-start-start-radius:0;border-end-start-radius:0}@keyframes toast-pop{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}[dir=rtl] .\!toggle{--handleoffsetcalculator:calc(var(--handleoffset)*1)!important}[dir=rtl] .toggle{--handleoffsetcalculator:calc(var(--handleoffset)*1)}.\!toggle:focus-visible{outline-style:solid!important;outline-width:2px!important;outline-offset:2px!important;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))!important}.toggle:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.\!toggle:hover{background-color:currentColor!important}.toggle:hover{background-color:currentColor}.toggle:checked,.toggle[aria-checked=true]{background-image:none;--handleoffsetcalculator:var(--handleoffset);--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.\!toggle:checked,.\!toggle[aria-checked=true]{background-image:none!important;--handleoffsetcalculator:var(--handleoffset)!important;--tw-text-opacity:1!important;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))!important}[dir=rtl] .toggle:checked,[dir=rtl] .toggle[aria-checked=true]{--handleoffsetcalculator:calc(var(--handleoffset)*-1)}[dir=rtl] .\!toggle:checked,[dir=rtl] .\!toggle[aria-checked=true]{--handleoffsetcalculator:calc(var(--handleoffset)*-1)!important}.\!toggle:indeterminate{--tw-text-opacity:1!important;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))!important;box-shadow:calc(var(--handleoffset)/2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset)/-2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset!important}.toggle:indeterminate{--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));box-shadow:calc(var(--handleoffset)/2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset)/-2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}[dir=rtl] .\!toggle:indeterminate{box-shadow:calc(var(--handleoffset)/2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset)/-2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset!important}[dir=rtl] .toggle:indeterminate{box-shadow:calc(var(--handleoffset)/2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset)/-2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}.\!toggle:disabled{cursor:not-allowed!important;--tw-border-opacity:1!important;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)))!important;background-color:transparent!important;opacity:.3!important;--togglehandleborder:0 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset,var(--handleoffsetcalculator) 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset!important}.toggle:disabled{cursor:not-allowed;--tw-border-opacity:1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));background-color:transparent;opacity:.3;--togglehandleborder:0 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset,var(--handleoffsetcalculator) 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset}.artboard.phone-1.artboard-horizontal,.artboard.phone-1.horizontal{width:568px;height:320px}.artboard.phone-2.artboard-horizontal,.artboard.phone-2.horizontal{width:667px;height:375px}.artboard.phone-3.artboard-horizontal,.artboard.phone-3.horizontal{width:736px;height:414px}.artboard.phone-4.artboard-horizontal,.artboard.phone-4.horizontal{width:812px;height:375px}.artboard.phone-5.artboard-horizontal,.artboard.phone-5.horizontal{width:896px;height:414px}.artboard.phone-6.artboard-horizontal,.artboard.phone-6.horizontal{width:1024px;height:320px}.btm-nav-xs>:where(.active){border-top-width:1px}.btm-nav-sm>:where(.active){border-top-width:2px}.btm-nav-md>:where(.active){border-top-width:2px}.btm-nav-lg>:where(.active){border-top-width:4px}.btn-sm{height:2rem;min-height:2rem;padding-left:.75rem;padding-right:.75rem;font-size:.875rem}.btn-lg{height:4rem;min-height:4rem;padding-left:1.5rem;padding-right:1.5rem;font-size:1.125rem}.btn-square:where(.btn-xs){height:1.5rem;width:1.5rem;padding:0}.btn-square:where(.btn-sm){height:2rem;width:2rem;padding:0}.btn-square:where(.btn-md){height:3rem;width:3rem;padding:0}.btn-square:where(.btn-lg){height:4rem;width:4rem;padding:0}.btn-circle:where(.btn-xs){height:1.5rem;width:1.5rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-sm){height:2rem;width:2rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-md){height:3rem;width:3rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-lg){height:4rem;width:4rem;border-radius:9999px;padding:0}.join.join-vertical{flex-direction:column}.join.join-vertical .join-item:first-child:not(:last-child),.join.join-vertical :first-child:not(:last-child) .join-item{border-end-start-radius:0;border-end-end-radius:0;border-start-start-radius:inherit;border-start-end-radius:inherit}.join.join-vertical .join-item:last-child:not(:first-child),.join.join-vertical :last-child:not(:first-child) .join-item{border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:inherit}.join.join-horizontal{flex-direction:row}.join.join-horizontal .join-item:first-child:not(:last-child),.join.join-horizontal :first-child:not(:last-child) .join-item{border-end-end-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-start-start-radius:inherit}.join.join-horizontal .join-item:last-child:not(:first-child),.join.join-horizontal :last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0;border-end-end-radius:inherit;border-start-end-radius:inherit}.menu-horizontal{display:inline-flex;flex-direction:row}.menu-horizontal>li:not(.menu-title)>details>ul{position:absolute}.steps-horizontal .step{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));place-items:center;text-align:center}.steps-vertical .step{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(1,minmax(0,1fr))}.tabs-md :where(.tab){height:2rem;font-size:.875rem;line-height:1.25rem;line-height:2;--tab-padding:1rem}.tabs-lg :where(.tab){height:3rem;font-size:1.125rem;line-height:1.75rem;line-height:2;--tab-padding:1.25rem}.tabs-sm :where(.tab){height:1.5rem;font-size:.875rem;line-height:.75rem;--tab-padding:0.75rem}.tabs-xs :where(.tab){height:1.25rem;font-size:.75rem;line-height:.75rem;--tab-padding:0.5rem}.tooltip{--tooltip-offset:calc(100% + 1px + var(--tooltip-tail, 0px))}.tooltip:before{position:absolute;pointer-events:none;z-index:1;content:var(--tw-content);--tw-content:attr(data-tip)}.tooltip-top:before,.tooltip:before{transform:translateX(-50%);top:auto;left:50%;right:auto;bottom:var(--tooltip-offset)}.card-compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-compact .card-title{margin-bottom:.25rem}.card-normal .card-body{padding:var(--padding-card,2rem);font-size:1rem;line-height:1.5rem}.card-normal .card-title{margin-bottom:.75rem}.join.join-vertical>:where(:not(:first-child)){margin-left:0;margin-right:0;margin-top:-1px}.join.join-vertical>:where(:not(:first-child)):is(.btn){margin-top:calc(var(--border-btn)*-1)}.join.join-horizontal>:where(:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join.join-horizontal>:where(:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn)*-1);margin-top:0}.menu-horizontal>li:not(.menu-title)>details>ul{margin-inline-start:0;margin-top:1rem;padding-top:.5rem;padding-bottom:.5rem;padding-inline-end:.5rem}.menu-horizontal>li>details>ul:before{content:none}:where(.menu-horizontal>li:not(.menu-title)>details>ul){border-radius:var(--rounded-box,1rem);--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.steps-horizontal .step{grid-template-rows:40px 1fr;grid-template-columns:auto;min-width:4rem}.steps-horizontal .step:before{height:.5rem;width:100%;--tw-translate-x:0px;--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));content:"";margin-inline-start:-100%}.steps-horizontal .step:where([dir=rtl],[dir=rtl] *):before{--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.steps-vertical .step{gap:.5rem;grid-template-columns:40px 1fr;grid-template-rows:auto;min-height:4rem;justify-items:start}.steps-vertical .step:before{height:100%;width:.5rem;--tw-translate-x:-50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));margin-inline-start:50%}.steps-vertical .step:where([dir=rtl],[dir=rtl] *):before{--tw-translate-x:50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.tooltip{position:relative;display:inline-block;text-align:center;--tooltip-tail:0.1875rem;--tooltip-color:var(--fallback-n,oklch(var(--n)/1));--tooltip-text-color:var(--fallback-nc,oklch(var(--nc)/1));--tooltip-tail-offset:calc(100% + 0.0625rem - var(--tooltip-tail))}.tooltip:after,.tooltip:before{opacity:0;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-delay:.1s;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.tooltip:after{position:absolute;content:"";border-style:solid;border-width:var(--tooltip-tail,0);width:0;height:0;display:block}.tooltip:before{max-width:20rem;white-space:normal;border-radius:.25rem;padding:.25rem .5rem;font-size:.875rem;line-height:1.25rem;background-color:var(--tooltip-color);color:var(--tooltip-text-color);width:-moz-max-content;width:max-content}.tooltip.tooltip-open:after,.tooltip.tooltip-open:before,.tooltip:hover:after,.tooltip:hover:before{opacity:1;transition-delay:75ms}.tooltip:has(:focus-visible):after,.tooltip:has(:focus-visible):before{opacity:1;transition-delay:75ms}.tooltip:not([data-tip]):hover:after,.tooltip:not([data-tip]):hover:before{visibility:hidden;opacity:0}.tooltip-top:after,.tooltip:after{transform:translateX(-50%);border-color:var(--tooltip-color) transparent transparent transparent;top:auto;left:50%;right:auto;bottom:var(--tooltip-tail-offset)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.\!visible{visibility:visible!important}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.z-40{z-index:40}.mx-auto{margin-left:auto;margin-right:auto}.mb-3{margin-bottom:.75rem}.ml-auto{margin-left:auto}.mt-16{margin-top:4rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-10{height:2.5rem}.h-3\.5{height:.875rem}.h-5{height:1.25rem}.h-7{height:1.75rem}.h-auto{height:auto}.min-h-0{min-height:0}.min-h-80{min-height:20rem}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-3\.5{width:.875rem}.w-5{width:1.25rem}.w-7{width:1.75rem}.w-auto{width:auto}.w-full{width:100%}.min-w-max{min-width:-moz-max-content;min-width:max-content}.max-w-32{max-width:8rem}.max-w-3xl{max-width:48rem}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-screen-2xl{max-width:1536px}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.overflow-x-auto{overflow-x:auto}.rounded-box{border-radius:var(--rounded-box,1rem)}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-base-300{--tw-border-opacity:1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity,1)))}.border-info\/30{border-color:var(--fallback-in,oklch(var(--in)/.3))}.bg-base-100{--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity,1)))}.bg-base-100\/80{background-color:var(--fallback-b1,oklch(var(--b1)/.8))}.bg-base-100\/90{background-color:var(--fallback-b1,oklch(var(--b1)/.9))}.bg-base-200{--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity,1)))}.bg-info\/10{background-color:var(--fallback-in,oklch(var(--in)/.1))}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-12{padding-bottom:3rem}.pb-4{padding-bottom:1rem}.pt-6{padding-top:1.5rem}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\[10px\]{font-size:10px}.text-sm{font-size:.875rem;line-height:1.25rem}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-tight{line-height:1.25}.tracking-\[0\.25em\]{letter-spacing:.25em}.tracking-wide{letter-spacing:.025em}.text-base-content{--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity,1)))}.text-base-content\/60{color:var(--fallback-bc,oklch(var(--bc)/.6))}.text-base-content\/70{color:var(--fallback-bc,oklch(var(--bc)/.7))}.text-current{color:currentColor}.text-info-content{--tw-text-opacity:1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity,1)))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.opacity-80{opacity:.8}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}@media (min-width:640px){.sm\:w-72{width:18rem}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:768px){.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-4{height:1rem}.md\:h-8{height:2rem}.md\:w-4{width:1rem}.md\:w-8{width:2rem}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:gap-3{gap:.75rem}.md\:self-auto{align-self:auto}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:text-base{font-size:1rem;line-height:1.5rem}.md\:text-xs{font-size:.75rem;line-height:1rem}}@media (min-width:1024px){.lg\:w-1\/4{width:25%}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1280px){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-\[minmax\(0\2c 1fr\)_minmax\(0\2c 1fr\)\]{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}} \ No newline at end of file + )}.timeline>li>hr{width:100%;border-width:0}:where(.timeline>li>hr):first-child{grid-column-start:1;grid-row-start:2}:where(.timeline>li>hr):last-child{grid-column-start:3;grid-column-end:none;grid-row-start:2;grid-row-end:auto}.\!toggle{flex-shrink:0!important;--tglbg:var(--fallback-b1,oklch(var(--b1)/1))!important;--handleoffset:1.5rem!important;--handleoffsetcalculator:calc(var(--handleoffset)*-1)!important;--togglehandleborder:0 0!important;height:1.5rem!important;width:3rem!important;cursor:pointer!important;-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;border-radius:var(--rounded-badge,1.9rem)!important;border-width:1px!important;border-color:currentColor!important;background-color:currentColor!important;color:var(--fallback-bc,oklch(var(--bc)/.5))!important;transition:background,box-shadow var(--animation-input,.2s) ease-out!important;box-shadow:var(--handleoffsetcalculator) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset,var(--togglehandleborder)!important}.toggle{flex-shrink:0;--tglbg:var(--fallback-b1,oklch(var(--b1)/1));--handleoffset:1.5rem;--handleoffsetcalculator:calc(var(--handleoffset)*-1);--togglehandleborder:0 0;height:1.5rem;width:3rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-badge,1.9rem);border-width:1px;border-color:currentColor;background-color:currentColor;color:var(--fallback-bc,oklch(var(--bc)/.5));transition:background,box-shadow var(--animation-input,.2s) ease-out;box-shadow:var(--handleoffsetcalculator) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset,var(--togglehandleborder)}.alert-info{border-color:var(--fallback-in,oklch(var(--in)/.2));--tw-text-opacity:1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)));--alert-bg:var(--fallback-in,oklch(var(--in)/1));--alert-bg-mix:var(--fallback-b1,oklch(var(--b1)/1))}.alert-success{border-color:var(--fallback-su,oklch(var(--su)/.2));--tw-text-opacity:1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));--alert-bg:var(--fallback-su,oklch(var(--su)/1));--alert-bg-mix:var(--fallback-b1,oklch(var(--b1)/1))}.alert-warning{border-color:var(--fallback-wa,oklch(var(--wa)/.2));--tw-text-opacity:1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));--alert-bg:var(--fallback-wa,oklch(var(--wa)/1));--alert-bg-mix:var(--fallback-b1,oklch(var(--b1)/1))}.alert-error{border-color:var(--fallback-er,oklch(var(--er)/.2));--tw-text-opacity:1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));--alert-bg:var(--fallback-er,oklch(var(--er)/1));--alert-bg-mix:var(--fallback-b1,oklch(var(--b1)/1))}.badge-neutral{--tw-border-opacity:1;border-color:var(--fallback-n,oklch(var(--n)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.badge-success{background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.badge-success,.badge-warning{border-color:transparent;--tw-bg-opacity:1;--tw-text-opacity:1}.badge-warning{background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.badge-error{border-color:transparent;--tw-bg-opacity:1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.badge-outline.badge-neutral{--tw-text-opacity:1;color:var(--fallback-n,oklch(var(--n)/var(--tw-text-opacity)))}.badge-outline.badge-success{--tw-text-opacity:1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.badge-outline.badge-warning{--tw-text-opacity:1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}.badge-outline.badge-error{--tw-text-opacity:1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btm-nav>:where(.active){border-top-width:2px;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.btm-nav>.disabled,.btm-nav>[disabled]{pointer-events:none;--tw-border-opacity:0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity:0.1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity:0.2}.btm-nav>* .\!label{font-size:1rem!important;line-height:1.5rem!important}.btm-nav>* .label{font-size:1rem;line-height:1.5rem}@media (prefers-reduced-motion:no-preference){.btn{animation:button-pop var(--animation-btn,.25s) ease-out}}.btn:active:focus,.btn:active:hover{animation:button-pop 0s ease-out;transform:scale(var(--btn-focus-scale,.97))}@supports not (color:oklch(0% 0 0)){.btn{background-color:var(--btn-color,var(--fallback-b2));border-color:var(--btn-color,var(--fallback-b2))}.btn-primary{--btn-color:var(--fallback-p)}.btn-info{--btn-color:var(--fallback-in)}.btn-success{--btn-color:var(--fallback-su)}.btn-error{--btn-color:var(--fallback-er)}}@supports (color:color-mix(in oklab,black,black)){.btn-outline.btn-primary.btn-active{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,#000)}.btn-outline.btn-secondary.btn-active{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,#000)}.btn-outline.btn-accent.btn-active{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,#000)}.btn-outline.btn-success.btn-active{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,#000)}.btn-outline.btn-info.btn-active{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,#000)}.btn-outline.btn-warning.btn-active{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,#000)}.btn-outline.btn-error.btn-active{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,#000);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,#000)}}.btn:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px}.btn-primary{--tw-text-opacity:1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));outline-color:var(--fallback-p,oklch(var(--p)/1))}@supports (color:oklch(0% 0 0)){.btn-primary{--btn-color:var(--p)}.btn-info{--btn-color:var(--in)}.btn-success{--btn-color:var(--su)}.btn-error{--btn-color:var(--er)}}.btn-info{--tw-text-opacity:1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)));outline-color:var(--fallback-in,oklch(var(--in)/1))}.btn-success{--tw-text-opacity:1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));outline-color:var(--fallback-su,oklch(var(--su)/1))}.btn-error{--tw-text-opacity:1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}.btn.glass{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn.glass.btn-active{--glass-opacity:25%;--glass-border-opacity:15%}.btn-ghost{border-width:1px;border-color:transparent;background-color:transparent;color:currentColor;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn-ghost.btn-active{border-color:transparent;background-color:var(--fallback-bc,oklch(var(--bc)/.2))}.btn-outline{border-color:currentColor;background-color:transparent;--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.btn-outline.btn-active{--tw-border-opacity:1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}.btn-outline.btn-primary{--tw-text-opacity:1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.btn-outline.btn-primary.btn-active{--tw-text-opacity:1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn-outline.btn-secondary{--tw-text-opacity:1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}.btn-outline.btn-secondary.btn-active{--tw-text-opacity:1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}.btn-outline.btn-accent{--tw-text-opacity:1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}.btn-outline.btn-accent.btn-active{--tw-text-opacity:1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.btn-outline.btn-success{--tw-text-opacity:1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.btn-outline.btn-success.btn-active{--tw-text-opacity:1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.btn-outline.btn-info{--tw-text-opacity:1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}.btn-outline.btn-info.btn-active{--tw-text-opacity:1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.btn-outline.btn-warning{--tw-text-opacity:1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}.btn-outline.btn-warning.btn-active{--tw-text-opacity:1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.btn-outline.btn-error{--tw-text-opacity:1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btn-outline.btn-error.btn-active{--tw-text-opacity:1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.btn.btn-disabled,.btn:disabled,.btn[disabled]{--tw-border-opacity:0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity:0.2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity:0.2}.btn:is(input[type=checkbox]:checked),.btn:is(input[type=radio]:checked){--tw-border-opacity:1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn:is(input[type=checkbox]:checked):focus-visible,.btn:is(input[type=radio]:checked):focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}@keyframes button-pop{0%{transform:scale(var(--btn-focus-scale,.98))}40%{transform:scale(1.02)}to{transform:scale(1)}}.card :where(figure:first-child){overflow:hidden;border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-start-radius:unset;border-end-end-radius:unset}.card :where(figure:last-child){overflow:hidden;border-start-start-radius:unset;border-start-end-radius:unset;border-end-start-radius:inherit;border-end-end-radius:inherit}.card:focus-visible{outline:2px solid currentColor;outline-offset:2px}.card.bordered{border-width:1px;--tw-border-opacity:1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.card.compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-title{display:flex;align-items:center;gap:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:600}.card.image-full :where(figure){overflow:hidden;border-radius:inherit}.carousel::-webkit-scrollbar{display:none}.checkbox:focus{box-shadow:none}.checkbox:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.checkbox:disabled{border-width:0;cursor:not-allowed;border-color:transparent;--tw-bg-opacity:1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.2}.checkbox:checked,.checkbox[aria-checked=true]{background-repeat:no-repeat;animation:checkmark var(--animation-input,.2s) ease-out;background-color:var(--chkbg);background-image:linear-gradient(-45deg,transparent 65%,var(--chkbg) 65.99%),linear-gradient(45deg,transparent 75%,var(--chkbg) 75.99%),linear-gradient(-45deg,var(--chkbg) 40%,transparent 40.99%),linear-gradient(45deg,var(--chkbg) 30%,var(--chkfg) 30.99%,var(--chkfg) 40%,transparent 40.99%),linear-gradient(-45deg,var(--chkfg) 50%,var(--chkbg) 50.99%)}.checkbox:indeterminate{--tw-bg-opacity:1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-repeat:no-repeat;animation:checkmark var(--animation-input,.2s) ease-out;background-image:linear-gradient(90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(-90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(0deg,var(--chkbg) 43%,var(--chkfg) 43%,var(--chkfg) 57%,var(--chkbg) 57%)}@keyframes checkmark{0%{background-position-y:5px}50%{background-position-y:-2px}to{background-position-y:0}}details.collapse{width:100%}details.collapse summary{position:relative;display:block;outline:2px solid transparent;outline-offset:2px}details.collapse summary::-webkit-details-marker{display:none}.collapse:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.collapse:has(.collapse-title:focus-visible),.collapse:has(>input[type=checkbox]:focus-visible),.collapse:has(>input[type=radio]:focus-visible){outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.collapse:not(.collapse-open):not(.collapse-close)>.collapse-title,.collapse:not(.collapse-open):not(.collapse-close)>input[type=checkbox],.collapse:not(.collapse-open):not(.collapse-close)>input[type=radio]:not(:checked){cursor:pointer}.collapse:focus:not(.collapse-open):not(.collapse-close):not(.collapse[open])>.collapse-title{cursor:unset}.collapse-title,:where(.collapse>input[type=checkbox]),:where(.collapse>input[type=radio]){padding:1rem;padding-inline-end:3rem;min-height:3.75rem;transition:background-color .2s ease-out}.collapse-open>:where(.collapse-content),.collapse:focus:not(.collapse-close)>:where(.collapse-content),.collapse:not(.collapse-close)>:where(input[type=checkbox]:checked~.collapse-content),.collapse:not(.collapse-close)>:where(input[type=radio]:checked~.collapse-content),.collapse[open]>:where(.collapse-content){padding-bottom:1rem;transition:padding .2s ease-out,background-color .2s ease-out}.collapse-arrow:focus:not(.collapse-close)>.collapse-title:after,.collapse-arrow:not(.collapse-close)>input[type=checkbox]:checked~.collapse-title:after,.collapse-arrow:not(.collapse-close)>input[type=radio]:checked~.collapse-title:after,.collapse-open.collapse-arrow>.collapse-title:after,.collapse[open].collapse-arrow>.collapse-title:after{--tw-translate-y:-50%;--tw-rotate:225deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.collapse-open.collapse-plus>.collapse-title:after,.collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse-plus:not(.collapse-close)>input[type=checkbox]:checked~.collapse-title:after,.collapse-plus:not(.collapse-close)>input[type=radio]:checked~.collapse-title:after,.collapse[open].collapse-plus>.collapse-title:after{content:"−"}.divider:not(:empty){gap:1rem}.dropdown.dropdown-open .dropdown-content,.dropdown:focus .dropdown-content,.dropdown:focus-within .dropdown-content{--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.file-input-bordered{--tw-border-opacity:0.2}.file-input:focus{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.file-input-disabled,.file-input[disabled]{cursor:not-allowed;--tw-border-opacity:1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));--tw-text-opacity:0.2}.file-input-disabled::-moz-placeholder,.file-input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity:0.2}.file-input-disabled::placeholder,.file-input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity:0.2}.file-input-disabled::file-selector-button,.file-input[disabled]::file-selector-button{--tw-border-opacity:0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity:0.2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity:0.2}.\!input input{--tw-bg-opacity:1!important;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)))!important;background-color:transparent!important}.input input{--tw-bg-opacity:1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));background-color:transparent}.\!input input:focus{outline:2px solid transparent!important;outline-offset:2px!important}.input input:focus{outline:2px solid transparent;outline-offset:2px}.\!input[list]::-webkit-calendar-picker-indicator{line-height:1em!important}.input[list]::-webkit-calendar-picker-indicator{line-height:1em}.input-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input:focus,.input:focus-within{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.\!input:focus,.\!input:focus-within{box-shadow:none!important;border-color:var(--fallback-bc,oklch(var(--bc)/.2))!important;outline-style:solid!important;outline-width:2px!important;outline-offset:2px!important;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))!important}.input-disabled,.input:disabled,.input:has(>input[disabled]),.input[disabled]{cursor:not-allowed;--tw-border-opacity:1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.\!input:disabled,.\!input:has(>input[disabled]),.\!input[disabled]{cursor:not-allowed!important;--tw-border-opacity:1!important;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))!important;--tw-bg-opacity:1!important;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))!important;color:var(--fallback-bc,oklch(var(--bc)/.4))!important}.input-disabled::-moz-placeholder,.input:disabled::-moz-placeholder,.input:has(>input[disabled])::-moz-placeholder,.input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity:0.2}.input-disabled::placeholder,.input:disabled::placeholder,.input:has(>input[disabled])::placeholder,.input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity:0.2}.\!input:disabled::-moz-placeholder,.\!input:has(>input[disabled])::-moz-placeholder,.\!input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)))!important;--tw-placeholder-opacity:0.2!important}.\!input:disabled::placeholder,.\!input:has(>input[disabled])::placeholder,.\!input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)))!important;--tw-placeholder-opacity:0.2!important}.\!input:has(>input[disabled])>input[disabled]{cursor:not-allowed!important}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.\!input::-webkit-date-and-time-value{text-align:inherit!important}.input::-webkit-date-and-time-value{text-align:inherit}.join>:where(:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join>:where(:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn)*-1)}.join-item:focus{isolation:isolate}.link:focus{outline:2px solid transparent;outline-offset:2px}.link:focus-visible{outline:2px solid currentColor;outline-offset:2px}.loading{pointer-events:none;display:inline-block;aspect-ratio:1/1;width:1.5rem;background-color:currentColor;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center}.loading,.loading-spinner{-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' stroke='%23000'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-linecap='round' stroke-width='3'%3E%3CanimateTransform attributeName='transform' dur='2s' from='0 12 12' repeatCount='indefinite' to='360 12 12' type='rotate'/%3E%3Canimate attributeName='stroke-dasharray' dur='1.5s' keyTimes='0;0.475;1' repeatCount='indefinite' values='0,150;42,150;42,150'/%3E%3Canimate attributeName='stroke-dashoffset' dur='1.5s' keyTimes='0;0.475;1' repeatCount='indefinite' values='0;-16;-59'/%3E%3C/circle%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' stroke='%23000'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-linecap='round' stroke-width='3'%3E%3CanimateTransform attributeName='transform' dur='2s' from='0 12 12' repeatCount='indefinite' to='360 12 12' type='rotate'/%3E%3Canimate attributeName='stroke-dasharray' dur='1.5s' keyTimes='0;0.475;1' repeatCount='indefinite' values='0,150;42,150;42,150'/%3E%3Canimate attributeName='stroke-dashoffset' dur='1.5s' keyTimes='0;0.475;1' repeatCount='indefinite' values='0;-16;-59'/%3E%3C/circle%3E%3C/svg%3E")}.loading-lg{width:2.5rem}:where(.menu li:empty){--tw-bg-opacity:1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;margin:.5rem 1rem;height:1px}.menu :where(li ul):before{position:absolute;bottom:.75rem;inset-inline-start:0;top:.75rem;width:1px;--tw-bg-opacity:1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;content:""}.menu :where(li:not(.menu-title)>:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--rounded-btn,.5rem);padding:.5rem 1rem;text-align:start;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;text-wrap:balance}:where(.menu li:not(.menu-title,.disabled)>:not(ul,details,.menu-title)):is(summary):not(.active,.btn):focus-visible,:where(.menu li:not(.menu-title,.disabled)>:not(ul,details,.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>:not(ul,details,.menu-title)):not(summary,.active,.btn):focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):is(summary):not(.active,.btn):focus-visible,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn):focus{cursor:pointer;background-color:var(--fallback-bc,oklch(var(--bc)/.1));--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));outline:2px solid transparent;outline-offset:2px}.menu li>:not(ul,.menu-title,details,.btn).active,.menu li>:not(ul,.menu-title,details,.btn):active,.menu li>details>summary:active{--tw-bg-opacity:1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.menu :where(li>details>summary)::-webkit-details-marker{display:none}.menu :where(li>.menu-dropdown-toggle):after,.menu :where(li>details>summary):after{justify-self:end;display:block;margin-top:-.5rem;height:.5rem;width:.5rem;transform:rotate(45deg);transition-property:transform,margin-top;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);content:"";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after,.menu :where(li>details[open]>summary):after{transform:rotate(225deg);margin-top:0}.mockup-phone .camera{position:relative;top:0;left:0;background:#000;height:25px;width:150px;margin:0 auto;border-bottom-left-radius:17px;border-bottom-right-radius:17px;z-index:11}.mockup-phone .camera:before{content:"";position:absolute;top:35%;left:50%;width:50px;height:4px;border-radius:5px;background-color:#0c0b0e;transform:translate(-50%,-50%)}.mockup-phone .camera:after{content:"";position:absolute;top:20%;left:70%;width:8px;height:8px;border-radius:5px;background-color:#0f0b25}.mockup-phone .display{overflow:hidden;border-radius:40px;margin-top:-25px}.mockup-browser .mockup-browser-toolbar .\!input{position:relative!important;margin-left:auto!important;margin-right:auto!important;display:block!important;height:1.75rem!important;width:24rem!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;--tw-bg-opacity:1!important;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))!important;padding-left:2rem!important;direction:ltr!important}.mockup-browser .mockup-browser-toolbar .input{position:relative;margin-left:auto;margin-right:auto;display:block;height:1.75rem;width:24rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding-left:2rem;direction:ltr}.mockup-browser .mockup-browser-toolbar .\!input:before{content:""!important;position:absolute!important;left:.5rem!important;top:50%!important;aspect-ratio:1/1!important;height:.75rem!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important;border-radius:9999px!important;border-width:2px!important;border-color:currentColor!important;opacity:.6!important}.mockup-browser .mockup-browser-toolbar .input:before{content:"";position:absolute;left:.5rem;top:50%;aspect-ratio:1/1;height:.75rem;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:2px;border-color:currentColor;opacity:.6}.mockup-browser .mockup-browser-toolbar .\!input:after{content:""!important;position:absolute!important;left:1.25rem!important;top:50%!important;height:.5rem!important;--tw-translate-y:25%!important;--tw-rotate:-45deg!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important;border-radius:9999px!important;border-width:1px!important;border-color:currentColor!important;opacity:.6!important}.mockup-browser .mockup-browser-toolbar .input:after{content:"";position:absolute;left:1.25rem;top:50%;height:.5rem;--tw-translate-y:25%;--tw-rotate:-45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:1px;border-color:currentColor;opacity:.6}.modal::backdrop,.modal:not(dialog:not(.modal-open)){background-color:#0006;animation:modal-pop .2s ease-out}.modal-backdrop{z-index:-1;grid-column-start:1;grid-row-start:1;display:grid;align-self:stretch;justify-self:stretch;color:transparent}.modal-open .modal-box,.modal-toggle:checked+.modal .modal-box,.modal:target .modal-box,.modal[open] .modal-box{--tw-translate-y:0px;--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes modal-pop{0%{opacity:0}}.\!progress::-moz-progress-bar{border-radius:var(--rounded-box,1rem)!important;background-color:currentColor!important}.progress::-moz-progress-bar{border-radius:var(--rounded-box,1rem);background-color:currentColor}.progress-primary::-moz-progress-bar{border-radius:var(--rounded-box,1rem);--tw-bg-opacity:1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)))}.\!progress:indeterminate{--progress-color:var(--fallback-bc,oklch(var(--bc)/1))!important;background-image:repeating-linear-gradient(90deg,var(--progress-color) -1%,var(--progress-color) 10%,transparent 10%,transparent 90%)!important;background-size:200%!important;background-position-x:15%!important;animation:progress-loading 5s ease-in-out infinite!important}.progress:indeterminate{--progress-color:var(--fallback-bc,oklch(var(--bc)/1));background-image:repeating-linear-gradient(90deg,var(--progress-color) -1%,var(--progress-color) 10%,transparent 10%,transparent 90%);background-size:200%;background-position-x:15%;animation:progress-loading 5s ease-in-out infinite}.progress-primary:indeterminate{--progress-color:var(--fallback-p,oklch(var(--p)/1))}.\!progress::-webkit-progress-bar{border-radius:var(--rounded-box,1rem)!important;background-color:transparent!important}.progress::-webkit-progress-bar{border-radius:var(--rounded-box,1rem);background-color:transparent}.\!progress::-webkit-progress-value{border-radius:var(--rounded-box,1rem)!important;background-color:currentColor!important}.progress::-webkit-progress-value{border-radius:var(--rounded-box,1rem);background-color:currentColor}.progress-primary::-webkit-progress-value{--tw-bg-opacity:1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)))}.\!progress:indeterminate::-moz-progress-bar{background-color:transparent!important;background-image:repeating-linear-gradient(90deg,var(--progress-color) -1%,var(--progress-color) 10%,transparent 10%,transparent 90%)!important;background-size:200%!important;background-position-x:15%!important;animation:progress-loading 5s ease-in-out infinite!important}.progress:indeterminate::-moz-progress-bar{background-color:transparent;background-image:repeating-linear-gradient(90deg,var(--progress-color) -1%,var(--progress-color) 10%,transparent 10%,transparent 90%);background-size:200%;background-position-x:15%;animation:progress-loading 5s ease-in-out infinite}@keyframes progress-loading{50%{background-position-x:-115%}}.radio:focus{box-shadow:none}.radio:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.radio:checked,.radio[aria-checked=true]{--tw-bg-opacity:1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-image:none;animation:radiomark var(--animation-input,.2s) ease-out;box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}.radio:disabled{cursor:not-allowed;opacity:.2}@keyframes radiomark{0%{box-shadow:0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset}50%{box-shadow:0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset}to{box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}}.range:focus-visible::-webkit-slider-thumb{--focus-shadow:0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 2rem var(--range-shdw) inset}.range:focus-visible::-moz-range-thumb{--focus-shadow:0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 2rem var(--range-shdw) inset}.range::-webkit-slider-runnable-track{height:.5rem;width:100%;border-radius:var(--rounded-box,1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-moz-range-track{height:.5rem;width:100%;border-radius:var(--rounded-box,1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-webkit-slider-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box,1rem);border-style:none;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));appearance:none;-webkit-appearance:none;top:50%;color:var(--range-shdw);transform:translateY(-50%);--filler-size:100rem;--filler-offset:0.6rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow,0 0),calc(var(--filler-size)*-1 - var(--filler-offset)) 0 0 var(--filler-size)}.range::-moz-range-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box,1rem);border-style:none;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));top:50%;color:var(--range-shdw);--filler-size:100rem;--filler-offset:0.5rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow,0 0),calc(var(--filler-size)*-1 - var(--filler-offset)) 0 0 var(--filler-size)}@keyframes rating-pop{0%{transform:translateY(-.125em)}40%{transform:translateY(-.125em)}to{transform:translateY(0)}}.select:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select-disabled,.select:disabled,.select[disabled]{cursor:not-allowed;--tw-border-opacity:1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.select-disabled::-moz-placeholder,.select:disabled::-moz-placeholder,.select[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity:0.2}.select-disabled::placeholder,.select:disabled::placeholder,.select[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity:0.2}.select-multiple,.select[multiple],.select[size].select:not([size="1"]){background-image:none;padding-right:1rem}[dir=rtl] .select{background-position:12px calc(1px + 50%),16px calc(1px + 50%)}.skeleton{border-radius:var(--rounded-box,1rem);--tw-bg-opacity:1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));will-change:background-position;animation:skeleton 1.8s ease-in-out infinite;background-image:linear-gradient(105deg,transparent 0,transparent 40%,var(--fallback-b1,oklch(var(--b1)/1)) 50%,transparent 60%,transparent 100%);background-size:200% auto;background-repeat:no-repeat;background-position-x:-50%}@media (prefers-reduced-motion){.skeleton{animation-duration:15s}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}:where(.stats)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;--tw-divide-y-reverse:0;border-width:calc(0px*(1 - var(--tw-divide-y-reverse))) calc(1px*var(--tw-divide-x-reverse)) calc(0px*var(--tw-divide-y-reverse)) calc(1px*(1 - var(--tw-divide-x-reverse)))}[dir=rtl] .stats>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:1}.steps .step:before{top:0;height:.5rem;width:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));content:"";margin-inline-start:-100%}.steps .step:after,.steps .step:before{grid-column-start:1;grid-row-start:1;--tw-bg-opacity:1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));--tw-text-opacity:1}.steps .step:after{content:counter(step);counter-increment:step;z-index:1;position:relative;display:grid;height:2rem;width:2rem;place-items:center;place-self:center;border-radius:9999px;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.steps .step:first-child:before{content:none}.steps .step[data-content]:after{content:attr(data-content)}.steps .step-neutral+.step-neutral:before,.steps .step-neutral:after{--tw-bg-opacity:1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.steps .step-primary+.step-primary:before,.steps .step-primary:after{--tw-bg-opacity:1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.steps .step-secondary+.step-secondary:before,.steps .step-secondary:after{--tw-bg-opacity:1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}.steps .step-accent+.step-accent:before,.steps .step-accent:after{--tw-bg-opacity:1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.steps .step-info+.step-info:before,.steps .step-info:after{--tw-bg-opacity:1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)))}.steps .step-info:after{--tw-text-opacity:1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.steps .step-success+.step-success:before,.steps .step-success:after{--tw-bg-opacity:1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)))}.steps .step-success:after{--tw-text-opacity:1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.steps .step-warning+.step-warning:before,.steps .step-warning:after{--tw-bg-opacity:1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)))}.steps .step-warning:after{--tw-text-opacity:1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.steps .step-error+.step-error:before,.steps .step-error:after{--tw-bg-opacity:1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)))}.steps .step-error:after{--tw-text-opacity:1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.swap-rotate .swap-indeterminate,.swap-rotate .swap-on,.swap-rotate input:indeterminate~.swap-on{--tw-rotate:45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.swap-active:where(.swap-rotate) .swap-off,.swap-rotate input:checked~.swap-off,.swap-rotate input:indeterminate~.swap-off{--tw-rotate:-45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.swap-active:where(.swap-rotate) .swap-on,.swap-rotate input:checked~.swap-on,.swap-rotate input:indeterminate~.swap-indeterminate{--tw-rotate:0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.swap-flip .swap-indeterminate,.swap-flip .swap-on,.swap-flip input:indeterminate~.swap-on{transform:rotateY(180deg);backface-visibility:hidden;opacity:1}.swap-active:where(.swap-flip) .swap-off,.swap-flip input:checked~.swap-off,.swap-flip input:indeterminate~.swap-off{transform:rotateY(-180deg);backface-visibility:hidden;opacity:1}.swap-active:where(.swap-flip) .swap-on,.swap-flip input:checked~.swap-on,.swap-flip input:indeterminate~.swap-indeterminate{transform:rotateY(0deg)}.tabs-lifted>.tab:focus-visible{border-end-end-radius:0;border-end-start-radius:0}.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tab:is(input:checked){border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity:1;--tw-text-opacity:1}.tab:focus{outline:2px solid transparent;outline-offset:2px}.tab:focus-visible{outline:2px solid currentColor;outline-offset:-5px}.tab-disabled,.tab[disabled]{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity:0.2}.tabs-bordered>.tab{border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity:0.2;border-style:solid;border-bottom-width:calc(var(--tab-border, 1px) + 1px)}.tabs-lifted>.tab{border:var(--tab-border,1px) solid transparent;border-width:0 0 var(--tab-border,1px) 0;border-start-start-radius:var(--tab-radius,.5rem);border-start-end-radius:var(--tab-radius,.5rem);border-bottom-color:var(--tab-border-color);padding-inline-start:var(--tab-padding,1rem);padding-inline-end:var(--tab-padding,1rem);padding-top:var(--tab-border,1px)}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tabs-lifted>.tab:is(input:checked){background-color:var(--tab-bg);border-width:var(--tab-border,1px) var(--tab-border,1px) 0 var(--tab-border,1px);border-inline-start-color:var(--tab-border-color);border-inline-end-color:var(--tab-border-color);border-top-color:var(--tab-border-color);padding-inline-start:calc(var(--tab-padding, 1rem) - var(--tab-border, 1px));padding-inline-end:calc(var(--tab-padding, 1rem) - var(--tab-border, 1px));padding-bottom:var(--tab-border,1px);padding-top:0}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before,.tabs-lifted>.tab:is(input:checked):before{z-index:1;content:"";display:block;position:absolute;width:calc(100% + var(--tab-radius, .5rem)*2);height:var(--tab-radius,.5rem);bottom:0;background-size:var(--tab-radius,.5rem);background-position:0 0,100% 0;background-repeat:no-repeat;--tab-grad:calc(69% - var(--tab-border, 1px));--radius-start:radial-gradient(circle at top left,transparent var(--tab-grad),var(--tab-border-color) calc(var(--tab-grad) + 0.25px),var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)),var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + 0.25px));--radius-end:radial-gradient(circle at top right,transparent var(--tab-grad),var(--tab-border-color) calc(var(--tab-grad) + 0.25px),var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)),var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + 0.25px));background-image:var(--radius-start),var(--radius-end)}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,.tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-end);background-position:100% 0}[dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,[dir=rtl] .tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-start);background-position:0 0}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,.tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-start);background-position:0 0}[dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,[dir=rtl] .tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-end);background-position:100% 0}.tabs-lifted>.tab:is(input:checked)+.tabs-lifted .tab:is(input:checked):before,.tabs-lifted>:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled])+.tabs-lifted :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before{background-image:var(--radius-end);background-position:100% 0}.tabs-boxed{--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding:.25rem}.tabs-boxed,.tabs-boxed .tab{border-radius:var(--rounded-btn,.5rem)}.tabs-boxed :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tabs-boxed :is(input:checked){--tw-bg-opacity:1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.table:where([dir=rtl],[dir=rtl] *){text-align:right}.table :where(th,td){padding:.75rem 1rem;vertical-align:middle}.table tr.active,.table tr.active:nth-child(2n),.table-zebra tbody tr:nth-child(2n){--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.active,.table-zebra tr.active:nth-child(2n),.table-zebra-zebra tbody tr:nth-child(2n){--tw-bg-opacity:1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}.table :where(thead tr,tbody tr:not(:last-child),tbody tr:first-child:last-child){border-bottom-width:1px;--tw-border-opacity:1;border-bottom-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.table :where(thead,tfoot){white-space:nowrap;font-size:.75rem;line-height:1rem;font-weight:700;color:var(--fallback-bc,oklch(var(--bc)/.6))}.table :where(tfoot){border-top-width:1px;--tw-border-opacity:1;border-top-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.textarea-bordered,.textarea:focus{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea:focus{box-shadow:none;outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea-disabled,.textarea:disabled,.textarea[disabled]{cursor:not-allowed;--tw-border-opacity:1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.textarea-disabled::-moz-placeholder,.textarea:disabled::-moz-placeholder,.textarea[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity:0.2}.textarea-disabled::placeholder,.textarea:disabled::placeholder,.textarea[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity:0.2}.timeline hr{height:.25rem}:where(.timeline hr){--tw-bg-opacity:1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}:where(.timeline:has(.timeline-middle) hr):first-child{border-start-end-radius:var(--rounded-badge,1.9rem);border-end-end-radius:var(--rounded-badge,1.9rem);border-start-start-radius:0;border-end-start-radius:0}:where(.timeline:has(.timeline-middle) hr):last-child{border-start-start-radius:var(--rounded-badge,1.9rem);border-end-start-radius:var(--rounded-badge,1.9rem);border-start-end-radius:0;border-end-end-radius:0}:where(.timeline:not(:has(.timeline-middle)) :first-child hr:last-child){border-start-start-radius:var(--rounded-badge,1.9rem);border-end-start-radius:var(--rounded-badge,1.9rem);border-start-end-radius:0;border-end-end-radius:0}:where(.timeline:not(:has(.timeline-middle)) :last-child hr:first-child){border-start-end-radius:var(--rounded-badge,1.9rem);border-end-end-radius:var(--rounded-badge,1.9rem);border-start-start-radius:0;border-end-start-radius:0}@keyframes toast-pop{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}[dir=rtl] .\!toggle{--handleoffsetcalculator:calc(var(--handleoffset)*1)!important}[dir=rtl] .toggle{--handleoffsetcalculator:calc(var(--handleoffset)*1)}.\!toggle:focus-visible{outline-style:solid!important;outline-width:2px!important;outline-offset:2px!important;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))!important}.toggle:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.\!toggle:hover{background-color:currentColor!important}.toggle:hover{background-color:currentColor}.toggle:checked,.toggle[aria-checked=true]{background-image:none;--handleoffsetcalculator:var(--handleoffset);--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.\!toggle:checked,.\!toggle[aria-checked=true]{background-image:none!important;--handleoffsetcalculator:var(--handleoffset)!important;--tw-text-opacity:1!important;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))!important}[dir=rtl] .toggle:checked,[dir=rtl] .toggle[aria-checked=true]{--handleoffsetcalculator:calc(var(--handleoffset)*-1)}[dir=rtl] .\!toggle:checked,[dir=rtl] .\!toggle[aria-checked=true]{--handleoffsetcalculator:calc(var(--handleoffset)*-1)!important}.\!toggle:indeterminate{--tw-text-opacity:1!important;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))!important;box-shadow:calc(var(--handleoffset)/2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset)/-2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset!important}.toggle:indeterminate{--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));box-shadow:calc(var(--handleoffset)/2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset)/-2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}[dir=rtl] .\!toggle:indeterminate{box-shadow:calc(var(--handleoffset)/2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset)/-2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset!important}[dir=rtl] .toggle:indeterminate{box-shadow:calc(var(--handleoffset)/2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset)/-2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}.\!toggle:disabled{cursor:not-allowed!important;--tw-border-opacity:1!important;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)))!important;background-color:transparent!important;opacity:.3!important;--togglehandleborder:0 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset,var(--handleoffsetcalculator) 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset!important}.toggle:disabled{cursor:not-allowed;--tw-border-opacity:1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));background-color:transparent;opacity:.3;--togglehandleborder:0 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset,var(--handleoffsetcalculator) 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset}.artboard.phone{width:320px}.artboard.phone-1.artboard-horizontal,.artboard.phone-1.horizontal{width:568px;height:320px}.artboard.phone-2.artboard-horizontal,.artboard.phone-2.horizontal{width:667px;height:375px}.artboard.phone-3.artboard-horizontal,.artboard.phone-3.horizontal{width:736px;height:414px}.artboard.phone-4.artboard-horizontal,.artboard.phone-4.horizontal{width:812px;height:375px}.artboard.phone-5.artboard-horizontal,.artboard.phone-5.horizontal{width:896px;height:414px}.artboard.phone-6.artboard-horizontal,.artboard.phone-6.horizontal{width:1024px;height:320px}.btm-nav-xs>:where(.active){border-top-width:1px}.btm-nav-sm>:where(.active){border-top-width:2px}.btm-nav-md>:where(.active){border-top-width:2px}.btm-nav-lg>:where(.active){border-top-width:4px}.btn-sm{height:2rem;min-height:2rem;padding-left:.75rem;padding-right:.75rem;font-size:.875rem}.btn-lg{height:4rem;min-height:4rem;padding-left:1.5rem;padding-right:1.5rem;font-size:1.125rem}.btn-square:where(.btn-xs){height:1.5rem;width:1.5rem;padding:0}.btn-square:where(.btn-sm){height:2rem;width:2rem;padding:0}.btn-square:where(.btn-md){height:3rem;width:3rem;padding:0}.btn-square:where(.btn-lg){height:4rem;width:4rem;padding:0}.btn-circle:where(.btn-xs){height:1.5rem;width:1.5rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-sm){height:2rem;width:2rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-md){height:3rem;width:3rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-lg){height:4rem;width:4rem;border-radius:9999px;padding:0}.indicator :where(.indicator-item){bottom:auto;inset-inline-end:0;inset-inline-start:auto;top:0;--tw-translate-y:-50%;--tw-translate-x:50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item):where([dir=rtl],[dir=rtl] *){--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-start){inset-inline-end:auto;inset-inline-start:0;--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-start):where([dir=rtl],[dir=rtl] *){--tw-translate-x:50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-center){inset-inline-end:50%;inset-inline-start:50%;--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-center):where([dir=rtl],[dir=rtl] *){--tw-translate-x:50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-end){inset-inline-end:0;inset-inline-start:auto;--tw-translate-x:50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-end):where([dir=rtl],[dir=rtl] *){--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-bottom){bottom:0;top:auto;--tw-translate-y:50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-middle){bottom:50%;top:50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-top){bottom:auto;top:0;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.join.join-vertical{flex-direction:column}.join.join-vertical .join-item:first-child:not(:last-child),.join.join-vertical :first-child:not(:last-child) .join-item{border-end-start-radius:0;border-end-end-radius:0;border-start-start-radius:inherit;border-start-end-radius:inherit}.join.join-vertical .join-item:last-child:not(:first-child),.join.join-vertical :last-child:not(:first-child) .join-item{border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:inherit}.join.join-horizontal{flex-direction:row}.join.join-horizontal .join-item:first-child:not(:last-child),.join.join-horizontal :first-child:not(:last-child) .join-item{border-end-end-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-start-start-radius:inherit}.join.join-horizontal .join-item:last-child:not(:first-child),.join.join-horizontal :last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0;border-end-end-radius:inherit;border-start-end-radius:inherit}.menu-horizontal{display:inline-flex;flex-direction:row}.menu-horizontal>li:not(.menu-title)>details>ul{position:absolute}.steps-horizontal .step{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));place-items:center;text-align:center}.steps-vertical .step{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(1,minmax(0,1fr))}.tabs-md :where(.tab){height:2rem;font-size:.875rem;line-height:1.25rem;line-height:2;--tab-padding:1rem}.tabs-lg :where(.tab){height:3rem;font-size:1.125rem;line-height:1.75rem;line-height:2;--tab-padding:1.25rem}.tabs-sm :where(.tab){height:1.5rem;font-size:.875rem;line-height:.75rem;--tab-padding:0.75rem}.tabs-xs :where(.tab){height:1.25rem;font-size:.75rem;line-height:.75rem;--tab-padding:0.5rem}.tooltip{--tooltip-offset:calc(100% + 1px + var(--tooltip-tail, 0px))}.tooltip:before{position:absolute;pointer-events:none;z-index:1;content:var(--tw-content);--tw-content:attr(data-tip)}.tooltip-top:before,.tooltip:before{transform:translateX(-50%);top:auto;left:50%;right:auto;bottom:var(--tooltip-offset)}.avatar.online:before{content:"";position:absolute;z-index:10;display:block;border-radius:9999px;--tw-bg-opacity:1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));outline-style:solid;outline-width:2px;outline-color:var(--fallback-b1,oklch(var(--b1)/1));width:15%;height:15%;top:7%;right:7%}.card-compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-compact .card-title{margin-bottom:.25rem}.card-normal .card-body{padding:var(--padding-card,2rem);font-size:1rem;line-height:1.5rem}.card-normal .card-title{margin-bottom:.75rem}.join.join-vertical>:where(:not(:first-child)){margin-left:0;margin-right:0;margin-top:-1px}.join.join-vertical>:where(:not(:first-child)):is(.btn){margin-top:calc(var(--border-btn)*-1)}.join.join-horizontal>:where(:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join.join-horizontal>:where(:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn)*-1);margin-top:0}.menu-horizontal>li:not(.menu-title)>details>ul{margin-inline-start:0;margin-top:1rem;padding-top:.5rem;padding-bottom:.5rem;padding-inline-end:.5rem}.menu-horizontal>li>details>ul:before{content:none}:where(.menu-horizontal>li:not(.menu-title)>details>ul){border-radius:var(--rounded-box,1rem);--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.steps-horizontal .step{grid-template-rows:40px 1fr;grid-template-columns:auto;min-width:4rem}.steps-horizontal .step:before{height:.5rem;width:100%;--tw-translate-x:0px;--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));content:"";margin-inline-start:-100%}.steps-horizontal .step:where([dir=rtl],[dir=rtl] *):before{--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.steps-vertical .step{gap:.5rem;grid-template-columns:40px 1fr;grid-template-rows:auto;min-height:4rem;justify-items:start}.steps-vertical .step:before{height:100%;width:.5rem;--tw-translate-x:-50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));margin-inline-start:50%}.steps-vertical .step:where([dir=rtl],[dir=rtl] *):before{--tw-translate-x:50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.tooltip{position:relative;display:inline-block;text-align:center;--tooltip-tail:0.1875rem;--tooltip-color:var(--fallback-n,oklch(var(--n)/1));--tooltip-text-color:var(--fallback-nc,oklch(var(--nc)/1));--tooltip-tail-offset:calc(100% + 0.0625rem - var(--tooltip-tail))}.tooltip:after,.tooltip:before{opacity:0;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-delay:.1s;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.tooltip:after{position:absolute;content:"";border-style:solid;border-width:var(--tooltip-tail,0);width:0;height:0;display:block}.tooltip:before{max-width:20rem;white-space:normal;border-radius:.25rem;padding:.25rem .5rem;font-size:.875rem;line-height:1.25rem;background-color:var(--tooltip-color);color:var(--tooltip-text-color);width:-moz-max-content;width:max-content}.tooltip.tooltip-open:after,.tooltip.tooltip-open:before,.tooltip:hover:after,.tooltip:hover:before{opacity:1;transition-delay:75ms}.tooltip:has(:focus-visible):after,.tooltip:has(:focus-visible):before{opacity:1;transition-delay:75ms}.tooltip:not([data-tip]):hover:after,.tooltip:not([data-tip]):hover:before{visibility:hidden;opacity:0}.tooltip-top:after,.tooltip:after{transform:translateX(-50%);border-color:var(--tooltip-color) transparent transparent transparent;top:auto;left:50%;right:auto;bottom:var(--tooltip-tail-offset)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.isolate{isolation:isolate}.z-40{z-index:40}.m-0{margin:0}.m-1{margin:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-auto{margin-left:auto}.mt-1{margin-top:.25rem}.mt-16{margin-top:4rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-1{height:.25rem}.h-10{height:2.5rem}.h-5{height:1.25rem}.h-7{height:1.75rem}.h-\[1\.2rem\]{height:1.2rem}.h-auto{height:auto}.min-h-0{min-height:0}.min-h-80{min-height:20rem}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-5{width:1.25rem}.w-60{width:15rem}.w-7{width:1.75rem}.w-\[1\.2rem\]{width:1.2rem}.w-auto{width:auto}.w-full{width:100%}.min-w-max{min-width:-moz-max-content;min-width:max-content}.max-w-32{max-width:8rem}.max-w-3xl{max-width:48rem}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-screen-2xl{max-width:1536px}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-col-resize{cursor:col-resize}.cursor-crosshair{cursor:crosshair}.cursor-default{cursor:default}.cursor-e-resize{cursor:e-resize}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-move{cursor:move}.cursor-n-resize{cursor:n-resize}.cursor-ne-resize{cursor:ne-resize}.cursor-ns-resize{cursor:ns-resize}.cursor-nw-resize{cursor:nw-resize}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.cursor-s-resize{cursor:s-resize}.cursor-se-resize{cursor:se-resize}.cursor-sw-resize{cursor:sw-resize}.cursor-w-resize{cursor:w-resize}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded-box{border-radius:var(--rounded-box,1rem)}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-base-300{--tw-border-opacity:1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity,1)))}.border-base-300\/50{border-color:var(--fallback-b3,oklch(var(--b3)/.5))}.border-info\/30{border-color:var(--fallback-in,oklch(var(--in)/.3))}.bg-base-100{--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity,1)))}.bg-base-100\/80{background-color:var(--fallback-b1,oklch(var(--b1)/.8))}.bg-base-100\/90{background-color:var(--fallback-b1,oklch(var(--b1)/.9))}.bg-base-200{--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity,1)))}.bg-base-200\/40{background-color:var(--fallback-b2,oklch(var(--b2)/.4))}.bg-error\/10{background-color:var(--fallback-er,oklch(var(--er)/.1))}.bg-info\/10{background-color:var(--fallback-in,oklch(var(--in)/.1))}.bg-success\/10{background-color:var(--fallback-su,oklch(var(--su)/.1))}.bg-warning\/10{background-color:var(--fallback-wa,oklch(var(--wa)/.1))}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-12{padding-bottom:3rem}.pb-4{padding-bottom:1rem}.pe-1{padding-inline-end:.25rem}.pr-0{padding-right:0}.pr-1{padding-right:.25rem}.pt-1{padding-top:.25rem}.pt-6{padding-top:1.5rem}.text-right{text-align:right}.text-justify{text-align:justify}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\[10px\]{font-size:10px}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-tight{line-height:1.25}.tracking-\[0\.25em\]{letter-spacing:.25em}.tracking-wide{letter-spacing:.025em}.text-base-content{--tw-text-opacity:1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity,1)))}.text-base-content\/60{color:var(--fallback-bc,oklch(var(--bc)/.6))}.text-base-content\/70{color:var(--fallback-bc,oklch(var(--bc)/.7))}.text-current{color:currentColor}.text-info-content{--tw-text-opacity:1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity,1)))}.text-primary{--tw-text-opacity:1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity,1)))}.underline{text-decoration-line:underline}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.blur{--tw-blur:blur(8px)}.blur,.invert{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert:invert(100%)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}@media (forced-colors:active){@media (hover:hover){.menu li>.forced-colors\:active:not(ul,.menu-title,details,.btn){--tw-bg-opacity:1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}}.btm-nav>:where(.forced-colors\:active){border-top-width:2px;--tw-bg-opacity:1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.menu li>.forced-colors\:active:not(ul,.menu-title,details,.btn){--tw-bg-opacity:1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity:1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.table tr.forced-colors\:active,.table tr.forced-colors\:active:nth-child(2n){--tw-bg-opacity:1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.forced-colors\:active,.table-zebra tr.forced-colors\:active:nth-child(2n){--tw-bg-opacity:1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}.btm-nav-xs>:where(.forced-colors\:active){border-top-width:1px}.btm-nav-sm>:where(.forced-colors\:active){border-top-width:2px}.btm-nav-md>:where(.forced-colors\:active){border-top-width:2px}.btm-nav-lg>:where(.forced-colors\:active){border-top-width:4px}}@media (min-width:640px){.sm\:w-72{width:18rem}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:768px){.md\:flex{display:flex}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:self-auto{align-self:auto}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width:1024px){.lg\:w-1\/4{width:25%}}@media (min-width:1280px){.xl\:col-span-2{grid-column:span 2/span 2}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-\[minmax\(0\2c 1fr\)_minmax\(0\2c 1fr\)\]{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}} \ No newline at end of file diff --git a/resources/public/static/js/app.js b/resources/public/static/js/app.js index b5d4c7d..2d27726 100644 --- a/resources/public/static/js/app.js +++ b/resources/public/static/js/app.js @@ -18,6 +18,11 @@ panels.forEach(function (panel) { panel.hidden = panel.getAttribute("data-tab-panel") !== id; }); + + window.requestAnimationFrame(function () { + initPlotlyCharts(group); + resizePlotlyCharts(group); + }); } triggers.forEach(function (trigger) { @@ -101,6 +106,83 @@ }); } + function plotlyConfig() { + return { + responsive: true, + displaylogo: false, + modeBarButtonsToRemove: ["select2d", "lasso2d", "autoScale2d"], + }; + } + + function canRenderChart(chart) { + return Boolean(chart && chart.getClientRects && chart.getClientRects().length); + } + + function plotlyFallback(chart, message) { + if (!chart) { + return; + } + + chart.innerHTML = + '

' + + message + + "

"; + } + + function renderPlotlyChart(chart) { + if (!chart || chart.dataset.plotlyInitialized === "true") { + return; + } + + if (!window.Plotly) { + plotlyFallback(chart, "Plotly is not available in this browser session."); + return; + } + + if (!canRenderChart(chart)) { + return; + } + + var rawSpec = chart.getAttribute("data-plotly-spec") || ""; + if (rawSpec === "") { + plotlyFallback(chart, "No chart data was provided."); + return; + } + + var spec; + try { + spec = JSON.parse(rawSpec); + } catch (error) { + plotlyFallback(chart, "This chart could not be parsed."); + return; + } + + chart.dataset.plotlyInitialized = "true"; + window.Plotly.newPlot(chart, spec.data || [], spec.layout || {}, plotlyConfig()); + } + + function resizePlotlyCharts(root) { + if (!window.Plotly || !window.Plotly.Plots) { + return; + } + + Array.prototype.slice + .call(root.querySelectorAll("[data-plotly-chart][data-plotly-initialized='true']")) + .forEach(function (chart) { + if (canRenderChart(chart)) { + window.Plotly.Plots.resize(chart); + } + }); + } + + function initPlotlyCharts(root) { + Array.prototype.slice + .call(root.querySelectorAll("[data-plotly-chart]")) + .forEach(function (chart) { + renderPlotlyChart(chart); + }); + } + function applyTheme(theme) { var body = document.body; if (!body) { @@ -344,6 +426,7 @@ initTabGroups(root); initNavToggles(root); initTextFilters(root); + initPlotlyCharts(root); initThemeToggle(root); initPageLoading(root); initUploadProgress(root); @@ -353,7 +436,7 @@ boot(document); }); - document.addEventListener("htmx:afterSwap", function (event) { + document.addEventListener("htmx:load", function (event) { boot(event.target); }); @@ -370,5 +453,7 @@ .forEach(function (indicator) { indicator.style.display = "none"; }); + + resizePlotlyCharts(document); }); })(); diff --git a/resources/public/static/js/plotly.min.js b/resources/public/static/js/plotly.min.js new file mode 100644 index 0000000..4e34b1e --- /dev/null +++ b/resources/public/static/js/plotly.min.js @@ -0,0 +1,3882 @@ +/** +* plotly.js v3.6.0 +* Copyright 2012-2026, Plotly, Inc. +* All rights reserved. +* Licensed under the MIT license +*/ +( + function(root, factory) { + if (typeof module === "object" && module.exports) { + module.exports = factory(); + } else { + root.moduleName = factory(); + } +} (typeof self !== "undefined" ? self : this, () => { +"use strict";var Plotly=(()=>{var wtt=Object.create;var FS=Object.defineProperty,Ttt=Object.defineProperties,Att=Object.getOwnPropertyDescriptor,Stt=Object.getOwnPropertyDescriptors,Mtt=Object.getOwnPropertyNames,g6=Object.getOwnPropertySymbols,Ett=Object.getPrototypeOf,Mq=Object.prototype.hasOwnProperty,gee=Object.prototype.propertyIsEnumerable;var pee=(e,t,r)=>t in e?FS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_g=(e,t)=>{for(var r in t||(t={}))Mq.call(t,r)&&pee(e,r,t[r]);if(g6)for(var r of g6(t))gee.call(t,r)&&pee(e,r,t[r]);return e},j1=(e,t)=>Ttt(e,Stt(t));var mee=(e,t)=>{var r={};for(var n in e)Mq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&g6)for(var n of g6(e))t.indexOf(n)<0&&gee.call(e,n)&&(r[n]=e[n]);return r};var gu=(e,t)=>()=>(e&&(t=e(e=0)),t);var ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),yee=(e,t)=>{for(var r in t)FS(e,r,{get:t[r],enumerable:!0})},_ee=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Mtt(t))!Mq.call(e,i)&&i!==r&&FS(e,i,{get:()=>t[i],enumerable:!(n=Att(t,i))||n.enumerable});return e};var ktt=(e,t,r)=>(r=e!=null?wtt(Ett(e)):{},_ee(t||!e||!e.__esModule?FS(r,"default",{value:e,enumerable:!0}):r,e)),gb=e=>_ee(FS({},"__esModule",{value:!0}),e);var m6=ye(xee=>{"use strict";xee.version="3.6.0"});var wee=ye((bee,y6)=>{(function(t,r,n){r[t]=r[t]||n(),typeof y6!="undefined"&&y6.exports&&(y6.exports=r[t])})("Promise",typeof window!="undefined"?window:bee,function(){"use strict";var t,r,n,i=Object.prototype.toString,a=typeof setImmediate!="undefined"?function(k){return setImmediate(k)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(k,M,T,L){return Object.defineProperty(k,M,{value:T,writable:!0,configurable:L!==!1})}}catch(p){t=function(M,T,L){return M[T]=L,M}}n=function(){var k,M,T;function L(x,C){this.fn=x,this.self=C,this.next=void 0}return{add:function(C,S){T=new L(C,S),M?M.next=T:k=T,M=T,T=void 0},drain:function(){var C=k;for(k=M=r=void 0;C;)C.fn.call(C.self),C=C.next}}}();function o(p,k){n.add(p,k),r||(r=a(n.drain))}function s(p){var k,M=typeof p;return p!=null&&(M=="object"||M=="function")&&(k=p.then),typeof k=="function"?k:!1}function l(){for(var p=0;p0&&o(l,M))}catch(T){f.call(new d(M),T)}}}function f(p){var k=this;k.triggered||(k.triggered=!0,k.def&&(k=k.def),k.msg=p,k.state=2,k.chain.length>0&&o(l,k))}function h(p,k,M,T){for(var L=0;L{(function(){var e={version:"3.8.2"},t=[].slice,r=function(X){return t.call(X)},n=self.document;function i(X){return X&&(X.ownerDocument||X.document||X).documentElement}function a(X){return X&&(X.ownerDocument&&X.ownerDocument.defaultView||X.document&&X||X.defaultView)}if(n)try{r(n.documentElement.childNodes)[0].nodeType}catch(X){r=function(se){for(var Te=se.length,qe=new Array(Te);Te--;)qe[Te]=se[Te];return qe}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(X){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(se,Te){s.call(this,se,Te+"")},o.setAttributeNS=function(se,Te,qe){l.call(this,se,Te,qe+"")},u.setProperty=function(se,Te,qe){c.call(this,se,Te+"",qe)}}e.ascending=f;function f(X,se){return Xse?1:X>=se?0:NaN}e.descending=function(X,se){return seX?1:se>=X?0:NaN},e.min=function(X,se){var Te=-1,qe=X.length,Ve,Ye;if(arguments.length===1){for(;++Te=Ye){Ve=Ye;break}for(;++TeYe&&(Ve=Ye)}else{for(;++Te=Ye){Ve=Ye;break}for(;++TeYe&&(Ve=Ye)}return Ve},e.max=function(X,se){var Te=-1,qe=X.length,Ve,Ye;if(arguments.length===1){for(;++Te=Ye){Ve=Ye;break}for(;++TeVe&&(Ve=Ye)}else{for(;++Te=Ye){Ve=Ye;break}for(;++TeVe&&(Ve=Ye)}return Ve},e.extent=function(X,se){var Te=-1,qe=X.length,Ve,Ye,Pt;if(arguments.length===1){for(;++Te=Ye){Ve=Pt=Ye;break}for(;++TeYe&&(Ve=Ye),Pt=Ye){Ve=Pt=Ye;break}for(;++TeYe&&(Ve=Ye),Pt1)return Pt/(Xt-1)},e.deviation=function(){var X=e.variance.apply(this,arguments);return X&&Math.sqrt(X)};function v(X){return{left:function(se,Te,qe,Ve){for(arguments.length<3&&(qe=0),arguments.length<4&&(Ve=se.length);qe>>1;X(se[Ye],Te)<0?qe=Ye+1:Ve=Ye}return qe},right:function(se,Te,qe,Ve){for(arguments.length<3&&(qe=0),arguments.length<4&&(Ve=se.length);qe>>1;X(se[Ye],Te)>0?Ve=Ye:qe=Ye+1}return qe}}}var m=v(f);e.bisectLeft=m.left,e.bisect=e.bisectRight=m.right,e.bisector=function(X){return v(X.length===1?function(se,Te){return f(X(se),Te)}:X)},e.shuffle=function(X,se,Te){(qe=arguments.length)<3&&(Te=X.length,qe<2&&(se=0));for(var qe=Te-se,Ve,Ye;qe;)Ye=Math.random()*qe--|0,Ve=X[qe+se],X[qe+se]=X[Ye+se],X[Ye+se]=Ve;return X},e.permute=function(X,se){for(var Te=se.length,qe=new Array(Te);Te--;)qe[Te]=X[se[Te]];return qe},e.pairs=function(X){for(var se=0,Te=X.length-1,qe,Ve=X[0],Ye=new Array(Te<0?0:Te);se=0;)for(Pt=X[se],Te=Pt.length;--Te>=0;)Ye[--Ve]=Pt[Te];return Ye};var p=Math.abs;e.range=function(X,se,Te){if(arguments.length<3&&(Te=1,arguments.length<2&&(se=X,X=0)),(se-X)/Te===1/0)throw new Error("infinite range");var qe=[],Ve=k(p(Te)),Ye=-1,Pt;if(X*=Ve,se*=Ve,Te*=Ve,Te<0)for(;(Pt=X+Te*++Ye)>se;)qe.push(Pt/Ve);else for(;(Pt=X+Te*++Ye)=se.length)return Ve?Ve.call(X,Xt):qe?Xt.sort(qe):Xt;for(var pr=-1,Ur=Xt.length,zr=se[dr++],gi,xi,Wr,ii=new T,di;++pr=se.length)return ot;var dr=[],pr=Te[Xt++];return ot.forEach(function(Ur,zr){dr.push({key:Ur,values:Pt(zr,Xt)})}),pr?dr.sort(function(Ur,zr){return pr(Ur.key,zr.key)}):dr}return X.map=function(ot,Xt){return Ye(Xt,ot,0)},X.entries=function(ot){return Pt(Ye(e.map,ot,0),0)},X.key=function(ot){return se.push(ot),X},X.sortKeys=function(ot){return Te[se.length-1]=ot,X},X.sortValues=function(ot){return qe=ot,X},X.rollup=function(ot){return Ve=ot,X},X},e.set=function(X){var se=new V;if(X)for(var Te=0,qe=X.length;Te=0&&(qe=X.slice(Te+1),X=X.slice(0,Te)),X)return arguments.length<2?this[X].on(qe):this[X].on(qe,se);if(arguments.length===2){if(se==null)for(X in this)this.hasOwnProperty(X)&&this[X].on(qe,null);return this}};function ae(X){var se=[],Te=new T;function qe(){for(var Ve=se,Ye=-1,Pt=Ve.length,ot;++Ye=0&&(Te=X.slice(0,se))!=="xmlns"&&(X=X.slice(se+1)),He.hasOwnProperty(Te)?{space:He[Te],local:X}:X}},Le.attr=function(X,se){if(arguments.length<2){if(typeof X=="string"){var Te=this.node();return X=e.ns.qualify(X),X.local?Te.getAttributeNS(X.space,X.local):Te.getAttribute(X)}for(se in X)this.each(lt(se,X[se]));return this}return this.each(lt(X,se))};function lt(X,se){X=e.ns.qualify(X);function Te(){this.removeAttribute(X)}function qe(){this.removeAttributeNS(X.space,X.local)}function Ve(){this.setAttribute(X,se)}function Ye(){this.setAttributeNS(X.space,X.local,se)}function Pt(){var Xt=se.apply(this,arguments);Xt==null?this.removeAttribute(X):this.setAttribute(X,Xt)}function ot(){var Xt=se.apply(this,arguments);Xt==null?this.removeAttributeNS(X.space,X.local):this.setAttributeNS(X.space,X.local,Xt)}return se==null?X.local?qe:Te:typeof se=="function"?X.local?ot:Pt:X.local?Ye:Ve}function mt(X){return X.trim().replace(/\s+/g," ")}Le.classed=function(X,se){if(arguments.length<2){if(typeof X=="string"){var Te=this.node(),qe=(X=at(X)).length,Ve=-1;if(se=Te.classList){for(;++Ve=0;)(Ye=Te[qe])&&(Ve&&Ve!==Ye.nextSibling&&Ve.parentNode.insertBefore(Ye,Ve),Ve=Ye);return this},Le.sort=function(X){X=rt.apply(this,arguments);for(var se=-1,Te=this.length;++se=se&&(se=Ve+1);!(Xt=Pt[se])&&++se0&&(X=X.slice(0,Ve));var Pt=jt.get(X);Pt&&(X=Pt,Ye=mr);function ot(){var pr=this[qe];pr&&(this.removeEventListener(X,pr,pr.$),delete this[qe])}function Xt(){var pr=Ye(se,r(arguments));ot.call(this),this.addEventListener(X,this[qe]=pr,pr.$=Te),pr._=se}function dr(){var pr=new RegExp("^__on([^.]+)"+e.requote(X)+"$"),Ur;for(var zr in this)if(Ur=zr.match(pr)){var gi=this[zr];this.removeEventListener(Ur[1],gi,gi.$),delete this[zr]}}return Ve?se?Xt:ot:se?H:dr}var jt=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&jt.forEach(function(X){"on"+X in n&&jt.remove(X)});function or(X,se){return function(Te){var qe=e.event;e.event=Te,se[0]=this.__data__;try{X.apply(this,se)}finally{e.event=qe}}}function mr(X,se){var Te=or(X,se);return function(qe){var Ve=this,Ye=qe.relatedTarget;(!Ye||Ye!==Ve&&!(Ye.compareDocumentPosition(Ve)&8))&&Te.call(Ve,qe)}}var Ar,ei=0;function qr(X){var se=".dragsuppress-"+ ++ei,Te="click"+se,qe=e.select(a(X)).on("touchmove"+se,_e).on("dragstart"+se,_e).on("selectstart"+se,_e);if(Ar==null&&(Ar="onselectstart"in X?!1:j(X.style,"userSelect")),Ar){var Ve=i(X).style,Ye=Ve[Ar];Ve[Ar]="none"}return function(Pt){if(qe.on(se,null),Ar&&(Ve[Ar]=Ye),Pt){var ot=function(){qe.on(Te,null)};qe.on(Te,function(){_e(),ot()},!0),setTimeout(ot,0)}}}e.mouse=function(X){return gt(X,Ee())};var jr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function gt(X,se){se.changedTouches&&(se=se.changedTouches[0]);var Te=X.ownerSVGElement||X;if(Te.createSVGPoint){var qe=Te.createSVGPoint();if(jr<0){var Ve=a(X);if(Ve.scrollX||Ve.scrollY){Te=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Ye=Te[0][0].getScreenCTM();jr=!(Ye.f||Ye.e),Te.remove()}}return jr?(qe.x=se.pageX,qe.y=se.pageY):(qe.x=se.clientX,qe.y=se.clientY),qe=qe.matrixTransform(X.getScreenCTM().inverse()),[qe.x,qe.y]}var Pt=X.getBoundingClientRect();return[se.clientX-Pt.left-X.clientLeft,se.clientY-Pt.top-X.clientTop]}e.touch=function(X,se,Te){if(arguments.length<3&&(Te=se,se=Ee().changedTouches),se){for(var qe=0,Ve=se.length,Ye;qe0?1:X<0?-1:0}function Ir(X,se,Te){return(se[0]-X[0])*(Te[1]-X[1])-(se[1]-X[1])*(Te[0]-X[0])}function Yr(X){return X>1?0:X<-1?et:Math.acos(X)}function _i(X){return X>1?Kt:X<-1?-Kt:Math.asin(X)}function Pi(X){return((X=Math.exp(X))-1/X)/2}function ai(X){return((X=Math.exp(X))+1/X)/2}function mi(X){return((X=Math.exp(2*X))-1)/(X+1)}function un(X){return(X=Math.sin(X/2))*X}var Fn=Math.SQRT2,An=2,Hn=4;e.interpolateZoom=function(X,se){var Te=X[0],qe=X[1],Ve=X[2],Ye=se[0],Pt=se[1],ot=se[2],Xt=Ye-Te,dr=Pt-qe,pr=Xt*Xt+dr*dr,Ur,zr;if(pr0&&(Un=Un.transition().duration(Pt)),Un.call(Ti.event)}function Ea(){ii&&ii.domain(Wr.range().map(function(Un){return(Un-X.x)/X.k}).map(Wr.invert)),Li&&Li.domain(di.range().map(function(Un){return(Un-X.y)/X.k}).map(di.invert))}function Ia(Un){ot++||Un({type:"zoomstart"})}function yo(Un){Ea(),Un({type:"zoom",scale:X.k,translate:[X.x,X.y]})}function Da(Un){--ot||(Un({type:"zoomend"}),Te=null)}function go(){var Un=this,ja=xi.of(Un,arguments),Fo=0,Uo=e.select(a(Un)).on(dr,bu).on(pr,dl),$s=Qr(e.mouse(Un)),Sl=qr(Un);fa.call(Un),Ia(ja);function bu(){Fo=1,Bn(e.mouse(Un),$s),yo(ja)}function dl(){Uo.on(dr,null).on(pr,null),Sl(Fo),Da(ja)}}function Is(){var Un=this,ja=xi.of(Un,arguments),Fo={},Uo=0,$s,Sl=".zoom-"+e.event.changedTouches[0].identifier,bu="touchmove"+Sl,dl="touchend"+Sl,Sc=[],Me=e.select(Un),bt=qr(Un);Lr(),Ia(ja),Me.on(Xt,null).on(zr,Lr);function Ot(){var Nr=e.touches(Un);return $s=X.k,Nr.forEach(function(vi){vi.identifier in Fo&&(Fo[vi.identifier]=Qr(vi))}),Nr}function Lr(){var Nr=e.event.target;e.select(Nr).on(bu,Vr).on(dl,Or),Sc.push(Nr);for(var vi=e.event.changedTouches,Ni=0,qi=vi.length;Ni1){var Qi=Si[0],ji=Si[1],oi=Qi[0]-ji[0],Tr=Qi[1]-ji[1];Uo=oi*oi+Tr*Tr}}function Vr(){var Nr=e.touches(Un),vi,Ni,qi,Si;fa.call(Un);for(var Vn=0,Qi=Nr.length;Vn1?1:se,Te=Te<0?0:Te>1?1:Te,Ve=Te<=.5?Te*(1+se):Te+se-Te*se,qe=2*Te-Ve;function Ye(ot){return ot>360?ot-=360:ot<0&&(ot+=360),ot<60?qe+(Ve-qe)*ot/60:ot<180?Ve:ot<240?qe+(Ve-qe)*(240-ot)/60:qe}function Pt(ot){return Math.round(Ye(ot)*255)}return new Wa(Pt(X+120),Pt(X),Pt(X-120))}e.hcl=ir;function ir(X,se,Te){return this instanceof ir?(this.h=+X,this.c=+se,void(this.l=+Te)):arguments.length<2?X instanceof ir?new ir(X.h,X.c,X.l):X instanceof ti?Mn(X.l,X.a,X.b):Mn((X=Gn((X=e.rgb(X)).r,X.g,X.b)).l,X.a,X.b):new ir(X,se,Te)}var wr=ir.prototype=new Jn;wr.brighter=function(X){return new ir(this.h,this.c,Math.min(100,this.l+$r*(arguments.length?X:1)))},wr.darker=function(X){return new ir(this.h,this.c,Math.max(0,this.l-$r*(arguments.length?X:1)))},wr.rgb=function(){return Xr(this.h,this.c,this.l).rgb()};function Xr(X,se,Te){return isNaN(X)&&(X=0),isNaN(se)&&(se=0),new ti(Te,Math.cos(X*=Qt)*se,Math.sin(X)*se)}e.lab=ti;function ti(X,se,Te){return this instanceof ti?(this.l=+X,this.a=+se,void(this.b=+Te)):arguments.length<2?X instanceof ti?new ti(X.l,X.a,X.b):X instanceof ir?Xr(X.h,X.c,X.l):Gn((X=Wa(X)).r,X.g,X.b):new ti(X,se,Te)}var $r=18,Ri=.95047,Zi=1,en=1.08883,fn=ti.prototype=new Jn;fn.brighter=function(X){return new ti(Math.min(100,this.l+$r*(arguments.length?X:1)),this.a,this.b)},fn.darker=function(X){return new ti(Math.max(0,this.l-$r*(arguments.length?X:1)),this.a,this.b)},fn.rgb=function(){return yn(this.l,this.a,this.b)};function yn(X,se,Te){var qe=(X+16)/116,Ve=qe+se/500,Ye=qe-Te/200;return Ve=Ba(Ve)*Ri,qe=Ba(qe)*Zi,Ye=Ba(Ye)*en,new Wa(ma(3.2404542*Ve-1.5371385*qe-.4985314*Ye),ma(-.969266*Ve+1.8760108*qe+.041556*Ye),ma(.0556434*Ve-.2040259*qe+1.0572252*Ye))}function Mn(X,se,Te){return X>0?new ir(Math.atan2(Te,se)*Mr,Math.sqrt(se*se+Te*Te),X):new ir(NaN,NaN,X)}function Ba(X){return X>.206893034?X*X*X:(X-4/29)/7.787037}function ua(X){return X>.008856?Math.pow(X,1/3):7.787037*X+4/29}function ma(X){return Math.round(255*(X<=.00304?12.92*X:1.055*Math.pow(X,1/2.4)-.055))}e.rgb=Wa;function Wa(X,se,Te){return this instanceof Wa?(this.r=~~X,this.g=~~se,void(this.b=~~Te)):arguments.length<2?X instanceof Wa?new Wa(X.r,X.g,X.b):Ha(""+X,Wa,tr):new Wa(X,se,Te)}function Fa(X){return new Wa(X>>16,X>>8&255,X&255)}function Xo(X){return Fa(X)+""}var da=Wa.prototype=new Jn;da.brighter=function(X){X=Math.pow(.7,arguments.length?X:1);var se=this.r,Te=this.g,qe=this.b,Ve=30;return!se&&!Te&&!qe?new Wa(Ve,Ve,Ve):(se&&se>4,qe=qe>>4|qe,Ve=Xt&240,Ve=Ve>>4|Ve,Ye=Xt&15,Ye=Ye<<4|Ye):X.length===7&&(qe=(Xt&16711680)>>16,Ve=(Xt&65280)>>8,Ye=Xt&255)),se(qe,Ve,Ye))}function vo(X,se,Te){var qe=Math.min(X/=255,se/=255,Te/=255),Ve=Math.max(X,se,Te),Ye=Ve-qe,Pt,ot,Xt=(Ve+qe)/2;return Ye?(ot=Xt<.5?Ye/(Ve+qe):Ye/(2-Ve-qe),X==Ve?Pt=(se-Te)/Ye+(se0&&Xt<1?0:Pt),new Gt(Pt,ot,Xt)}function Gn(X,se,Te){X=Ct(X),se=Ct(se),Te=Ct(Te);var qe=ua((.4124564*X+.3575761*se+.1804375*Te)/Ri),Ve=ua((.2126729*X+.7151522*se+.072175*Te)/Zi),Ye=ua((.0193339*X+.119192*se+.9503041*Te)/en);return ti(116*Ve-16,500*(qe-Ve),200*(Ve-Ye))}function Ct(X){return(X/=255)<=.04045?X/12.92:Math.pow((X+.055)/1.055,2.4)}function Sr(X){var se=parseFloat(X);return X.charAt(X.length-1)==="%"?Math.round(se*2.55):se}var Jr=e.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});Jr.forEach(function(X,se){Jr.set(X,Fa(se))});function hi(X){return typeof X=="function"?X:function(){return X}}e.functor=hi,e.xhr=hn(G);function hn(X){return function(se,Te,qe){return arguments.length===2&&typeof Te=="function"&&(qe=Te,Te=null),Sn(se,Te,X,qe)}}function Sn(X,se,Te,qe){var Ve={},Ye=e.dispatch("beforesend","progress","load","error"),Pt={},ot=new XMLHttpRequest,Xt=null;self.XDomainRequest&&!("withCredentials"in ot)&&/^(http(s)?:)?\/\//.test(X)&&(ot=new XDomainRequest),"onload"in ot?ot.onload=ot.onerror=dr:ot.onreadystatechange=function(){ot.readyState>3&&dr()};function dr(){var pr=ot.status,Ur;if(!pr&&ki(ot)||pr>=200&&pr<300||pr===304){try{Ur=Te.call(Ve,ot)}catch(zr){Ye.error.call(Ve,zr);return}Ye.load.call(Ve,Ur)}else Ye.error.call(Ve,ot)}return ot.onprogress=function(pr){var Ur=e.event;e.event=pr;try{Ye.progress.call(Ve,ot)}finally{e.event=Ur}},Ve.header=function(pr,Ur){return pr=(pr+"").toLowerCase(),arguments.length<2?Pt[pr]:(Ur==null?delete Pt[pr]:Pt[pr]=Ur+"",Ve)},Ve.mimeType=function(pr){return arguments.length?(se=pr==null?null:pr+"",Ve):se},Ve.responseType=function(pr){return arguments.length?(Xt=pr,Ve):Xt},Ve.response=function(pr){return Te=pr,Ve},["get","post"].forEach(function(pr){Ve[pr]=function(){return Ve.send.apply(Ve,[pr].concat(r(arguments)))}}),Ve.send=function(pr,Ur,zr){if(arguments.length===2&&typeof Ur=="function"&&(zr=Ur,Ur=null),ot.open(pr,X,!0),se!=null&&!("accept"in Pt)&&(Pt.accept=se+",*/*"),ot.setRequestHeader)for(var gi in Pt)ot.setRequestHeader(gi,Pt[gi]);return se!=null&&ot.overrideMimeType&&ot.overrideMimeType(se),Xt!=null&&(ot.responseType=Xt),zr!=null&&Ve.on("error",zr).on("load",function(xi){zr(null,xi)}),Ye.beforesend.call(Ve,ot),ot.send(Ur==null?null:Ur),Ve},Ve.abort=function(){return ot.abort(),Ve},e.rebind(Ve,Ye,"on"),qe==null?Ve:Ve.get(En(qe))}function En(X){return X.length===1?function(se,Te){X(se==null?Te:null)}:X}function ki(X){var se=X.responseType;return se&&se!=="text"?X.response:X.responseText}e.dsv=function(X,se){var Te=new RegExp('["'+X+` +]`),qe=X.charCodeAt(0);function Ve(dr,pr,Ur){arguments.length<3&&(Ur=pr,pr=null);var zr=Sn(dr,se,pr==null?Ye:Pt(pr),Ur);return zr.row=function(gi){return arguments.length?zr.response((pr=gi)==null?Ye:Pt(gi)):pr},zr}function Ye(dr){return Ve.parse(dr.responseText)}function Pt(dr){return function(pr){return Ve.parse(pr.responseText,dr)}}Ve.parse=function(dr,pr){var Ur;return Ve.parseRows(dr,function(zr,gi){if(Ur)return Ur(zr,gi-1);var xi=function(Wr){for(var ii={},di=zr.length,Li=0;Li=xi)return zr;if(Li)return Li=!1,Ur;var Pn=Wr;if(dr.charCodeAt(Pn)===34){for(var kn=Pn;kn++24?(isFinite(se)&&(clearTimeout(Ma),Ma=setTimeout(po,se)),ea=0):(ea=1,_o(po))}e.timer.flush=function(){Lo(),ko()};function Lo(){for(var X=Date.now(),se=_n;se;)X>=se.t&&se.c(X-se.t)&&(se.c=null),se=se.n;return X}function ko(){for(var X,se=_n,Te=1/0;se;)se.c?(se.t=0;--ot)Wr.push(Ve[dr[Ur[ot]][2]]);for(ot=+gi;ot1&&Ir(X[Te[qe-2]],X[Te[qe-1]],X[Ve])<=0;)--qe;Te[qe++]=Ve}return Te.slice(0,qe)}function ul(X,se){return X[0]-se[0]||X[1]-se[1]}e.geom.polygon=function(X){return re(X,zl),X};var zl=e.geom.polygon.prototype=[];zl.area=function(){for(var X=-1,se=this.length,Te,qe=this[se-1],Ve=0;++XJe)ot=ot.L;else if(Pt=se-xo(ot,Te),Pt>Je){if(!ot.R){qe=ot;break}ot=ot.R}else{Ye>-Je?(qe=ot.P,Ve=ot):Pt>-Je?(qe=ot,Ve=ot.N):qe=Ve=ot;break}var Xt=bs(X);if(zs.insert(qe,Xt),!(!qe&&!Ve)){if(qe===Ve){qo(qe),Ve=bs(qe.site),zs.insert(Xt,Ve),Xt.edge=Ve.edge=nf(qe.site,Xt.site),oa(qe),oa(Ve);return}if(!Ve){Xt.edge=nf(qe.site,Xt.site);return}qo(qe),qo(Ve);var dr=qe.site,pr=dr.x,Ur=dr.y,zr=X.x-pr,gi=X.y-Ur,xi=Ve.site,Wr=xi.x-pr,ii=xi.y-Ur,di=2*(zr*ii-gi*Wr),Li=zr*zr+gi*gi,Ti=Wr*Wr+ii*ii,Qr={x:(ii*Li-gi*Ti)/di+pr,y:(zr*Ti-Wr*Li)/di+Ur};pl(Ve.edge,dr,xi,Qr),Xt.edge=nf(dr,X,null,Qr),Ve.edge=nf(X,xi,null,Qr),oa(qe),oa(Ve)}}function ql(X,se){var Te=X.site,qe=Te.x,Ve=Te.y,Ye=Ve-se;if(!Ye)return qe;var Pt=X.P;if(!Pt)return-1/0;Te=Pt.site;var ot=Te.x,Xt=Te.y,dr=Xt-se;if(!dr)return ot;var pr=ot-qe,Ur=1/Ye-1/dr,zr=pr/dr;return Ur?(-zr+Math.sqrt(zr*zr-2*Ur*(pr*pr/(-2*dr)-Xt+dr/2+Ve-Ye/2)))/Ur+qe:(qe+ot)/2}function xo(X,se){var Te=X.N;if(Te)return ql(Te,se);var qe=X.site;return qe.y===se?qe.x:1/0}function Kl(X){this.site=X,this.edges=[]}Kl.prototype.prepare=function(){for(var X=this.edges,se=X.length,Te;se--;)Te=X[se].edge,(!Te.b||!Te.a)&&X.splice(se,1);return X.sort(Hl),X.length};function Ns(X){for(var se=X[0][0],Te=X[1][0],qe=X[0][1],Ve=X[1][1],Ye,Pt,ot,Xt,dr=Ks,pr=dr.length,Ur,zr,gi,xi,Wr,ii;pr--;)if(Ur=dr[pr],!(!Ur||!Ur.prepare()))for(gi=Ur.edges,xi=gi.length,zr=0;zrJe||p(Xt-Pt)>Je)&&(gi.splice(zr,0,new Zc(Vf(Ur.site,ii,p(ot-se)Je?{x:se,y:p(Ye-se)Je?{x:p(Pt-Ve)Je?{x:Te,y:p(Ye-Te)Je?{x:p(Pt-qe)=-We)){var zr=Xt*Xt+dr*dr,gi=pr*pr+ii*ii,xi=(ii*zr-dr*gi)/Ur,Wr=(Xt*gi-pr*zr)/Ur,ii=Wr+ot,di=Su.pop()||new ac;di.arc=X,di.site=Ve,di.x=xi+Pt,di.y=ii+Math.sqrt(xi*xi+Wr*Wr),di.cy=ii,X.circle=di;for(var Li=null,Ti=Yl._;Ti;)if(di.y0)){if(Wr/=gi,gi<0){if(Wr0){if(Wr>zr)return;Wr>Ur&&(Ur=Wr)}if(Wr=Te-ot,!(!gi&&Wr<0)){if(Wr/=gi,gi<0){if(Wr>zr)return;Wr>Ur&&(Ur=Wr)}else if(gi>0){if(Wr0)){if(Wr/=xi,xi<0){if(Wr0){if(Wr>zr)return;Wr>Ur&&(Ur=Wr)}if(Wr=qe-Xt,!(!xi&&Wr<0)){if(Wr/=xi,xi<0){if(Wr>zr)return;Wr>Ur&&(Ur=Wr)}else if(xi>0){if(Wr0&&(Ve.a={x:ot+Ur*gi,y:Xt+Ur*xi}),zr<1&&(Ve.b={x:ot+zr*gi,y:Xt+zr*xi}),Ve}}}}}}function Ol(X){for(var se=cl,Te=Oo(X[0][0],X[0][1],X[1][0],X[1][1]),qe=se.length,Ve;qe--;)Ve=se[qe],(!Pc(Ve,X)||!Te(Ve)||p(Ve.a.x-Ve.b.x)=Ye)return;if(pr>zr){if(!qe)qe={x:xi,y:Pt};else if(qe.y>=ot)return;Te={x:xi,y:ot}}else{if(!qe)qe={x:xi,y:ot};else if(qe.y1)if(pr>zr){if(!qe)qe={x:(Pt-di)/ii,y:Pt};else if(qe.y>=ot)return;Te={x:(ot-di)/ii,y:ot}}else{if(!qe)qe={x:(ot-di)/ii,y:ot};else if(qe.y=Ye)return;Te={x:Ye,y:ii*Ye+di}}else{if(!qe)qe={x:Ye,y:ii*Ye+di};else if(qe.x=pr&&di.x<=zr&&di.y>=Ur&&di.y<=gi?[[pr,gi],[zr,gi],[zr,Ur],[pr,Ur]]:[];Li.point=Xt[Wr]}),dr}function ot(Xt){return Xt.map(function(dr,pr){return{x:Math.round(qe(dr,pr)/Je)*Je,y:Math.round(Ve(dr,pr)/Je)*Je,i:pr}})}return Pt.links=function(Xt){return sc(ot(Xt)).edges.filter(function(dr){return dr.l&&dr.r}).map(function(dr){return{source:Xt[dr.l.i],target:Xt[dr.r.i]}})},Pt.triangles=function(Xt){var dr=[];return sc(ot(Xt)).cells.forEach(function(pr,Ur){for(var zr=pr.site,gi=pr.edges.sort(Hl),xi=-1,Wr=gi.length,ii,di,Li=gi[Wr-1].edge,Ti=Li.l===zr?Li.r:Li.l;++xiTi&&(Ti=pr.x),pr.y>Qr&&(Qr=pr.y),gi.push(pr.x),xi.push(pr.y);else for(Wr=0;WrTi&&(Ti=Pn),kn>Qr&&(Qr=kn),gi.push(Pn),xi.push(kn)}var Bn=Ti-di,na=Qr-Li;Bn>na?Qr=Li+Bn:Ti=di+na;function Ea(Da,go,Is,Ms,Xs,Un,ja,Fo){if(!(isNaN(Is)||isNaN(Ms)))if(Da.leaf){var Uo=Da.x,$s=Da.y;if(Uo!=null)if(p(Uo-Is)+p($s-Ms)<.01)Ia(Da,go,Is,Ms,Xs,Un,ja,Fo);else{var Sl=Da.point;Da.x=Da.y=Da.point=null,Ia(Da,Sl,Uo,$s,Xs,Un,ja,Fo),Ia(Da,go,Is,Ms,Xs,Un,ja,Fo)}else Da.x=Is,Da.y=Ms,Da.point=go}else Ia(Da,go,Is,Ms,Xs,Un,ja,Fo)}function Ia(Da,go,Is,Ms,Xs,Un,ja,Fo){var Uo=(Xs+ja)*.5,$s=(Un+Fo)*.5,Sl=Is>=Uo,bu=Ms>=$s,dl=bu<<1|Sl;Da.leaf=!1,Da=Da.nodes[dl]||(Da.nodes[dl]=$l()),Sl?Xs=Uo:ja=Uo,bu?Un=$s:Fo=$s,Ea(Da,go,Is,Ms,Xs,Un,ja,Fo)}var yo=$l();if(yo.add=function(Da){Ea(yo,Da,+Ur(Da,++Wr),+zr(Da,Wr),di,Li,Ti,Qr)},yo.visit=function(Da){fl(Da,yo,di,Li,Ti,Qr)},yo.find=function(Da){return lc(yo,Da[0],Da[1],di,Li,Ti,Qr)},Wr=-1,se==null){for(;++WrYe||zr>Pt||gi=Pn,na=Te>=kn,Ea=na<<1|Bn,Ia=Ea+4;EaTe&&(Ye=se.slice(Te,Ye),ot[Pt]?ot[Pt]+=Ye:ot[++Pt]=Ye),(qe=qe[0])===(Ve=Ve[0])?ot[Pt]?ot[Pt]+=Ve:ot[++Pt]=Ve:(ot[++Pt]=null,Xt.push({i:Pt,x:Hs(qe,Ve)})),Te=uc.lastIndex;return Te=0&&!(qe=e.interpolators[Te](X,se)););return qe}e.interpolators=[function(X,se){var Te=typeof se;return(Te==="string"?Jr.has(se.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(se)?Fu:Go:se instanceof Jn?Fu:Array.isArray(se)?Gu:Te==="object"&&isNaN(se)?Es:Hs)(X,se)}],e.interpolateArray=Gu;function Gu(X,se){var Te=[],qe=[],Ve=X.length,Ye=se.length,Pt=Math.min(X.length,se.length),ot;for(ot=0;ot=0?X.slice(0,se):X,qe=se>=0?X.slice(se+1):"in";return Te=od.get(Te)||Os,qe=Po.get(qe)||G,sd(qe(Te.apply(null,t.call(arguments,1))))};function sd(X){return function(se){return se<=0?0:se>=1?1:X(se)}}function Ko(X){return function(se){return 1-X(1-se)}}function Pa(X){return function(se){return .5*(se<.5?X(2*se):2-X(2-2*se))}}function of(X){return X*X}function Hu(X){return X*X*X}function bl(X){if(X<=0)return 0;if(X>=1)return 1;var se=X*X,Te=se*X;return 4*(X<.5?Te:3*(X-se)+Te-.75)}function Hf(X){return function(se){return Math.pow(se,X)}}function Ic(X){return 1-Math.cos(X*Kt)}function yf(X){return Math.pow(2,10*(X-1))}function Bl(X){return 1-Math.sqrt(1-X*X)}function Ah(X,se){var Te;return arguments.length<2&&(se=.45),arguments.length?Te=se/xt*Math.asin(1/X):(X=1,Te=se/4),function(qe){return 1+X*Math.pow(2,-10*qe)*Math.sin((qe-Te)*xt/se)}}function Qf(X){return X||(X=1.70158),function(se){return se*se*((X+1)*se-X)}}function _f(X){return X<1/2.75?7.5625*X*X:X<2/2.75?7.5625*(X-=1.5/2.75)*X+.75:X<2.5/2.75?7.5625*(X-=2.25/2.75)*X+.9375:7.5625*(X-=2.625/2.75)*X+.984375}e.interpolateHcl=Yc;function Yc(X,se){X=e.hcl(X),se=e.hcl(se);var Te=X.h,qe=X.c,Ve=X.l,Ye=se.h-Te,Pt=se.c-qe,ot=se.l-Ve;return isNaN(Pt)&&(Pt=0,qe=isNaN(qe)?se.c:qe),isNaN(Ye)?(Ye=0,Te=isNaN(Te)?se.h:Te):Ye>180?Ye-=360:Ye<-180&&(Ye+=360),function(Xt){return Xr(Te+Ye*Xt,qe+Pt*Xt,Ve+ot*Xt)+""}}e.interpolateHsl=eh;function eh(X,se){X=e.hsl(X),se=e.hsl(se);var Te=X.h,qe=X.s,Ve=X.l,Ye=se.h-Te,Pt=se.s-qe,ot=se.l-Ve;return isNaN(Pt)&&(Pt=0,qe=isNaN(qe)?se.s:qe),isNaN(Ye)?(Ye=0,Te=isNaN(Te)?se.h:Te):Ye>180?Ye-=360:Ye<-180&&(Ye+=360),function(Xt){return tr(Te+Ye*Xt,qe+Pt*Xt,Ve+ot*Xt)+""}}e.interpolateLab=th;function th(X,se){X=e.lab(X),se=e.lab(se);var Te=X.l,qe=X.a,Ve=X.b,Ye=se.l-Te,Pt=se.a-qe,ot=se.b-Ve;return function(Xt){return yn(Te+Ye*Xt,qe+Pt*Xt,Ve+ot*Xt)+""}}e.interpolateRound=ju;function ju(X,se){return se-=X,function(Te){return Math.round(X+se*Te)}}e.transform=function(X){var se=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(Te){if(Te!=null){se.setAttribute("transform",Te);var qe=se.transform.baseVal.consolidate()}return new jf(qe?qe.matrix:Kc)})(X)};function jf(X){var se=[X.a,X.b],Te=[X.c,X.d],qe=sf(se),Ve=cc(se,Te),Ye=sf(Nl(Te,se,-Ve))||0;se[0]*Te[1]180?se+=360:se-X>180&&(X+=360),qe.push({i:Te.push(Rc(Te)+"rotate(",null,")")-2,x:Hs(X,se)})):se&&Te.push(Rc(Te)+"rotate("+se+")")}function Wh(X,se,Te,qe){X!==se?qe.push({i:Te.push(Rc(Te)+"skewX(",null,")")-2,x:Hs(X,se)}):se&&Te.push(Rc(Te)+"skewX("+se+")")}function rh(X,se,Te,qe){if(X[0]!==se[0]||X[1]!==se[1]){var Ve=Te.push(Rc(Te)+"scale(",null,",",null,")");qe.push({i:Ve-4,x:Hs(X[0],se[0])},{i:Ve-2,x:Hs(X[1],se[1])})}else(se[0]!==1||se[1]!==1)&&Te.push(Rc(Te)+"scale("+se+")")}function lf(X,se){var Te=[],qe=[];return X=e.transform(X),se=e.transform(se),gs(X.translate,se.translate,Te,qe),Wf(X.rotate,se.rotate,Te,qe),Wh(X.skew,se.skew,Te,qe),rh(X.scale,se.scale,Te,qe),X=se=null,function(Ve){for(var Ye=-1,Pt=qe.length,ot;++Ye0?Ye=Qr:(Te.c=null,Te.t=NaN,Te=null,se.end({type:"end",alpha:Ye=0})):Qr>0&&(se.start({type:"start",alpha:Ye=Qr}),Te=No(X.tick)),X):Ye},X.start=function(){var Qr,Pn=gi.length,kn=xi.length,Bn=qe[0],na=qe[1],Ea,Ia;for(Qr=0;Qr=0;)Ye.push(pr=dr[Xt]),pr.parent=ot,pr.depth=ot.depth+1;Te&&(ot.value=0),ot.children=dr}else Te&&(ot.value=+Te.call(qe,ot,ot.depth)||0),delete ot.children;return wc(Ve,function(Ur){var zr,gi;X&&(zr=Ur.children)&&zr.sort(X),Te&&(gi=Ur.parent)&&(gi.value+=Ur.value)}),Pt}return qe.sort=function(Ve){return arguments.length?(X=Ve,qe):X},qe.children=function(Ve){return arguments.length?(se=Ve,qe):se},qe.value=function(Ve){return arguments.length?(Te=Ve,qe):Te},qe.revalue=function(Ve){return Te&&(Fc(Ve,function(Ye){Ye.children&&(Ye.value=0)}),wc(Ve,function(Ye){var Pt;Ye.children||(Ye.value=+Te.call(qe,Ye,Ye.depth)||0),(Pt=Ye.parent)&&(Pt.value+=Ye.value)})),Ve},qe};function zu(X,se){return e.rebind(X,se,"sort","children","value"),X.nodes=X,X.links=qu,X}function Fc(X,se){for(var Te=[X];(X=Te.pop())!=null;)if(se(X),(Ve=X.children)&&(qe=Ve.length))for(var qe,Ve;--qe>=0;)Te.push(Ve[qe])}function wc(X,se){for(var Te=[X],qe=[];(X=Te.pop())!=null;)if(qe.push(X),(Pt=X.children)&&(Ye=Pt.length))for(var Ve=-1,Ye,Pt;++VeVe&&(Ve=ot),qe.push(ot)}for(Pt=0;Ptqe&&(Te=se,qe=Ve);return Te}function Us(X){return X.reduce(wf,0)}function wf(X,se){return X+se[1]}e.layout.histogram=function(){var X=!0,se=Number,Te=Rf,qe=zc;function Ve(Ye,zr){for(var ot=[],Xt=Ye.map(se,this),dr=Te.call(this,Xt,zr),pr=qe.call(this,dr,Xt,zr),Ur,zr=-1,gi=Xt.length,xi=pr.length-1,Wr=X?1:1/gi,ii;++zr0)for(zr=-1;++zr=dr[0]&&ii<=dr[1]&&(Ur=ot[e.bisect(pr,ii,1,xi)-1],Ur.y+=Wr,Ur.push(Ye[zr]));return ot}return Ve.value=function(Ye){return arguments.length?(se=Ye,Ve):se},Ve.range=function(Ye){return arguments.length?(Te=hi(Ye),Ve):Te},Ve.bins=function(Ye){return arguments.length?(qe=typeof Ye=="number"?function(Pt){return Wu(Pt,Ye)}:hi(Ye),Ve):qe},Ve.frequency=function(Ye){return arguments.length?(X=!!Ye,Ve):X},Ve};function zc(X,se){return Wu(X,Math.ceil(Math.log(se.length)/Math.LN2+1))}function Wu(X,se){for(var Te=-1,qe=+X[0],Ve=(X[1]-qe)/se,Ye=[];++Te<=se;)Ye[Te]=Ve*Te+qe;return Ye}function Rf(X){return[e.min(X),e.max(X)]}e.layout.pack=function(){var X=e.layout.hierarchy().sort(Xu),se=0,Te=[1,1],qe;function Ve(Ye,Pt){var ot=X.call(this,Ye,Pt),Xt=ot[0],dr=Te[0],pr=Te[1],Ur=qe==null?Math.sqrt:typeof qe=="function"?qe:function(){return qe};if(Xt.x=Xt.y=0,wc(Xt,function(gi){gi.r=+Ur(gi.value)}),wc(Xt,ah),se){var zr=se*(qe?1:Math.max(2*Xt.r/dr,2*Xt.r/pr))/2;wc(Xt,function(gi){gi.r+=zr}),wc(Xt,ah),wc(Xt,function(gi){gi.r-=zr})}return Tc(Xt,dr/2,pr/2,qe?1:1/Math.max(2*Xt.r/dr,2*Xt.r/pr)),ot}return Ve.size=function(Ye){return arguments.length?(Te=Ye,Ve):Te},Ve.radius=function(Ye){return arguments.length?(qe=Ye==null||typeof Ye=="function"?Ye:+Ye,Ve):qe},Ve.padding=function(Ye){return arguments.length?(se=+Ye,Ve):se},zu(Ve,X)};function Xu(X,se){return X.value-se.value}function cf(X,se){var Te=X._pack_next;X._pack_next=se,se._pack_prev=X,se._pack_next=Te,Te._pack_prev=se}function Zf(X,se){X._pack_next=se,se._pack_prev=X}function Wl(X,se){var Te=se.x-X.x,qe=se.y-X.y,Ve=X.r+se.r;return .999*Ve*Ve>Te*Te+qe*qe}function ah(X){if(!(se=X.children)||!(zr=se.length))return;var se,Te=1/0,qe=-1/0,Ve=1/0,Ye=-1/0,Pt,ot,Xt,dr,pr,Ur,zr;function gi(Qr){Te=Math.min(Qr.x-Qr.r,Te),qe=Math.max(Qr.x+Qr.r,qe),Ve=Math.min(Qr.y-Qr.r,Ve),Ye=Math.max(Qr.y+Qr.r,Ye)}if(se.forEach(Zu),Pt=se[0],Pt.x=-Pt.r,Pt.y=0,gi(Pt),zr>1&&(ot=se[1],ot.x=ot.r,ot.y=0,gi(ot),zr>2))for(Xt=se[2],wl(Pt,ot,Xt),gi(Xt),cf(Pt,Xt),Pt._pack_prev=Xt,cf(Xt,ot),ot=Pt._pack_next,dr=3;drii.x&&(ii=Pn),Pn.depth>di.depth&&(di=Pn)});var Li=se(Wr,ii)/2-Wr.x,Ti=Te[0]/(ii.x+se(ii,Wr)/2+Li),Qr=Te[1]/(di.depth||1);Fc(gi,function(Pn){Pn.x=(Pn.x+Li)*Ti,Pn.y=Pn.depth*Qr})}return zr}function Ye(pr){for(var Ur={A:null,children:[pr]},zr=[Ur],gi;(gi=zr.pop())!=null;)for(var xi=gi.children,Wr,ii=0,di=xi.length;ii0&&(fc(kt(Wr,pr,zr),pr,Pn),di+=Pn,Li+=Pn),Ti+=Wr.m,di+=gi.m,Qr+=ii.m,Li+=xi.m;Wr&&!ff(xi)&&(xi.t=Wr,xi.m+=Ti-Li),gi&&!Oc(ii)&&(ii.t=gi,ii.m+=di-Qr,zr=pr)}return zr}function dr(pr){pr.x*=Te[0],pr.y=pr.depth*Te[1]}return Ve.separation=function(pr){return arguments.length?(se=pr,Ve):se},Ve.size=function(pr){return arguments.length?(qe=(Te=pr)==null?dr:null,Ve):qe?null:Te},Ve.nodeSize=function(pr){return arguments.length?(qe=(Te=pr)==null?null:dr,Ve):qe?Te:null},zu(Ve,X)};function vu(X,se){return X.parent==se.parent?1:2}function Oc(X){var se=X.children;return se.length?se[0]:X.t}function ff(X){var se=X.children,Te;return(Te=se.length)?se[Te-1]:X.t}function fc(X,se,Te){var qe=Te/(se.i-X.i);se.c-=qe,se.s+=Te,X.c+=qe,se.z+=Te,se.m+=Te}function Bc(X){for(var se=0,Te=0,qe=X.children,Ve=qe.length,Ye;--Ve>=0;)Ye=qe[Ve],Ye.z+=se,Ye.m+=se,se+=Ye.s+(Te+=Ye.c)}function kt(X,se,Te){return X.a.parent===se.parent?X.a:Te}e.layout.cluster=function(){var X=e.layout.hierarchy().sort(null).value(null),se=vu,Te=[1,1],qe=!1;function Ve(Ye,Pt){var ot=X.call(this,Ye,Pt),Xt=ot[0],dr,pr=0;wc(Xt,function(Wr){var ii=Wr.children;ii&&ii.length?(Wr.x=Er(ii),Wr.y=Zt(ii)):(Wr.x=dr?pr+=se(Wr,dr):0,Wr.y=0,dr=Wr)});var Ur=xr(Xt),zr=Kr(Xt),gi=Ur.x-se(Ur,zr)/2,xi=zr.x+se(zr,Ur)/2;return wc(Xt,qe?function(Wr){Wr.x=(Wr.x-Xt.x)*Te[0],Wr.y=(Xt.y-Wr.y)*Te[1]}:function(Wr){Wr.x=(Wr.x-gi)/(xi-gi)*Te[0],Wr.y=(1-(Xt.y?Wr.y/Xt.y:1))*Te[1]}),ot}return Ve.separation=function(Ye){return arguments.length?(se=Ye,Ve):se},Ve.size=function(Ye){return arguments.length?(qe=(Te=Ye)==null,Ve):qe?null:Te},Ve.nodeSize=function(Ye){return arguments.length?(qe=(Te=Ye)!=null,Ve):qe?Te:null},zu(Ve,X)};function Zt(X){return 1+e.max(X,function(se){return se.y})}function Er(X){return X.reduce(function(se,Te){return se+Te.x},0)/X.length}function xr(X){var se=X.children;return se&&se.length?xr(se[0]):X}function Kr(X){var se=X.children,Te;return se&&(Te=se.length)?Kr(se[Te-1]):X}e.layout.treemap=function(){var X=e.layout.hierarchy(),se=Math.round,Te=[1,1],qe=null,Ve=Mi,Ye=!1,Pt,ot="squarify",Xt=.5*(1+Math.sqrt(5));function dr(Wr,ii){for(var di=-1,Li=Wr.length,Ti,Qr;++di0;)Li.push(Qr=Ti[na-1]),Li.area+=Qr.area,ot!=="squarify"||(kn=zr(Li,Bn))<=Pn?(Ti.pop(),Pn=kn):(Li.area-=Li.pop().area,gi(Li,Bn,di,!1),Bn=Math.min(di.dx,di.dy),Li.length=Li.area=0,Pn=1/0);Li.length&&(gi(Li,Bn,di,!0),Li.length=Li.area=0),ii.forEach(pr)}}function Ur(Wr){var ii=Wr.children;if(ii&&ii.length){var di=Ve(Wr),Li=ii.slice(),Ti,Qr=[];for(dr(Li,di.dx*di.dy/Wr.value),Qr.area=0;Ti=Li.pop();)Qr.push(Ti),Qr.area+=Ti.area,Ti.z!=null&&(gi(Qr,Ti.z?di.dx:di.dy,di,!Li.length),Qr.length=Qr.area=0);ii.forEach(Ur)}}function zr(Wr,ii){for(var di=Wr.area,Li,Ti=0,Qr=1/0,Pn=-1,kn=Wr.length;++PnTi&&(Ti=Li));return di*=di,ii*=ii,di?Math.max(ii*Ti*Xt/di,di/(ii*Qr*Xt)):1/0}function gi(Wr,ii,di,Li){var Ti=-1,Qr=Wr.length,Pn=di.x,kn=di.y,Bn=ii?se(Wr.area/ii):0,na;if(ii==di.dx){for((Li||Bn>di.dy)&&(Bn=di.dy);++Tidi.dx)&&(Bn=di.dx);++Ti1);return X+se*qe*Math.sqrt(-2*Math.log(Ye)/Ye)}},logNormal:function(){var X=e.random.normal.apply(e,arguments);return function(){return Math.exp(X())}},bates:function(X){var se=e.random.irwinHall(X);return function(){return se()/X}},irwinHall:function(X){return function(){for(var se=0,Te=0;Te2?Fi:On,dr=qe?Mu:Sh;return Ve=Xt(X,se,dr,Te),Ye=Xt(se,X,dr,xl),ot}function ot(Xt){return Ve(Xt)}return ot.invert=function(Xt){return Ye(Xt)},ot.domain=function(Xt){return arguments.length?(X=Xt.map(Number),Pt()):X},ot.range=function(Xt){return arguments.length?(se=Xt,Pt()):se},ot.rangeRound=function(Xt){return ot.range(Xt).interpolate(ju)},ot.clamp=function(Xt){return arguments.length?(qe=Xt,Pt()):qe},ot.interpolate=function(Xt){return arguments.length?(Te=Xt,Pt()):Te},ot.ticks=function(Xt){return Ua(X,Xt)},ot.tickFormat=function(Xt,dr){return d3_scale_linearTickFormat(X,Xt,dr)},ot.nice=function(Xt){return Ra(X,Xt),Pt()},ot.copy=function(){return ta(X,se,Te,qe)},Pt()}function Ca(X,se){return e.rebind(X,se,"range","rangeRound","interpolate","clamp")}function Ra(X,se){return Yi(X,$i(La(X,se)[2])),Yi(X,$i(La(X,se)[2])),X}function La(X,se){se==null&&(se=10);var Te=dn(X),qe=Te[1]-Te[0],Ve=Math.pow(10,Math.floor(Math.log(qe/se)/Math.LN10)),Ye=se/qe*Ve;return Ye<=.15?Ve*=10:Ye<=.35?Ve*=5:Ye<=.75&&(Ve*=2),Te[0]=Math.ceil(Te[0]/Ve)*Ve,Te[1]=Math.floor(Te[1]/Ve)*Ve+Ve*.5,Te[2]=Ve,Te}function Ua(X,se){return e.range.apply(e,La(X,se))}var Zn={s:1,g:1,p:1,r:1,e:1};function Dn(X){return-Math.floor(Math.log(X)/Math.LN10+.01)}function Ka(X,se){var Te=Dn(se[2]);return X in Zn?Math.abs(Te-Dn(Math.max(p(se[0]),p(se[1]))))+ +(X!=="e"):Te-(X==="%")*2}e.scale.log=function(){return bo(e.scale.linear().domain([0,1]),10,!0,[1,10])};function bo(X,se,Te,qe){function Ve(ot){return(Te?Math.log(ot<0?0:ot):-Math.log(ot>0?0:-ot))/Math.log(se)}function Ye(ot){return Te?Math.pow(se,ot):-Math.pow(se,-ot)}function Pt(ot){return X(Ve(ot))}return Pt.invert=function(ot){return Ye(X.invert(ot))},Pt.domain=function(ot){return arguments.length?(Te=ot[0]>=0,X.domain((qe=ot.map(Number)).map(Ve)),Pt):qe},Pt.base=function(ot){return arguments.length?(se=+ot,X.domain(qe.map(Ve)),Pt):se},Pt.nice=function(){var ot=Yi(qe.map(Ve),Te?Math:Zo);return X.domain(ot),qe=ot.map(Ye),Pt},Pt.ticks=function(){var ot=dn(qe),Xt=[],dr=ot[0],pr=ot[1],Ur=Math.floor(Ve(dr)),zr=Math.ceil(Ve(pr)),gi=se%1?2:se;if(isFinite(zr-Ur)){if(Te){for(;Ur0;xi--)Xt.push(Ye(Ur)*xi);for(Ur=0;Xt[Ur]pr;zr--);Xt=Xt.slice(Ur,zr)}return Xt},Pt.copy=function(){return bo(X.copy(),se,Te,qe)},Ca(Pt,X)}var Zo={floor:function(X){return-Math.ceil(-X)},ceil:function(X){return-Math.floor(-X)}};e.scale.pow=function(){return Ss(e.scale.linear(),1,[0,1])};function Ss(X,se,Te){var qe=as(se),Ve=as(1/se);function Ye(Pt){return X(qe(Pt))}return Ye.invert=function(Pt){return Ve(X.invert(Pt))},Ye.domain=function(Pt){return arguments.length?(X.domain((Te=Pt.map(Number)).map(qe)),Ye):Te},Ye.ticks=function(Pt){return Ua(Te,Pt)},Ye.tickFormat=function(Pt,ot){return d3_scale_linearTickFormat(Te,Pt,ot)},Ye.nice=function(Pt){return Ye.domain(Ra(Te,Pt))},Ye.exponent=function(Pt){return arguments.length?(qe=as(se=Pt),Ve=as(1/se),X.domain(Te.map(qe)),Ye):se},Ye.copy=function(){return Ss(X.copy(),se,Te)},Ca(Ye,X)}function as(X){return function(se){return se<0?-Math.pow(-se,X):Math.pow(se,X)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return ws([],{t:"range",a:[[]]})};function ws(X,se){var Te,qe,Ve;function Ye(ot){return qe[((Te.get(ot)||(se.t==="range"?Te.set(ot,X.push(ot)):NaN))-1)%qe.length]}function Pt(ot,Xt){return e.range(X.length).map(function(dr){return ot+Xt*dr})}return Ye.domain=function(ot){if(!arguments.length)return X;X=[],Te=new T;for(var Xt=-1,dr=ot.length,pr;++Xt0?Te[Ye-1]:X[0],Yezr?0:1;if(pr=At)return Xt(pr,xi)+(dr?Xt(dr,1-xi):"")+"Z";var Wr,ii,di,Li,Ti=0,Qr=0,Pn,kn,Bn,na,Ea,Ia,yo,Da,go=[];if((Li=(+Pt.apply(this,arguments)||0)/2)&&(di=qe===Cu?Math.sqrt(dr*dr+pr*pr):+qe.apply(this,arguments),xi||(Qr*=-1),pr&&(Qr=_i(di/pr*Math.sin(Li))),dr&&(Ti=_i(di/dr*Math.sin(Li)))),pr){Pn=pr*Math.cos(Ur+Qr),kn=pr*Math.sin(Ur+Qr),Bn=pr*Math.cos(zr-Qr),na=pr*Math.sin(zr-Qr);var Is=Math.abs(zr-Ur-2*Qr)<=et?0:1;if(Qr&&Ac(Pn,kn,Bn,na)===xi^Is){var Ms=(Ur+zr)/2;Pn=pr*Math.cos(Ms),kn=pr*Math.sin(Ms),Bn=na=null}}else Pn=kn=0;if(dr){Ea=dr*Math.cos(zr-Ti),Ia=dr*Math.sin(zr-Ti),yo=dr*Math.cos(Ur+Ti),Da=dr*Math.sin(Ur+Ti);var Xs=Math.abs(Ur-zr+2*Ti)<=et?0:1;if(Ti&&Ac(Ea,Ia,yo,Da)===1-xi^Xs){var Un=(Ur+zr)/2;Ea=dr*Math.cos(Un),Ia=dr*Math.sin(Un),yo=Da=null}}else Ea=Ia=0;if(gi>Je&&(Wr=Math.min(Math.abs(pr-dr)/2,+Te.apply(this,arguments)))>.001){ii=dr0?0:1}function Va(X,se,Te,qe,Ve){var Ye=X[0]-se[0],Pt=X[1]-se[1],ot=(Ve?qe:-qe)/Math.sqrt(Ye*Ye+Pt*Pt),Xt=ot*Pt,dr=-ot*Ye,pr=X[0]+Xt,Ur=X[1]+dr,zr=se[0]+Xt,gi=se[1]+dr,xi=(pr+zr)/2,Wr=(Ur+gi)/2,ii=zr-pr,di=gi-Ur,Li=ii*ii+di*di,Ti=Te-qe,Qr=pr*gi-zr*Ur,Pn=(di<0?-1:1)*Math.sqrt(Math.max(0,Ti*Ti*Li-Qr*Qr)),kn=(Qr*di-ii*Pn)/Li,Bn=(-Qr*ii-di*Pn)/Li,na=(Qr*di+ii*Pn)/Li,Ea=(-Qr*ii+di*Pn)/Li,Ia=kn-xi,yo=Bn-Wr,Da=na-xi,go=Ea-Wr;return Ia*Ia+yo*yo>Da*Da+go*go&&(kn=na,Bn=Ea),[[kn-Xt,Bn-dr],[kn*Te/Ti,Bn*Te/Ti]]}function oo(){return!0}function Vc(X){var se=Ds,Te=Fs,qe=oo,Ve=Ku,Ye=Ve.key,Pt=.7;function ot(Xt){var dr=[],pr=[],Ur=-1,zr=Xt.length,gi,xi=hi(se),Wr=hi(Te);function ii(){dr.push("M",Ve(X(pr),Pt))}for(;++Ur1?X.join("L"):X+"Z"}function ue(X){return X.join("L")+"Z"}function w(X){for(var se=0,Te=X.length,qe=X[0],Ve=[qe[0],",",qe[1]];++se1&&Ve.push("H",qe[0]),Ve.join("")}function B(X){for(var se=0,Te=X.length,qe=X[0],Ve=[qe[0],",",qe[1]];++se1){ot=se[1],Ye=X[Xt],Xt++,qe+="C"+(Ve[0]+Pt[0])+","+(Ve[1]+Pt[1])+","+(Ye[0]-ot[0])+","+(Ye[1]-ot[1])+","+Ye[0]+","+Ye[1];for(var dr=2;dr9&&(Ye=Te*3/Math.sqrt(Ye),Pt[ot]=Ye*qe,Pt[ot+1]=Ye*Ve));for(ot=-1;++ot<=Xt;)Ye=(X[Math.min(Xt,ot+1)][0]-X[Math.max(0,ot-1)][0])/(6*(1+Pt[ot]*Pt[ot])),se.push([Ye||0,Pt[ot]*Ye||0]);return se}function qt(X){return X.length<3?Ku(X):X[0]+Ze(X,nt(X))}e.svg.line.radial=function(){var X=Vc(Wt);return X.radius=X.x,delete X.x,X.angle=X.y,delete X.y,X};function Wt(X){for(var se,Te=-1,qe=X.length,Ve,Ye;++Teet)+",1 "+Ur}function dr(pr,Ur,zr,gi){return"Q 0,0 "+gi}return Ye.radius=function(pr){return arguments.length?(Te=hi(pr),Ye):Te},Ye.source=function(pr){return arguments.length?(X=hi(pr),Ye):X},Ye.target=function(pr){return arguments.length?(se=hi(pr),Ye):se},Ye.startAngle=function(pr){return arguments.length?(qe=hi(pr),Ye):qe},Ye.endAngle=function(pr){return arguments.length?(Ve=hi(pr),Ye):Ve},Ye};function Fr(X){return X.radius}e.svg.diagonal=function(){var X=fr,se=br,Te=Hr;function qe(Ve,Ye){var Pt=X.call(this,Ve,Ye),ot=se.call(this,Ve,Ye),Xt=(Pt.y+ot.y)/2,dr=[Pt,{x:Pt.x,y:Xt},{x:ot.x,y:Xt},ot];return dr=dr.map(Te),"M"+dr[0]+"C"+dr[1]+" "+dr[2]+" "+dr[3]}return qe.source=function(Ve){return arguments.length?(X=hi(Ve),qe):X},qe.target=function(Ve){return arguments.length?(se=hi(Ve),qe):se},qe.projection=function(Ve){return arguments.length?(Te=Ve,qe):Te},qe};function Hr(X){return[X.x,X.y]}e.svg.diagonal.radial=function(){var X=e.svg.diagonal(),se=Hr,Te=X.projection;return X.projection=function(qe){return arguments.length?Te(ri(se=qe)):se},X};function ri(X){return function(){var se=X.apply(this,arguments),Te=se[0],qe=se[1]-Kt;return[Te*Math.cos(qe),Te*Math.sin(qe)]}}e.svg.symbol=function(){var X=cn,se=Ci;function Te(qe,Ve){return(Ln.get(X.call(this,qe,Ve))||sn)(se.call(this,qe,Ve))}return Te.type=function(qe){return arguments.length?(X=hi(qe),Te):X},Te.size=function(qe){return arguments.length?(se=hi(qe),Te):se},Te};function Ci(){return 64}function cn(){return"circle"}function sn(X){var se=Math.sqrt(X/et);return"M0,"+se+"A"+se+","+se+" 0 1,1 0,"+-se+"A"+se+","+se+" 0 1,1 0,"+se+"Z"}var Ln=e.map({circle:sn,cross:function(X){var se=Math.sqrt(X/5)/2;return"M"+-3*se+","+-se+"H"+-se+"V"+-3*se+"H"+se+"V"+-se+"H"+3*se+"V"+se+"H"+se+"V"+3*se+"H"+-se+"V"+se+"H"+-3*se+"Z"},diamond:function(X){var se=Math.sqrt(X/(2*Aa)),Te=se*Aa;return"M0,"+-se+"L"+Te+",0 0,"+se+" "+-Te+",0Z"},square:function(X){var se=Math.sqrt(X)/2;return"M"+-se+","+-se+"L"+se+","+-se+" "+se+","+se+" "+-se+","+se+"Z"},"triangle-down":function(X){var se=Math.sqrt(X/Yn),Te=se*Yn/2;return"M0,"+Te+"L"+se+","+-Te+" "+-se+","+-Te+"Z"},"triangle-up":function(X){var se=Math.sqrt(X/Yn),Te=se*Yn/2;return"M0,"+-Te+"L"+se+","+Te+" "+-se+","+Te+"Z"}});e.svg.symbolTypes=Ln.keys();var Yn=Math.sqrt(3),Aa=Math.tan(30*Qt);Le.transition=function(X){for(var se=Bo||++mo,Te=To(X),qe=[],Ve,Ye,Pt=Ps||{time:Date.now(),ease:bl,delay:0,duration:250},ot=-1,Xt=this.length;++ot0;)Ur[--Li].call(X,di);if(ii>=1)return Pt.event&&Pt.event.end.call(X,X.__data__,se),--Ye.count?delete Ye[qe]:delete X[Te],1}Pt||(ot=Ve.time,Xt=No(zr,0,ot),Pt=Ye[qe]={tween:new T,time:ot,timer:Xt,delay:Ve.delay,duration:Ve.duration,ease:Ve.ease,index:se},Ve=null,++Ye.count)}e.svg.axis=function(){var X=e.scale.linear(),se=Ul,Te=6,qe=6,Ve=3,Ye=[10],Pt=null,ot;function Xt(dr){dr.each(function(){var pr=e.select(this),Ur=this.__chart__||X,zr=this.__chart__=X.copy(),gi=Pt==null?zr.ticks?zr.ticks.apply(zr,Ye):zr.domain():Pt,xi=ot==null?zr.tickFormat?zr.tickFormat.apply(zr,Ye):G:ot,Wr=pr.selectAll(".tick").data(gi,zr),ii=Wr.enter().insert("g",".domain").attr("class","tick").style("opacity",Je),di=e.transition(Wr.exit()).style("opacity",Je).remove(),Li=e.transition(Wr.order()).style("opacity",1),Ti=Math.max(Te,0)+Ve,Qr,Pn=wn(zr),kn=pr.selectAll(".domain").data([0]),Bn=(kn.enter().append("path").attr("class","domain"),e.transition(kn));ii.append("line"),ii.append("text");var na=ii.select("line"),Ea=Li.select("line"),Ia=Wr.select("text").text(xi),yo=ii.select("text"),Da=Li.select("text"),go=se==="top"||se==="left"?-1:1,Is,Ms,Xs,Un;if(se==="bottom"||se==="top"?(Qr=au,Is="x",Xs="y",Ms="x2",Un="y2",Ia.attr("dy",go<0?"0em":".71em").style("text-anchor","middle"),Bn.attr("d","M"+Pn[0]+","+go*qe+"V0H"+Pn[1]+"V"+go*qe)):(Qr=Js,Is="y",Xs="x",Ms="y2",Un="x2",Ia.attr("dy",".32em").style("text-anchor",go<0?"end":"start"),Bn.attr("d","M"+go*qe+","+Pn[0]+"H0V"+Pn[1]+"H"+go*qe)),na.attr(Un,go*Te),yo.attr(Xs,go*Ti),Ea.attr(Ms,0).attr(Un,go*Te),Da.attr(Is,0).attr(Xs,go*Ti),zr.rangeBand){var ja=zr,Fo=ja.rangeBand()/2;Ur=zr=function(Uo){return ja(Uo)+Fo}}else Ur.rangeBand?Ur=zr:di.call(Qr,zr,Ur);ii.call(Qr,Ur,zr),Li.call(Qr,zr,zr)})}return Xt.scale=function(dr){return arguments.length?(X=dr,Xt):X},Xt.orient=function(dr){return arguments.length?(se=dr in Lu?dr+"":Ul,Xt):se},Xt.ticks=function(){return arguments.length?(Ye=r(arguments),Xt):Ye},Xt.tickValues=function(dr){return arguments.length?(Pt=dr,Xt):Pt},Xt.tickFormat=function(dr){return arguments.length?(ot=dr,Xt):ot},Xt.tickSize=function(dr){var pr=arguments.length;return pr?(Te=+dr,qe=+arguments[pr-1],Xt):Te},Xt.innerTickSize=function(dr){return arguments.length?(Te=+dr,Xt):Te},Xt.outerTickSize=function(dr){return arguments.length?(qe=+dr,Xt):qe},Xt.tickPadding=function(dr){return arguments.length?(Ve=+dr,Xt):Ve},Xt.tickSubdivide=function(){return arguments.length&&Xt},Xt};var Ul="bottom",Lu={top:1,right:1,bottom:1,left:1};function au(X,se,Te){X.attr("transform",function(qe){var Ve=se(qe);return"translate("+(isFinite(Ve)?Ve:Te(qe))+",0)"})}function Js(X,se,Te){X.attr("transform",function(qe){var Ve=se(qe);return"translate(0,"+(isFinite(Ve)?Ve:Te(qe))+")"})}e.svg.brush=function(){var X=Ce(pr,"brushstart","brush","brushend"),se=null,Te=null,qe=[0,0],Ve=[0,0],Ye,Pt,ot=!0,Xt=!0,dr=dc[0];function pr(Wr){Wr.each(function(){var ii=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",xi).on("touchstart.brush",xi),di=ii.selectAll(".background").data([0]);di.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),ii.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Li=ii.selectAll(".resize").data(dr,G);Li.exit().remove(),Li.enter().append("g").attr("class",function(kn){return"resize "+kn}).style("cursor",function(kn){return eu[kn]}).append("rect").attr("x",function(kn){return/[ew]$/.test(kn)?-3:null}).attr("y",function(kn){return/^[ns]/.test(kn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Li.style("display",pr.empty()?"none":null);var Ti=e.transition(ii),Qr=e.transition(di),Pn;se&&(Pn=wn(se),Qr.attr("x",Pn[0]).attr("width",Pn[1]-Pn[0]),zr(Ti)),Te&&(Pn=wn(Te),Qr.attr("y",Pn[0]).attr("height",Pn[1]-Pn[0]),gi(Ti)),Ur(Ti)})}pr.event=function(Wr){Wr.each(function(){var ii=X.of(this,arguments),di={x:qe,y:Ve,i:Ye,j:Pt},Li=this.__chart__||di;this.__chart__=di,Bo?e.select(this).transition().each("start.brush",function(){Ye=Li.i,Pt=Li.j,qe=Li.x,Ve=Li.y,ii({type:"brushstart"})}).tween("brush:brush",function(){var Ti=Gu(qe,di.x),Qr=Gu(Ve,di.y);return Ye=Pt=null,function(Pn){qe=di.x=Ti(Pn),Ve=di.y=Qr(Pn),ii({type:"brush",mode:"resize"})}}).each("end.brush",function(){Ye=di.i,Pt=di.j,ii({type:"brush",mode:"resize"}),ii({type:"brushend"})}):(ii({type:"brushstart"}),ii({type:"brush",mode:"resize"}),ii({type:"brushend"}))})};function Ur(Wr){Wr.selectAll(".resize").attr("transform",function(ii){return"translate("+qe[+/e$/.test(ii)]+","+Ve[+/^s/.test(ii)]+")"})}function zr(Wr){Wr.select(".extent").attr("x",qe[0]),Wr.selectAll(".extent,.n>rect,.s>rect").attr("width",qe[1]-qe[0])}function gi(Wr){Wr.select(".extent").attr("y",Ve[0]),Wr.selectAll(".extent,.e>rect,.w>rect").attr("height",Ve[1]-Ve[0])}function xi(){var Wr=this,ii=e.select(e.event.target),di=X.of(Wr,arguments),Li=e.select(Wr),Ti=ii.datum(),Qr=!/^(n|s)$/.test(Ti)&&se,Pn=!/^(e|w)$/.test(Ti)&&Te,kn=ii.classed("extent"),Bn=qr(Wr),na,Ea=e.mouse(Wr),Ia,yo=e.select(a(Wr)).on("keydown.brush",Is).on("keyup.brush",Ms);if(e.event.changedTouches?yo.on("touchmove.brush",Xs).on("touchend.brush",ja):yo.on("mousemove.brush",Xs).on("mouseup.brush",ja),Li.interrupt().selectAll("*").interrupt(),kn)Ea[0]=qe[0]-Ea[0],Ea[1]=Ve[0]-Ea[1];else if(Ti){var Da=+/w$/.test(Ti),go=+/^n/.test(Ti);Ia=[qe[1-Da]-Ea[0],Ve[1-go]-Ea[1]],Ea[0]=qe[Da],Ea[1]=Ve[go]}else e.event.altKey&&(na=Ea.slice());Li.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",ii.style("cursor")),di({type:"brushstart"}),Xs();function Is(){e.event.keyCode==32&&(kn||(na=null,Ea[0]-=qe[1],Ea[1]-=Ve[1],kn=2),_e())}function Ms(){e.event.keyCode==32&&kn==2&&(Ea[0]+=qe[1],Ea[1]+=Ve[1],kn=0,_e())}function Xs(){var Fo=e.mouse(Wr),Uo=!1;Ia&&(Fo[0]+=Ia[0],Fo[1]+=Ia[1]),kn||(e.event.altKey?(na||(na=[(qe[0]+qe[1])/2,(Ve[0]+Ve[1])/2]),Ea[0]=qe[+(Fo[0]{(function(e,t){typeof x6=="object"&&typeof Tee!="undefined"?t(x6):(e=e||self,t(e.d3=e.d3||{}))})(x6,function(e){"use strict";var t=new Date,r=new Date;function n(Ae,rt,St,Tt){function dt(Et){return Ae(Et=arguments.length===0?new Date:new Date(+Et)),Et}return dt.floor=function(Et){return Ae(Et=new Date(+Et)),Et},dt.ceil=function(Et){return Ae(Et=new Date(Et-1)),rt(Et,1),Ae(Et),Et},dt.round=function(Et){var pt=dt(Et),jt=dt.ceil(Et);return Et-pt0))return or;do or.push(mr=new Date(+Et)),rt(Et,jt),Ae(Et);while(mr=pt)for(;Ae(pt),!Et(pt);)pt.setTime(pt-1)},function(pt,jt){if(pt>=pt)if(jt<0)for(;++jt<=0;)for(;rt(pt,-1),!Et(pt););else for(;--jt>=0;)for(;rt(pt,1),!Et(pt););})},St&&(dt.count=function(Et,pt){return t.setTime(+Et),r.setTime(+pt),Ae(t),Ae(r),Math.floor(St(t,r))},dt.every=function(Et){return Et=Math.floor(Et),!isFinite(Et)||!(Et>0)?null:Et>1?dt.filter(Tt?function(pt){return Tt(pt)%Et===0}:function(pt){return dt.count(0,pt)%Et===0}):dt}),dt}var i=n(function(){},function(Ae,rt){Ae.setTime(+Ae+rt)},function(Ae,rt){return rt-Ae});i.every=function(Ae){return Ae=Math.floor(Ae),!isFinite(Ae)||!(Ae>0)?null:Ae>1?n(function(rt){rt.setTime(Math.floor(rt/Ae)*Ae)},function(rt,St){rt.setTime(+rt+St*Ae)},function(rt,St){return(St-rt)/Ae}):i};var a=i.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=n(function(Ae){Ae.setTime(Ae-Ae.getMilliseconds())},function(Ae,rt){Ae.setTime(+Ae+rt*o)},function(Ae,rt){return(rt-Ae)/o},function(Ae){return Ae.getUTCSeconds()}),h=f.range,d=n(function(Ae){Ae.setTime(Ae-Ae.getMilliseconds()-Ae.getSeconds()*o)},function(Ae,rt){Ae.setTime(+Ae+rt*s)},function(Ae,rt){return(rt-Ae)/s},function(Ae){return Ae.getMinutes()}),v=d.range,m=n(function(Ae){Ae.setTime(Ae-Ae.getMilliseconds()-Ae.getSeconds()*o-Ae.getMinutes()*s)},function(Ae,rt){Ae.setTime(+Ae+rt*l)},function(Ae,rt){return(rt-Ae)/l},function(Ae){return Ae.getHours()}),b=m.range,p=n(function(Ae){Ae.setHours(0,0,0,0)},function(Ae,rt){Ae.setDate(Ae.getDate()+rt)},function(Ae,rt){return(rt-Ae-(rt.getTimezoneOffset()-Ae.getTimezoneOffset())*s)/u},function(Ae){return Ae.getDate()-1}),k=p.range;function M(Ae){return n(function(rt){rt.setDate(rt.getDate()-(rt.getDay()+7-Ae)%7),rt.setHours(0,0,0,0)},function(rt,St){rt.setDate(rt.getDate()+St*7)},function(rt,St){return(St-rt-(St.getTimezoneOffset()-rt.getTimezoneOffset())*s)/c})}var T=M(0),L=M(1),x=M(2),C=M(3),S=M(4),g=M(5),P=M(6),E=T.range,z=L.range,q=x.range,V=C.range,G=S.range,Z=g.range,j=P.range,N=n(function(Ae){Ae.setDate(1),Ae.setHours(0,0,0,0)},function(Ae,rt){Ae.setMonth(Ae.getMonth()+rt)},function(Ae,rt){return rt.getMonth()-Ae.getMonth()+(rt.getFullYear()-Ae.getFullYear())*12},function(Ae){return Ae.getMonth()}),H=N.range,ie=n(function(Ae){Ae.setMonth(0,1),Ae.setHours(0,0,0,0)},function(Ae,rt){Ae.setFullYear(Ae.getFullYear()+rt)},function(Ae,rt){return rt.getFullYear()-Ae.getFullYear()},function(Ae){return Ae.getFullYear()});ie.every=function(Ae){return!isFinite(Ae=Math.floor(Ae))||!(Ae>0)?null:n(function(rt){rt.setFullYear(Math.floor(rt.getFullYear()/Ae)*Ae),rt.setMonth(0,1),rt.setHours(0,0,0,0)},function(rt,St){rt.setFullYear(rt.getFullYear()+St*Ae)})};var ae=ie.range,_e=n(function(Ae){Ae.setUTCSeconds(0,0)},function(Ae,rt){Ae.setTime(+Ae+rt*s)},function(Ae,rt){return(rt-Ae)/s},function(Ae){return Ae.getUTCMinutes()}),Ee=_e.range,Ce=n(function(Ae){Ae.setUTCMinutes(0,0,0)},function(Ae,rt){Ae.setTime(+Ae+rt*l)},function(Ae,rt){return(rt-Ae)/l},function(Ae){return Ae.getUTCHours()}),ge=Ce.range,re=n(function(Ae){Ae.setUTCHours(0,0,0,0)},function(Ae,rt){Ae.setUTCDate(Ae.getUTCDate()+rt)},function(Ae,rt){return(rt-Ae)/u},function(Ae){return Ae.getUTCDate()-1}),Se=re.range;function ke(Ae){return n(function(rt){rt.setUTCDate(rt.getUTCDate()-(rt.getUTCDay()+7-Ae)%7),rt.setUTCHours(0,0,0,0)},function(rt,St){rt.setUTCDate(rt.getUTCDate()+St*7)},function(rt,St){return(St-rt)/c})}var be=ke(0),Be=ke(1),Le=ke(2),me=ke(3),Pe=ke(4),ce=ke(5),He=ke(6),lt=be.range,mt=Be.range,Ht=Le.range,at=me.range,ct=Pe.range,ar=ce.range,Vt=He.range,rr=n(function(Ae){Ae.setUTCDate(1),Ae.setUTCHours(0,0,0,0)},function(Ae,rt){Ae.setUTCMonth(Ae.getUTCMonth()+rt)},function(Ae,rt){return rt.getUTCMonth()-Ae.getUTCMonth()+(rt.getUTCFullYear()-Ae.getUTCFullYear())*12},function(Ae){return Ae.getUTCMonth()}),tt=rr.range,je=n(function(Ae){Ae.setUTCMonth(0,1),Ae.setUTCHours(0,0,0,0)},function(Ae,rt){Ae.setUTCFullYear(Ae.getUTCFullYear()+rt)},function(Ae,rt){return rt.getUTCFullYear()-Ae.getUTCFullYear()},function(Ae){return Ae.getUTCFullYear()});je.every=function(Ae){return!isFinite(Ae=Math.floor(Ae))||!(Ae>0)?null:n(function(rt){rt.setUTCFullYear(Math.floor(rt.getUTCFullYear()/Ae)*Ae),rt.setUTCMonth(0,1),rt.setUTCHours(0,0,0,0)},function(rt,St){rt.setUTCFullYear(rt.getUTCFullYear()+St*Ae)})};var Ue=je.range;e.timeDay=p,e.timeDays=k,e.timeFriday=g,e.timeFridays=Z,e.timeHour=m,e.timeHours=b,e.timeInterval=n,e.timeMillisecond=i,e.timeMilliseconds=a,e.timeMinute=d,e.timeMinutes=v,e.timeMonday=L,e.timeMondays=z,e.timeMonth=N,e.timeMonths=H,e.timeSaturday=P,e.timeSaturdays=j,e.timeSecond=f,e.timeSeconds=h,e.timeSunday=T,e.timeSundays=E,e.timeThursday=S,e.timeThursdays=G,e.timeTuesday=x,e.timeTuesdays=q,e.timeWednesday=C,e.timeWednesdays=V,e.timeWeek=T,e.timeWeeks=E,e.timeYear=ie,e.timeYears=ae,e.utcDay=re,e.utcDays=Se,e.utcFriday=ce,e.utcFridays=ar,e.utcHour=Ce,e.utcHours=ge,e.utcMillisecond=i,e.utcMilliseconds=a,e.utcMinute=_e,e.utcMinutes=Ee,e.utcMonday=Be,e.utcMondays=mt,e.utcMonth=rr,e.utcMonths=tt,e.utcSaturday=He,e.utcSaturdays=Vt,e.utcSecond=f,e.utcSeconds=h,e.utcSunday=be,e.utcSundays=lt,e.utcThursday=Pe,e.utcThursdays=ct,e.utcTuesday=Le,e.utcTuesdays=Ht,e.utcWednesday=me,e.utcWednesdays=at,e.utcWeek=be,e.utcWeeks=lt,e.utcYear=je,e.utcYears=Ue,Object.defineProperty(e,"__esModule",{value:!0})})});var d3=ye((b6,Aee)=>{(function(e,t){typeof b6=="object"&&typeof Aee!="undefined"?t(b6,Eq()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(b6,function(e,t){"use strict";function r(Ge){if(0<=Ge.y&&Ge.y<100){var Je=new Date(-1,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L);return Je.setFullYear(Ge.y),Je}return new Date(Ge.y,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L)}function n(Ge){if(0<=Ge.y&&Ge.y<100){var Je=new Date(Date.UTC(-1,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L));return Je.setUTCFullYear(Ge.y),Je}return new Date(Date.UTC(Ge.y,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L))}function i(Ge,Je,We){return{y:Ge,m:Je,d:We,H:0,M:0,S:0,L:0}}function a(Ge){var Je=Ge.dateTime,We=Ge.date,et=Ge.time,xt=Ge.periods,At=Ge.days,Kt=Ge.shortDays,Qt=Ge.months,Mr=Ge.shortMonths,Gr=h(xt),Ir=d(xt),Yr=h(At),_i=d(At),Pi=h(Kt),ai=d(Kt),mi=h(Qt),un=d(Qt),Fn=h(Mr),An=d(Mr),Hn={a:Zi,A:en,b:fn,B:yn,c:null,d:N,e:N,f:Ee,H,I:ie,j:ae,L:_e,m:Ce,M:ge,p:Mn,q:Ba,Q:pt,s:jt,S:re,u:Se,U:ke,V:be,w:Be,W:Le,x:null,X:null,y:me,Y:Pe,Z:ce,"%":Et},Qn={a:ua,A:ma,b:Wa,B:Fa,c:null,d:He,e:He,f:ct,H:lt,I:mt,j:Ht,L:at,m:ar,M:Vt,p:Xo,q:da,Q:pt,s:jt,S:rr,u:tt,U:je,V:Ue,w:Ae,W:rt,x:null,X:null,y:St,Y:Tt,Z:dt,"%":Et},Vi={a:tr,A:ir,b:wr,B:Xr,c:ti,d:S,e:S,f:V,H:P,I:P,j:g,L:q,m:C,M:E,p:wt,q:x,Q:Z,s:j,S:z,u:m,U:b,V:p,w:v,W:k,x:$r,X:Ri,y:T,Y:M,Z:L,"%":G};Hn.x=Kn(We,Hn),Hn.X=Kn(et,Hn),Hn.c=Kn(Je,Hn),Qn.x=Kn(We,Qn),Qn.X=Kn(et,Qn),Qn.c=Kn(Je,Qn);function Kn(jn,Ha){return function(vo){var Gn=[],Ct=-1,Sr=0,Jr=jn.length,hi,hn,Sn;for(vo instanceof Date||(vo=new Date(+vo));++Ct53)return null;"w"in Gn||(Gn.w=1),"Z"in Gn?(Sr=n(i(Gn.y,0,1)),Jr=Sr.getUTCDay(),Sr=Jr>4||Jr===0?t.utcMonday.ceil(Sr):t.utcMonday(Sr),Sr=t.utcDay.offset(Sr,(Gn.V-1)*7),Gn.y=Sr.getUTCFullYear(),Gn.m=Sr.getUTCMonth(),Gn.d=Sr.getUTCDate()+(Gn.w+6)%7):(Sr=r(i(Gn.y,0,1)),Jr=Sr.getDay(),Sr=Jr>4||Jr===0?t.timeMonday.ceil(Sr):t.timeMonday(Sr),Sr=t.timeDay.offset(Sr,(Gn.V-1)*7),Gn.y=Sr.getFullYear(),Gn.m=Sr.getMonth(),Gn.d=Sr.getDate()+(Gn.w+6)%7)}else("W"in Gn||"U"in Gn)&&("w"in Gn||(Gn.w="u"in Gn?Gn.u%7:"W"in Gn?1:0),Jr="Z"in Gn?n(i(Gn.y,0,1)).getUTCDay():r(i(Gn.y,0,1)).getDay(),Gn.m=0,Gn.d="W"in Gn?(Gn.w+6)%7+Gn.W*7-(Jr+5)%7:Gn.w+Gn.U*7-(Jr+6)%7);return"Z"in Gn?(Gn.H+=Gn.Z/100|0,Gn.M+=Gn.Z%100,n(Gn)):r(Gn)}}function Gt(jn,Ha,vo,Gn){for(var Ct=0,Sr=Ha.length,Jr=vo.length,hi,hn;Ct=Jr)return-1;if(hi=Ha.charCodeAt(Ct++),hi===37){if(hi=Ha.charAt(Ct++),hn=Vi[hi in o?Ha.charAt(Ct++):hi],!hn||(Gn=hn(jn,vo,Gn))<0)return-1}else if(hi!=vo.charCodeAt(Gn++))return-1}return Gn}function wt(jn,Ha,vo){var Gn=Gr.exec(Ha.slice(vo));return Gn?(jn.p=Ir[Gn[0].toLowerCase()],vo+Gn[0].length):-1}function tr(jn,Ha,vo){var Gn=Pi.exec(Ha.slice(vo));return Gn?(jn.w=ai[Gn[0].toLowerCase()],vo+Gn[0].length):-1}function ir(jn,Ha,vo){var Gn=Yr.exec(Ha.slice(vo));return Gn?(jn.w=_i[Gn[0].toLowerCase()],vo+Gn[0].length):-1}function wr(jn,Ha,vo){var Gn=Fn.exec(Ha.slice(vo));return Gn?(jn.m=An[Gn[0].toLowerCase()],vo+Gn[0].length):-1}function Xr(jn,Ha,vo){var Gn=mi.exec(Ha.slice(vo));return Gn?(jn.m=un[Gn[0].toLowerCase()],vo+Gn[0].length):-1}function ti(jn,Ha,vo){return Gt(jn,Je,Ha,vo)}function $r(jn,Ha,vo){return Gt(jn,We,Ha,vo)}function Ri(jn,Ha,vo){return Gt(jn,et,Ha,vo)}function Zi(jn){return Kt[jn.getDay()]}function en(jn){return At[jn.getDay()]}function fn(jn){return Mr[jn.getMonth()]}function yn(jn){return Qt[jn.getMonth()]}function Mn(jn){return xt[+(jn.getHours()>=12)]}function Ba(jn){return 1+~~(jn.getMonth()/3)}function ua(jn){return Kt[jn.getUTCDay()]}function ma(jn){return At[jn.getUTCDay()]}function Wa(jn){return Mr[jn.getUTCMonth()]}function Fa(jn){return Qt[jn.getUTCMonth()]}function Xo(jn){return xt[+(jn.getUTCHours()>=12)]}function da(jn){return 1+~~(jn.getUTCMonth()/3)}return{format:function(jn){var Ha=Kn(jn+="",Hn);return Ha.toString=function(){return jn},Ha},parse:function(jn){var Ha=Jn(jn+="",!1);return Ha.toString=function(){return jn},Ha},utcFormat:function(jn){var Ha=Kn(jn+="",Qn);return Ha.toString=function(){return jn},Ha},utcParse:function(jn){var Ha=Jn(jn+="",!0);return Ha.toString=function(){return jn},Ha}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,l=/^%/,u=/[\\^$*+?|[\]().{}]/g;function c(Ge,Je,We){var et=Ge<0?"-":"",xt=(et?-Ge:Ge)+"",At=xt.length;return et+(At68?1900:2e3),We+et[0].length):-1}function L(Ge,Je,We){var et=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Je.slice(We,We+6));return et?(Ge.Z=et[1]?0:-(et[2]+(et[3]||"00")),We+et[0].length):-1}function x(Ge,Je,We){var et=s.exec(Je.slice(We,We+1));return et?(Ge.q=et[0]*3-3,We+et[0].length):-1}function C(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.m=et[0]-1,We+et[0].length):-1}function S(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.d=+et[0],We+et[0].length):-1}function g(Ge,Je,We){var et=s.exec(Je.slice(We,We+3));return et?(Ge.m=0,Ge.d=+et[0],We+et[0].length):-1}function P(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.H=+et[0],We+et[0].length):-1}function E(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.M=+et[0],We+et[0].length):-1}function z(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.S=+et[0],We+et[0].length):-1}function q(Ge,Je,We){var et=s.exec(Je.slice(We,We+3));return et?(Ge.L=+et[0],We+et[0].length):-1}function V(Ge,Je,We){var et=s.exec(Je.slice(We,We+6));return et?(Ge.L=Math.floor(et[0]/1e3),We+et[0].length):-1}function G(Ge,Je,We){var et=l.exec(Je.slice(We,We+1));return et?We+et[0].length:-1}function Z(Ge,Je,We){var et=s.exec(Je.slice(We));return et?(Ge.Q=+et[0],We+et[0].length):-1}function j(Ge,Je,We){var et=s.exec(Je.slice(We));return et?(Ge.s=+et[0],We+et[0].length):-1}function N(Ge,Je){return c(Ge.getDate(),Je,2)}function H(Ge,Je){return c(Ge.getHours(),Je,2)}function ie(Ge,Je){return c(Ge.getHours()%12||12,Je,2)}function ae(Ge,Je){return c(1+t.timeDay.count(t.timeYear(Ge),Ge),Je,3)}function _e(Ge,Je){return c(Ge.getMilliseconds(),Je,3)}function Ee(Ge,Je){return _e(Ge,Je)+"000"}function Ce(Ge,Je){return c(Ge.getMonth()+1,Je,2)}function ge(Ge,Je){return c(Ge.getMinutes(),Je,2)}function re(Ge,Je){return c(Ge.getSeconds(),Je,2)}function Se(Ge){var Je=Ge.getDay();return Je===0?7:Je}function ke(Ge,Je){return c(t.timeSunday.count(t.timeYear(Ge)-1,Ge),Je,2)}function be(Ge,Je){var We=Ge.getDay();return Ge=We>=4||We===0?t.timeThursday(Ge):t.timeThursday.ceil(Ge),c(t.timeThursday.count(t.timeYear(Ge),Ge)+(t.timeYear(Ge).getDay()===4),Je,2)}function Be(Ge){return Ge.getDay()}function Le(Ge,Je){return c(t.timeMonday.count(t.timeYear(Ge)-1,Ge),Je,2)}function me(Ge,Je){return c(Ge.getFullYear()%100,Je,2)}function Pe(Ge,Je){return c(Ge.getFullYear()%1e4,Je,4)}function ce(Ge){var Je=Ge.getTimezoneOffset();return(Je>0?"-":(Je*=-1,"+"))+c(Je/60|0,"0",2)+c(Je%60,"0",2)}function He(Ge,Je){return c(Ge.getUTCDate(),Je,2)}function lt(Ge,Je){return c(Ge.getUTCHours(),Je,2)}function mt(Ge,Je){return c(Ge.getUTCHours()%12||12,Je,2)}function Ht(Ge,Je){return c(1+t.utcDay.count(t.utcYear(Ge),Ge),Je,3)}function at(Ge,Je){return c(Ge.getUTCMilliseconds(),Je,3)}function ct(Ge,Je){return at(Ge,Je)+"000"}function ar(Ge,Je){return c(Ge.getUTCMonth()+1,Je,2)}function Vt(Ge,Je){return c(Ge.getUTCMinutes(),Je,2)}function rr(Ge,Je){return c(Ge.getUTCSeconds(),Je,2)}function tt(Ge){var Je=Ge.getUTCDay();return Je===0?7:Je}function je(Ge,Je){return c(t.utcSunday.count(t.utcYear(Ge)-1,Ge),Je,2)}function Ue(Ge,Je){var We=Ge.getUTCDay();return Ge=We>=4||We===0?t.utcThursday(Ge):t.utcThursday.ceil(Ge),c(t.utcThursday.count(t.utcYear(Ge),Ge)+(t.utcYear(Ge).getUTCDay()===4),Je,2)}function Ae(Ge){return Ge.getUTCDay()}function rt(Ge,Je){return c(t.utcMonday.count(t.utcYear(Ge)-1,Ge),Je,2)}function St(Ge,Je){return c(Ge.getUTCFullYear()%100,Je,2)}function Tt(Ge,Je){return c(Ge.getUTCFullYear()%1e4,Je,4)}function dt(){return"+0000"}function Et(){return"%"}function pt(Ge){return+Ge}function jt(Ge){return Math.floor(+Ge/1e3)}var or;mr({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 mr(Ge){return or=a(Ge),e.timeFormat=or.format,e.timeParse=or.parse,e.utcFormat=or.utcFormat,e.utcParse=or.utcParse,or}var Ar="%Y-%m-%dT%H:%M:%S.%LZ";function ei(Ge){return Ge.toISOString()}var qr=Date.prototype.toISOString?ei:e.utcFormat(Ar);function jr(Ge){var Je=new Date(Ge);return isNaN(Je)?null:Je}var gt=+new Date("2000-01-01T00:00:00.000Z")?jr:e.utcParse(Ar);e.isoFormat=qr,e.isoParse=gt,e.timeFormatDefaultLocale=mr,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})})});var kq=ye((w6,See)=>{(function(e,t){typeof w6=="object"&&typeof See!="undefined"?t(w6):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(w6,function(e){"use strict";function t(C){return Math.abs(C=Math.round(C))>=1e21?C.toLocaleString("en").replace(/,/g,""):C.toString(10)}function r(C,S){if((g=(C=S?C.toExponential(S-1):C.toExponential()).indexOf("e"))<0)return null;var g,P=C.slice(0,g);return[P.length>1?P[0]+P.slice(2):P,+C.slice(g+1)]}function n(C){return C=r(Math.abs(C)),C?C[1]:NaN}function i(C,S){return function(g,P){for(var E=g.length,z=[],q=0,V=C[0],G=0;E>0&&V>0&&(G+V+1>P&&(V=Math.max(1,P-G)),z.push(g.substring(E-=V,E+V)),!((G+=V+1)>P));)V=C[q=(q+1)%C.length];return z.reverse().join(S)}}function a(C){return function(S){return S.replace(/[0-9]/g,function(g){return C[+g]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(C){if(!(S=o.exec(C)))throw new Error("invalid format: "+C);var S;return new l({fill:S[1],align:S[2],sign:S[3],symbol:S[4],zero:S[5],width:S[6],comma:S[7],precision:S[8]&&S[8].slice(1),trim:S[9],type:S[10]})}s.prototype=l.prototype;function l(C){this.fill=C.fill===void 0?" ":C.fill+"",this.align=C.align===void 0?">":C.align+"",this.sign=C.sign===void 0?"-":C.sign+"",this.symbol=C.symbol===void 0?"":C.symbol+"",this.zero=!!C.zero,this.width=C.width===void 0?void 0:+C.width,this.comma=!!C.comma,this.precision=C.precision===void 0?void 0:+C.precision,this.trim=!!C.trim,this.type=C.type===void 0?"":C.type+""}l.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 u(C){e:for(var S=C.length,g=1,P=-1,E;g0&&(P=0);break}return P>0?C.slice(0,P)+C.slice(E+1):C}var c;function f(C,S){var g=r(C,S);if(!g)return C+"";var P=g[0],E=g[1],z=E-(c=Math.max(-8,Math.min(8,Math.floor(E/3)))*3)+1,q=P.length;return z===q?P:z>q?P+new Array(z-q+1).join("0"):z>0?P.slice(0,z)+"."+P.slice(z):"0."+new Array(1-z).join("0")+r(C,Math.max(0,S+z-1))[0]}function h(C,S){var g=r(C,S);if(!g)return C+"";var P=g[0],E=g[1];return E<0?"0."+new Array(-E).join("0")+P:P.length>E+1?P.slice(0,E+1)+"."+P.slice(E+1):P+new Array(E-P.length+2).join("0")}var d={"%":function(C,S){return(C*100).toFixed(S)},b:function(C){return Math.round(C).toString(2)},c:function(C){return C+""},d:t,e:function(C,S){return C.toExponential(S)},f:function(C,S){return C.toFixed(S)},g:function(C,S){return C.toPrecision(S)},o:function(C){return Math.round(C).toString(8)},p:function(C,S){return h(C*100,S)},r:h,s:f,X:function(C){return Math.round(C).toString(16).toUpperCase()},x:function(C){return Math.round(C).toString(16)}};function v(C){return C}var m=Array.prototype.map,b=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function p(C){var S=C.grouping===void 0||C.thousands===void 0?v:i(m.call(C.grouping,Number),C.thousands+""),g=C.currency===void 0?"":C.currency[0]+"",P=C.currency===void 0?"":C.currency[1]+"",E=C.decimal===void 0?".":C.decimal+"",z=C.numerals===void 0?v:a(m.call(C.numerals,String)),q=C.percent===void 0?"%":C.percent+"",V=C.minus===void 0?"-":C.minus+"",G=C.nan===void 0?"NaN":C.nan+"";function Z(N){N=s(N);var H=N.fill,ie=N.align,ae=N.sign,_e=N.symbol,Ee=N.zero,Ce=N.width,ge=N.comma,re=N.precision,Se=N.trim,ke=N.type;ke==="n"?(ge=!0,ke="g"):d[ke]||(re===void 0&&(re=12),Se=!0,ke="g"),(Ee||H==="0"&&ie==="=")&&(Ee=!0,H="0",ie="=");var be=_e==="$"?g:_e==="#"&&/[boxX]/.test(ke)?"0"+ke.toLowerCase():"",Be=_e==="$"?P:/[%p]/.test(ke)?q:"",Le=d[ke],me=/[defgprs%]/.test(ke);re=re===void 0?6:/[gprs]/.test(ke)?Math.max(1,Math.min(21,re)):Math.max(0,Math.min(20,re));function Pe(ce){var He=be,lt=Be,mt,Ht,at;if(ke==="c")lt=Le(ce)+lt,ce="";else{ce=+ce;var ct=ce<0||1/ce<0;if(ce=isNaN(ce)?G:Le(Math.abs(ce),re),Se&&(ce=u(ce)),ct&&+ce==0&&ae!=="+"&&(ct=!1),He=(ct?ae==="("?ae:V:ae==="-"||ae==="("?"":ae)+He,lt=(ke==="s"?b[8+c/3]:"")+lt+(ct&&ae==="("?")":""),me){for(mt=-1,Ht=ce.length;++mtat||at>57){lt=(at===46?E+ce.slice(mt+1):ce.slice(mt))+lt,ce=ce.slice(0,mt);break}}}ge&&!Ee&&(ce=S(ce,1/0));var ar=He.length+ce.length+lt.length,Vt=ar>1)+He+ce+lt+Vt.slice(ar);break;default:ce=Vt+He+ce+lt;break}return z(ce)}return Pe.toString=function(){return N+""},Pe}function j(N,H){var ie=Z((N=s(N),N.type="f",N)),ae=Math.max(-8,Math.min(8,Math.floor(n(H)/3)))*3,_e=Math.pow(10,-ae),Ee=b[8+ae/3];return function(Ce){return ie(_e*Ce)+Ee}}return{format:Z,formatPrefix:j}}var k;M({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function M(C){return k=p(C),e.format=k.format,e.formatPrefix=k.formatPrefix,k}function T(C){return Math.max(0,-n(Math.abs(C)))}function L(C,S){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(n(S)/3)))*3-n(Math.abs(C)))}function x(C,S){return C=Math.abs(C),S=Math.abs(S)-C,Math.max(0,n(S)-n(C))+1}e.FormatSpecifier=l,e.formatDefaultLocale=M,e.formatLocale=p,e.formatSpecifier=s,e.precisionFixed=T,e.precisionPrefix=L,e.precisionRound=x,Object.defineProperty(e,"__esModule",{value:!0})})});var Eee=ye((Mrr,Mee)=>{"use strict";Mee.exports=function(e){for(var t=e.length,r,n=0;n13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}});var Eo=ye((Err,kee)=>{"use strict";var Ctt=Eee();kee.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&Ctt(r))return!1}else if(t!=="number")return!1;return e-e<1}});var fs=ye((krr,Cee)=>{"use strict";Cee.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,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}});var Cq=ye((T6,Lee)=>{(function(e,t){typeof T6=="object"&&typeof Lee!="undefined"?t(T6):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(T6,function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n>2],c+=t[(s[l]&3)<<4|s[l+1]>>4],c+=t[(s[l+1]&15)<<2|s[l+2]>>6],c+=t[s[l+2]&63];return u%3===2?c=c.substring(0,c.length-1)+"=":u%3===1&&(c=c.substring(0,c.length-2)+"=="),c},a=function(o){var s=o.length*.75,l=o.length,u,c=0,f,h,d,v;o[o.length-1]==="="&&(s--,o[o.length-2]==="="&&s--);var m=new ArrayBuffer(s),b=new Uint8Array(m);for(u=0;u>4,b[c++]=(h&15)<<4|d>>2,b[c++]=(d&3)<<6|v&63;return m};e.decode=a,e.encode=i,Object.defineProperty(e,"__esModule",{value:!0})})});var Ay=ye((Crr,Pee)=>{"use strict";Pee.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")}});var Yd=ye(xg=>{"use strict";var Ltt=Cq().decode,Ptt=Ay(),Lq=Array.isArray,Itt=ArrayBuffer,Rtt=DataView;function Iee(e){return Itt.isView(e)&&!(e instanceof Rtt)}xg.isTypedArray=Iee;function A6(e){return Lq(e)||Iee(e)}xg.isArrayOrTypedArray=A6;function Dtt(e){return!A6(e[0])}xg.isArray1D=Dtt;xg.ensureArray=function(e,t){return Lq(e)||(e=[]),e.length=t,e};var Ld={u1c:typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,i1:typeof Int8Array=="undefined"?void 0:Int8Array,u1:typeof Uint8Array=="undefined"?void 0:Uint8Array,i2:typeof Int16Array=="undefined"?void 0:Int16Array,u2:typeof Uint16Array=="undefined"?void 0:Uint16Array,i4:typeof Int32Array=="undefined"?void 0:Int32Array,u4:typeof Uint32Array=="undefined"?void 0:Uint32Array,f4:typeof Float32Array=="undefined"?void 0:Float32Array,f8:typeof Float64Array=="undefined"?void 0:Float64Array};Ld.uint8c=Ld.u1c;Ld.uint8=Ld.u1;Ld.int8=Ld.i1;Ld.uint16=Ld.u2;Ld.int16=Ld.i2;Ld.uint32=Ld.u4;Ld.int32=Ld.i4;Ld.float32=Ld.f4;Ld.float64=Ld.f8;function Pq(e){return e.constructor===ArrayBuffer}xg.isArrayBuffer=Pq;xg.decodeTypedArraySpec=function(e){var t=[],r=Ftt(e),n=r.dtype,i=Ld[n];if(!i)throw new Error('Error in dtype: "'+n+'"');var a=i.BYTES_PER_ELEMENT,o=r.bdata;Pq(o)||(o=Ltt(o));var s=r.shape===void 0?[o.byteLength/a]:(""+r.shape).split(",");s.reverse();var l=s.length,u,c,f=+s[0],h=a*f,d=0;if(l===1)t=new i(o);else if(l===2)for(u=+s[1],c=0;c{"use strict";var Dee=Eo(),Rq=Yd().isArrayOrTypedArray;Oee.exports=function(t,r){if(Dee(r))r=String(r);else if(typeof r!="string"||r.slice(-4)==="[-1]")throw"bad property string";var n=r.split("."),i,a,o,s;for(s=0;s{"use strict";var v3=zS(),Ntt=/^\w*$/,Utt=0,Bee=1,S6=2,Nee=3,mb=4;Uee.exports=function(t,r,n,i){n=n||"name",i=i||"value";var a,o,s,l={};r&&r.length?(s=v3(t,r),o=s.get()):o=t,r=r||"";var u={};if(o)for(a=0;a2)return l[d]=l[d]|S6,f.set(h,null);if(c){for(a=d;a{"use strict";var Vtt=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Gtt=/^[^\.\[\]]+$/;Gee.exports=function(e,t){for(;t;){var r=e.match(Vtt);if(r)e=r[1];else if(e.match(Gtt))e="";else throw new Error("bad relativeAttr call:"+[e,t]);if(t.charAt(0)==="^")t=t.slice(1);else break}return e&&t.charAt(0)!=="["?e+"."+t:e+t}});var M6=ye((Drr,jee)=>{"use strict";var Htt=Eo();jee.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var n=Math.log(Math.min(r[0],r[1]))/Math.LN10;return Htt(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var Zee=ye((Frr,Xee)=>{"use strict";var Wee=Yd().isArrayOrTypedArray,qS=Ay();Xee.exports=function e(t,r){for(var n in r){var i=r[n],a=t[n];if(a!==i)if(n.charAt(0)==="_"||typeof i=="function"){if(n in t)continue;t[n]=i}else if(Wee(i)&&Wee(a)&&qS(i[0])){if(n==="customdata"||n==="ids")continue;for(var o=Math.min(i.length,a.length),s=0;s{"use strict";function jtt(e,t){var r=e%t;return r<0?r+t:r}function Wtt(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}Yee.exports={mod:jtt,modHalf:Wtt}});var fd=ye((qrr,E6)=>{(function(e){var t=/^\s+/,r=/\s+$/,n=0,i=e.round,a=e.min,o=e.max,s=e.random;function l(me,Pe){if(me=me||"",Pe=Pe||{},me instanceof l)return me;if(!(this instanceof l))return new l(me,Pe);var ce=u(me);this._originalInput=me,this._r=ce.r,this._g=ce.g,this._b=ce.b,this._a=ce.a,this._roundA=i(100*this._a)/100,this._format=Pe.format||ce.format,this._gradientType=Pe.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=ce.ok,this._tc_id=n++}l.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 me=this.toRgb();return(me.r*299+me.g*587+me.b*114)/1e3},getLuminance:function(){var me=this.toRgb(),Pe,ce,He,lt,mt,Ht;return Pe=me.r/255,ce=me.g/255,He=me.b/255,Pe<=.03928?lt=Pe/12.92:lt=e.pow((Pe+.055)/1.055,2.4),ce<=.03928?mt=ce/12.92:mt=e.pow((ce+.055)/1.055,2.4),He<=.03928?Ht=He/12.92:Ht=e.pow((He+.055)/1.055,2.4),.2126*lt+.7152*mt+.0722*Ht},setAlpha:function(me){return this._a=N(me),this._roundA=i(100*this._a)/100,this},toHsv:function(){var me=d(this._r,this._g,this._b);return{h:me.h*360,s:me.s,v:me.v,a:this._a}},toHsvString:function(){var me=d(this._r,this._g,this._b),Pe=i(me.h*360),ce=i(me.s*100),He=i(me.v*100);return this._a==1?"hsv("+Pe+", "+ce+"%, "+He+"%)":"hsva("+Pe+", "+ce+"%, "+He+"%, "+this._roundA+")"},toHsl:function(){var me=f(this._r,this._g,this._b);return{h:me.h*360,s:me.s,l:me.l,a:this._a}},toHslString:function(){var me=f(this._r,this._g,this._b),Pe=i(me.h*360),ce=i(me.s*100),He=i(me.l*100);return this._a==1?"hsl("+Pe+", "+ce+"%, "+He+"%)":"hsla("+Pe+", "+ce+"%, "+He+"%, "+this._roundA+")"},toHex:function(me){return m(this._r,this._g,this._b,me)},toHexString:function(me){return"#"+this.toHex(me)},toHex8:function(me){return b(this._r,this._g,this._b,this._a,me)},toHex8String:function(me){return"#"+this.toHex8(me)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(H(this._r,255)*100)+"%",g:i(H(this._g,255)*100)+"%",b:i(H(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+i(H(this._r,255)*100)+"%, "+i(H(this._g,255)*100)+"%, "+i(H(this._b,255)*100)+"%)":"rgba("+i(H(this._r,255)*100)+"%, "+i(H(this._g,255)*100)+"%, "+i(H(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Z[m(this._r,this._g,this._b,!0)]||!1},toFilter:function(me){var Pe="#"+p(this._r,this._g,this._b,this._a),ce=Pe,He=this._gradientType?"GradientType = 1, ":"";if(me){var lt=l(me);ce="#"+p(lt._r,lt._g,lt._b,lt._a)}return"progid:DXImageTransform.Microsoft.gradient("+He+"startColorstr="+Pe+",endColorstr="+ce+")"},toString:function(me){var Pe=!!me;me=me||this._format;var ce=!1,He=this._a<1&&this._a>=0,lt=!Pe&&He&&(me==="hex"||me==="hex6"||me==="hex3"||me==="hex4"||me==="hex8"||me==="name");return lt?me==="name"&&this._a===0?this.toName():this.toRgbString():(me==="rgb"&&(ce=this.toRgbString()),me==="prgb"&&(ce=this.toPercentageRgbString()),(me==="hex"||me==="hex6")&&(ce=this.toHexString()),me==="hex3"&&(ce=this.toHexString(!0)),me==="hex4"&&(ce=this.toHex8String(!0)),me==="hex8"&&(ce=this.toHex8String()),me==="name"&&(ce=this.toName()),me==="hsl"&&(ce=this.toHslString()),me==="hsv"&&(ce=this.toHsvString()),ce||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(me,Pe){var ce=me.apply(null,[this].concat([].slice.call(Pe)));return this._r=ce._r,this._g=ce._g,this._b=ce._b,this.setAlpha(ce._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(k,arguments)},saturate:function(){return this._applyModification(M,arguments)},greyscale:function(){return this._applyModification(T,arguments)},spin:function(){return this._applyModification(S,arguments)},_applyCombination:function(me,Pe){return me.apply(null,[this].concat([].slice.call(Pe)))},analogous:function(){return this._applyCombination(q,arguments)},complement:function(){return this._applyCombination(g,arguments)},monochromatic:function(){return this._applyCombination(V,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(E,arguments)}},l.fromRatio=function(me,Pe){if(typeof me=="object"){var ce={};for(var He in me)me.hasOwnProperty(He)&&(He==="a"?ce[He]=me[He]:ce[He]=ge(me[He]));me=ce}return l(me,Pe)};function u(me){var Pe={r:0,g:0,b:0},ce=1,He=null,lt=null,mt=null,Ht=!1,at=!1;return typeof me=="string"&&(me=Be(me)),typeof me=="object"&&(be(me.r)&&be(me.g)&&be(me.b)?(Pe=c(me.r,me.g,me.b),Ht=!0,at=String(me.r).substr(-1)==="%"?"prgb":"rgb"):be(me.h)&&be(me.s)&&be(me.v)?(He=ge(me.s),lt=ge(me.v),Pe=v(me.h,He,lt),Ht=!0,at="hsv"):be(me.h)&&be(me.s)&&be(me.l)&&(He=ge(me.s),mt=ge(me.l),Pe=h(me.h,He,mt),Ht=!0,at="hsl"),me.hasOwnProperty("a")&&(ce=me.a)),ce=N(ce),{ok:Ht,format:me.format||at,r:a(255,o(Pe.r,0)),g:a(255,o(Pe.g,0)),b:a(255,o(Pe.b,0)),a:ce}}function c(me,Pe,ce){return{r:H(me,255)*255,g:H(Pe,255)*255,b:H(ce,255)*255}}function f(me,Pe,ce){me=H(me,255),Pe=H(Pe,255),ce=H(ce,255);var He=o(me,Pe,ce),lt=a(me,Pe,ce),mt,Ht,at=(He+lt)/2;if(He==lt)mt=Ht=0;else{var ct=He-lt;switch(Ht=at>.5?ct/(2-He-lt):ct/(He+lt),He){case me:mt=(Pe-ce)/ct+(Pe1&&(rr-=1),rr<1/6?ar+(Vt-ar)*6*rr:rr<1/2?Vt:rr<2/3?ar+(Vt-ar)*(2/3-rr)*6:ar}if(Pe===0)He=lt=mt=ce;else{var at=ce<.5?ce*(1+Pe):ce+Pe-ce*Pe,ct=2*ce-at;He=Ht(ct,at,me+1/3),lt=Ht(ct,at,me),mt=Ht(ct,at,me-1/3)}return{r:He*255,g:lt*255,b:mt*255}}function d(me,Pe,ce){me=H(me,255),Pe=H(Pe,255),ce=H(ce,255);var He=o(me,Pe,ce),lt=a(me,Pe,ce),mt,Ht,at=He,ct=He-lt;if(Ht=He===0?0:ct/He,He==lt)mt=0;else{switch(He){case me:mt=(Pe-ce)/ct+(Pe>1)+720)%360;--Pe;)He.h=(He.h+lt)%360,mt.push(l(He));return mt}function V(me,Pe){Pe=Pe||6;for(var ce=l(me).toHsv(),He=ce.h,lt=ce.s,mt=ce.v,Ht=[],at=1/Pe;Pe--;)Ht.push(l({h:He,s:lt,v:mt})),mt=(mt+at)%1;return Ht}l.mix=function(me,Pe,ce){ce=ce===0?0:ce||50;var He=l(me).toRgb(),lt=l(Pe).toRgb(),mt=ce/100,Ht={r:(lt.r-He.r)*mt+He.r,g:(lt.g-He.g)*mt+He.g,b:(lt.b-He.b)*mt+He.b,a:(lt.a-He.a)*mt+He.a};return l(Ht)},l.readability=function(me,Pe){var ce=l(me),He=l(Pe);return(e.max(ce.getLuminance(),He.getLuminance())+.05)/(e.min(ce.getLuminance(),He.getLuminance())+.05)},l.isReadable=function(me,Pe,ce){var He=l.readability(me,Pe),lt,mt;switch(mt=!1,lt=Le(ce),lt.level+lt.size){case"AAsmall":case"AAAlarge":mt=He>=4.5;break;case"AAlarge":mt=He>=3;break;case"AAAsmall":mt=He>=7;break}return mt},l.mostReadable=function(me,Pe,ce){var He=null,lt=0,mt,Ht,at,ct;ce=ce||{},Ht=ce.includeFallbackColors,at=ce.level,ct=ce.size;for(var ar=0;arlt&&(lt=mt,He=l(Pe[ar]));return l.isReadable(me,He,{level:at,size:ct})||!Ht?He:(ce.includeFallbackColors=!1,l.mostReadable(me,["#fff","#000"],ce))};var G=l.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"},Z=l.hexNames=j(G);function j(me){var Pe={};for(var ce in me)me.hasOwnProperty(ce)&&(Pe[me[ce]]=ce);return Pe}function N(me){return me=parseFloat(me),(isNaN(me)||me<0||me>1)&&(me=1),me}function H(me,Pe){_e(me)&&(me="100%");var ce=Ee(me);return me=a(Pe,o(0,parseFloat(me))),ce&&(me=parseInt(me*Pe,10)/100),e.abs(me-Pe)<1e-6?1:me%Pe/parseFloat(Pe)}function ie(me){return a(1,o(0,me))}function ae(me){return parseInt(me,16)}function _e(me){return typeof me=="string"&&me.indexOf(".")!=-1&&parseFloat(me)===1}function Ee(me){return typeof me=="string"&&me.indexOf("%")!=-1}function Ce(me){return me.length==1?"0"+me:""+me}function ge(me){return me<=1&&(me=me*100+"%"),me}function re(me){return e.round(parseFloat(me)*255).toString(16)}function Se(me){return ae(me)/255}var ke=function(){var me="[-\\+]?\\d+%?",Pe="[-\\+]?\\d*\\.\\d+%?",ce="(?:"+Pe+")|(?:"+me+")",He="[\\s|\\(]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")\\s*\\)?",lt="[\\s|\\(]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")\\s*\\)?";return{CSS_UNIT:new RegExp(ce),rgb:new RegExp("rgb"+He),rgba:new RegExp("rgba"+lt),hsl:new RegExp("hsl"+He),hsla:new RegExp("hsla"+lt),hsv:new RegExp("hsv"+He),hsva:new RegExp("hsva"+lt),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 be(me){return!!ke.CSS_UNIT.exec(me)}function Be(me){me=me.replace(t,"").replace(r,"").toLowerCase();var Pe=!1;if(G[me])me=G[me],Pe=!0;else if(me=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ce;return(ce=ke.rgb.exec(me))?{r:ce[1],g:ce[2],b:ce[3]}:(ce=ke.rgba.exec(me))?{r:ce[1],g:ce[2],b:ce[3],a:ce[4]}:(ce=ke.hsl.exec(me))?{h:ce[1],s:ce[2],l:ce[3]}:(ce=ke.hsla.exec(me))?{h:ce[1],s:ce[2],l:ce[3],a:ce[4]}:(ce=ke.hsv.exec(me))?{h:ce[1],s:ce[2],v:ce[3]}:(ce=ke.hsva.exec(me))?{h:ce[1],s:ce[2],v:ce[3],a:ce[4]}:(ce=ke.hex8.exec(me))?{r:ae(ce[1]),g:ae(ce[2]),b:ae(ce[3]),a:Se(ce[4]),format:Pe?"name":"hex8"}:(ce=ke.hex6.exec(me))?{r:ae(ce[1]),g:ae(ce[2]),b:ae(ce[3]),format:Pe?"name":"hex"}:(ce=ke.hex4.exec(me))?{r:ae(ce[1]+""+ce[1]),g:ae(ce[2]+""+ce[2]),b:ae(ce[3]+""+ce[3]),a:Se(ce[4]+""+ce[4]),format:Pe?"name":"hex8"}:(ce=ke.hex3.exec(me))?{r:ae(ce[1]+""+ce[1]),g:ae(ce[2]+""+ce[2]),b:ae(ce[3]+""+ce[3]),format:Pe?"name":"hex"}:!1}function Le(me){var Pe,ce;return me=me||{level:"AA",size:"small"},Pe=(me.level||"AA").toUpperCase(),ce=(me.size||"small").toLowerCase(),Pe!=="AA"&&Pe!=="AAA"&&(Pe="AA"),ce!=="small"&&ce!=="large"&&(ce="small"),{level:Pe,size:ce}}typeof E6!="undefined"&&E6.exports?E6.exports=l:window.tinycolor=l})(Math)});var Ao=ye(NS=>{"use strict";var Kee=Ay(),OS=Array.isArray;function Xtt(e,t){var r,n;for(r=0;r{"use strict";Jee.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;n===void 0&&(n=r);var i={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(i.valType="enumerated",i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:i,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(a.size.dflt="auto"),e.autoColor&&(a.color.dflt="auto"),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}});var US=ye((Nrr,$ee)=>{"use strict";$ee.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var W1=ye((Urr,tte)=>{"use strict";var Qee=US(),ete=ec(),Dq=ete({editType:"none"});Dq.family.dflt=Qee.HOVERFONT;Dq.size.dflt=Qee.HOVERFONTSIZE;tte.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversort:{valType:"enumerated",values:["trace","value descending","value ascending"],dflt:"trace",editType:"none"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoveranywhere:{valType:"boolean",dflt:!1,editType:"none"},clickanywhere:{valType:"boolean",dflt:!1,editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:Dq,grouptitlefont:ete({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var g3=ye((Vrr,rte)=>{"use strict";var Ztt=ec(),VS=W1().hoverlabel,GS=Ao().extendFlat;rte.exports={hoverlabel:{bgcolor:GS({},VS.bgcolor,{arrayOk:!0}),bordercolor:GS({},VS.bordercolor,{arrayOk:!0}),font:Ztt({arrayOk:!0,editType:"none"}),align:GS({},VS.align,{arrayOk:!0}),namelength:GS({},VS.namelength,{arrayOk:!0}),showarrow:GS({},VS.showarrow),editType:"none"}}});var Gl=ye((Grr,ite)=>{"use strict";var Ytt=ec(),Ktt=g3();ite.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:Ytt({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:Ktt.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},uirevision:{valType:"any",editType:"none"}}});var yb=ye((Hrr,ote)=>{"use strict";var Jtt=fd(),k6={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},nte=k6.RdBu;function $tt(e,t){if(t||(t=nte),!e)return t;function r(){try{e=k6[e]||JSON.parse(e)}catch(n){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),ate(e)?e:t}function ate(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r{"use strict";_b.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];_b.defaultLine="#444";_b.lightLine="#eee";_b.background="#fff";_b.borderLine="#BEC8D9";_b.lightFraction=100*10/11});var ka=ye((Wrr,ste)=>{"use strict";var wp=fd(),ert=Eo(),trt=Yd().isTypedArray,hd=ste.exports={},C6=Ih();hd.defaults=C6.defaults;var rrt=hd.defaultLine=C6.defaultLine;hd.lightLine=C6.lightLine;var zq=hd.background=C6.background;hd.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"};hd.rgb=function(e){return hd.tinyRGB(wp(e))};hd.opacity=function(e){return e?wp(e).getAlpha():0};hd.addOpacity=function(e,t){var r=wp(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"};hd.combine=function(e,t){var r=wp(e).toRgb();if(r.a===1)return wp(e).toRgbString();var n=wp(t||zq).toRgb(),i=n.a===1?n:{r:255*(1-n.a)+n.r*n.a,g:255*(1-n.a)+n.g*n.a,b:255*(1-n.a)+n.b*n.a},a={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return wp(a).toRgbString()};hd.interpolate=function(e,t,r){var n=wp(e).toRgb(),i=wp(t).toRgb(),a={r:r*n.r+(1-r)*i.r,g:r*n.g+(1-r)*i.g,b:r*n.b+(1-r)*i.b};return wp(a).toRgbString()};hd.contrast=function(e,t,r){var n=wp(e);n.getAlpha()!==1&&(n=wp(hd.combine(e,zq)));var i=n.isDark()?t?n.lighten(t):zq:r?n.darken(r):rrt;return i.toString()};hd.stroke=function(e,t){var r=wp(t);e.style({stroke:hd.tinyRGB(r),"stroke-opacity":r.getAlpha()})};hd.fill=function(e,t){var r=wp(t);e.style({fill:hd.tinyRGB(r),"fill-opacity":r.getAlpha()})};hd.clean=function(e){if(!(!e||typeof e!="object")){var t=Object.keys(e),r,n,i,a;for(r=0;r=0)))return e;if(a===3)n[a]>1&&(n[a]=1);else if(n[a]>=1)return e}var o=Math.round(n[0]*255)+", "+Math.round(n[1]*255)+", "+Math.round(n[2]*255);return i?"rgba("+o+", "+n[3]+")":"rgb("+o+")"}});var X1=ye((Xrr,lte)=>{"use strict";lte.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var m3=ye(ute=>{"use strict";ute.counter=function(e,t,r,n){var i=(t||"")+(r?"":"$"),a=n===!1?"":"^";return e==="xy"?new RegExp(a+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(a+e+"([2-9]|[1-9][0-9]+)?"+i)}});var dte=ye(Tp=>{"use strict";var qq=Eo(),cte=fd(),fte=Ao().extendFlat,irt=Gl(),nrt=yb(),art=ka(),ort=X1().DESELECTDIM,y3=zS(),hte=m3().counter,srt=p3().modHalf,bg=Yd().isArrayOrTypedArray,Z1=Yd().isTypedArraySpec,Y1=Yd().decodeTypedArraySpec;Tp.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(bg(e)?e:Z1(e)?Y1(e):r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),n.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;na===!0||a===!1;i(e)||n.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(i)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,n){Z1(e)&&(e=Y1(e)),!qq(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}Z1(e)&&(e=Y1(e)),e%1||!qq(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if(typeof e!="string"){var i=typeof e=="number";n.strict===!0||!i?t.set(r):t.set(String(e))}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){Z1(e)&&(e=Y1(e)),cte(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){function n(i){return cte(i).isValid()}!Array.isArray(e)||!e.length?t.set(r):e.every(n)?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(nrt.get(e,r))}},angle:{coerceFunction:function(e,t,r){Z1(e)&&(e=Y1(e)),e==="auto"?t.set("auto"):qq(e)?t.set(srt(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var i=n.regex||hte(r);let a=o=>typeof o=="string"&&i.test(o);a(e)||n.arrayOk&&bg(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!hte(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!="string"){t.set(r);return}for(var i=e.split("+"),a=0;a{"use strict";var vte={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","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},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},displayNotifier:{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/un/"},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},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},pte={};function gte(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),gte(n,t[r]))}}gte(vte,pte);mte.exports={configAttributes:vte,dfltConfig:pte}});var Bq=ye((Jrr,yte)=>{"use strict";var Oq=qa(),lrt=Eo(),HS=[];yte.exports=function(e,t,r){var s;if(((s=r==null?void 0:r._context)==null?void 0:s.displayNotifier)===!1||HS.indexOf(e)!==-1)return;HS.push(e);var n=1e3;lrt(t)?n=t:t==="long"&&(n=3e3);var i=Oq.select("body").selectAll(".plotly-notifier").data([0]);i.enter().append("div").classed("plotly-notifier",!0);var a=i.selectAll(".notifier-note").data(HS);function o(l){l.duration(700).style("opacity",0).each("end",function(u){var c=HS.indexOf(u);c!==-1&&HS.splice(c,1),Oq.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var u=Oq.select(this);u.append("button").classed("notifier-close",!0).html("×").on("click",function(){u.transition().call(o)});for(var c=u.append("p"),f=l.split(//g),h=0;h{"use strict";var _3=xb().dfltConfig,Nq=Bq(),Uq=_te.exports={};Uq.log=function(){var e;if(_3.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};Uq.warn=function(){var e;if(_3.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};Uq.error=function(){var e;if(_3.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var P6=ye((Qrr,xte)=>{"use strict";xte.exports=function(){}});var Vq=ye((eir,bte)=>{"use strict";bte.exports=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),i=0;i{wte.exports=urt;function urt(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Ste=ye((rir,Ate)=>{Ate.exports=crt;function crt(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}});var Ete=ye((iir,Mte)=>{Mte.exports=frt;function frt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var Gq=ye((nir,kte)=>{kte.exports=hrt;function hrt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Lte=ye((air,Cte)=>{Cte.exports=drt;function drt(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}});var Ite=ye((oir,Pte)=>{Pte.exports=vrt;function vrt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],v=t[12],m=t[13],b=t[14],p=t[15],k=r*s-n*o,M=r*l-i*o,T=r*u-a*o,L=n*l-i*s,x=n*u-a*s,C=i*u-a*l,S=c*m-f*v,g=c*b-h*v,P=c*p-d*v,E=f*b-h*m,z=f*p-d*m,q=h*p-d*b,V=k*q-M*z+T*E+L*P-x*g+C*S;return V?(V=1/V,e[0]=(s*q-l*z+u*E)*V,e[1]=(i*z-n*q-a*E)*V,e[2]=(m*C-b*x+p*L)*V,e[3]=(h*x-f*C-d*L)*V,e[4]=(l*P-o*q-u*g)*V,e[5]=(r*q-i*P+a*g)*V,e[6]=(b*T-v*C-p*M)*V,e[7]=(c*C-h*T+d*M)*V,e[8]=(o*z-s*P+u*S)*V,e[9]=(n*P-r*z-a*S)*V,e[10]=(v*x-m*T+p*k)*V,e[11]=(f*T-c*x-d*k)*V,e[12]=(s*g-o*E-l*S)*V,e[13]=(r*E-n*g+i*S)*V,e[14]=(m*M-v*L-b*k)*V,e[15]=(c*L-f*M+h*k)*V,e):null}});var Dte=ye((sir,Rte)=>{Rte.exports=prt;function prt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],v=t[12],m=t[13],b=t[14],p=t[15];return e[0]=s*(h*p-d*b)-f*(l*p-u*b)+m*(l*d-u*h),e[1]=-(n*(h*p-d*b)-f*(i*p-a*b)+m*(i*d-a*h)),e[2]=n*(l*p-u*b)-s*(i*p-a*b)+m*(i*u-a*l),e[3]=-(n*(l*d-u*h)-s*(i*d-a*h)+f*(i*u-a*l)),e[4]=-(o*(h*p-d*b)-c*(l*p-u*b)+v*(l*d-u*h)),e[5]=r*(h*p-d*b)-c*(i*p-a*b)+v*(i*d-a*h),e[6]=-(r*(l*p-u*b)-o*(i*p-a*b)+v*(i*u-a*l)),e[7]=r*(l*d-u*h)-o*(i*d-a*h)+c*(i*u-a*l),e[8]=o*(f*p-d*m)-c*(s*p-u*m)+v*(s*d-u*f),e[9]=-(r*(f*p-d*m)-c*(n*p-a*m)+v*(n*d-a*f)),e[10]=r*(s*p-u*m)-o*(n*p-a*m)+v*(n*u-a*s),e[11]=-(r*(s*d-u*f)-o*(n*d-a*f)+c*(n*u-a*s)),e[12]=-(o*(f*b-h*m)-c*(s*b-l*m)+v*(s*h-l*f)),e[13]=r*(f*b-h*m)-c*(n*b-i*m)+v*(n*h-i*f),e[14]=-(r*(s*b-l*m)-o*(n*b-i*m)+v*(n*l-i*s)),e[15]=r*(s*h-l*f)-o*(n*h-i*f)+c*(n*l-i*s),e}});var zte=ye((lir,Fte)=>{Fte.exports=grt;function grt(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11],d=e[12],v=e[13],m=e[14],b=e[15],p=t*o-r*a,k=t*s-n*a,M=t*l-i*a,T=r*s-n*o,L=r*l-i*o,x=n*l-i*s,C=u*v-c*d,S=u*m-f*d,g=u*b-h*d,P=c*m-f*v,E=c*b-h*v,z=f*b-h*m;return p*z-k*E+M*P+T*g-L*S+x*C}});var Ote=ye((uir,qte)=>{qte.exports=mrt;function mrt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],h=t[9],d=t[10],v=t[11],m=t[12],b=t[13],p=t[14],k=t[15],M=r[0],T=r[1],L=r[2],x=r[3];return e[0]=M*n+T*s+L*f+x*m,e[1]=M*i+T*l+L*h+x*b,e[2]=M*a+T*u+L*d+x*p,e[3]=M*o+T*c+L*v+x*k,M=r[4],T=r[5],L=r[6],x=r[7],e[4]=M*n+T*s+L*f+x*m,e[5]=M*i+T*l+L*h+x*b,e[6]=M*a+T*u+L*d+x*p,e[7]=M*o+T*c+L*v+x*k,M=r[8],T=r[9],L=r[10],x=r[11],e[8]=M*n+T*s+L*f+x*m,e[9]=M*i+T*l+L*h+x*b,e[10]=M*a+T*u+L*d+x*p,e[11]=M*o+T*c+L*v+x*k,M=r[12],T=r[13],L=r[14],x=r[15],e[12]=M*n+T*s+L*f+x*m,e[13]=M*i+T*l+L*h+x*b,e[14]=M*a+T*u+L*d+x*p,e[15]=M*o+T*c+L*v+x*k,e}});var Nte=ye((cir,Bte)=>{Bte.exports=yrt;function yrt(e,t,r){var n=r[0],i=r[1],a=r[2],o,s,l,u,c,f,h,d,v,m,b,p;return t===e?(e[12]=t[0]*n+t[4]*i+t[8]*a+t[12],e[13]=t[1]*n+t[5]*i+t[9]*a+t[13],e[14]=t[2]*n+t[6]*i+t[10]*a+t[14],e[15]=t[3]*n+t[7]*i+t[11]*a+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],h=t[6],d=t[7],v=t[8],m=t[9],b=t[10],p=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=d,e[8]=v,e[9]=m,e[10]=b,e[11]=p,e[12]=o*n+c*i+v*a+t[12],e[13]=s*n+f*i+m*a+t[13],e[14]=l*n+h*i+b*a+t[14],e[15]=u*n+d*i+p*a+t[15]),e}});var Vte=ye((fir,Ute)=>{Ute.exports=_rt;function _rt(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var Hte=ye((hir,Gte)=>{Gte.exports=xrt;function xrt(e,t,r,n){var i=n[0],a=n[1],o=n[2],s=Math.sqrt(i*i+a*a+o*o),l,u,c,f,h,d,v,m,b,p,k,M,T,L,x,C,S,g,P,E,z,q,V,G;return Math.abs(s)<1e-6?null:(s=1/s,i*=s,a*=s,o*=s,l=Math.sin(r),u=Math.cos(r),c=1-u,f=t[0],h=t[1],d=t[2],v=t[3],m=t[4],b=t[5],p=t[6],k=t[7],M=t[8],T=t[9],L=t[10],x=t[11],C=i*i*c+u,S=a*i*c+o*l,g=o*i*c-a*l,P=i*a*c-o*l,E=a*a*c+u,z=o*a*c+i*l,q=i*o*c+a*l,V=a*o*c-i*l,G=o*o*c+u,e[0]=f*C+m*S+M*g,e[1]=h*C+b*S+T*g,e[2]=d*C+p*S+L*g,e[3]=v*C+k*S+x*g,e[4]=f*P+m*E+M*z,e[5]=h*P+b*E+T*z,e[6]=d*P+p*E+L*z,e[7]=v*P+k*E+x*z,e[8]=f*q+m*V+M*G,e[9]=h*q+b*V+T*G,e[10]=d*q+p*V+L*G,e[11]=v*q+k*V+x*G,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var Wte=ye((dir,jte)=>{jte.exports=brt;function brt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+u*n,e[5]=o*i+c*n,e[6]=s*i+f*n,e[7]=l*i+h*n,e[8]=u*i-a*n,e[9]=c*i-o*n,e[10]=f*i-s*n,e[11]=h*i-l*n,e}});var Zte=ye((vir,Xte)=>{Xte.exports=wrt;function wrt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-u*n,e[1]=o*i-c*n,e[2]=s*i-f*n,e[3]=l*i-h*n,e[8]=a*n+u*i,e[9]=o*n+c*i,e[10]=s*n+f*i,e[11]=l*n+h*i,e}});var Kte=ye((pir,Yte)=>{Yte.exports=Trt;function Trt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],h=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i+u*n,e[1]=o*i+c*n,e[2]=s*i+f*n,e[3]=l*i+h*n,e[4]=u*i-a*n,e[5]=c*i-o*n,e[6]=f*i-s*n,e[7]=h*i-l*n,e}});var $te=ye((gir,Jte)=>{Jte.exports=Art;function Art(e,t,r){var n,i,a,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,s*=u,l*=u,n=Math.sin(t),i=Math.cos(t),a=1-i,e[0]=o*o*a+i,e[1]=s*o*a+l*n,e[2]=l*o*a-s*n,e[3]=0,e[4]=o*s*a-l*n,e[5]=s*s*a+i,e[6]=l*s*a+o*n,e[7]=0,e[8]=o*l*a+s*n,e[9]=s*l*a-o*n,e[10]=l*l*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var ere=ye((mir,Qte)=>{Qte.exports=Srt;function Srt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,l=i+i,u=a+a,c=n*s,f=n*l,h=n*u,d=i*l,v=i*u,m=a*u,b=o*s,p=o*l,k=o*u;return e[0]=1-(d+m),e[1]=f+k,e[2]=h-p,e[3]=0,e[4]=f-k,e[5]=1-(c+m),e[6]=v+b,e[7]=0,e[8]=h+p,e[9]=v-b,e[10]=1-(c+d),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var rre=ye((yir,tre)=>{tre.exports=Mrt;function Mrt(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var nre=ye((_ir,ire)=>{ire.exports=Ert;function Ert(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var ore=ye((xir,are)=>{are.exports=krt;function krt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var lre=ye((bir,sre)=>{sre.exports=Crt;function Crt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var cre=ye((wir,ure)=>{ure.exports=Lrt;function Lrt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var hre=ye((Tir,fre)=>{fre.exports=Prt;function Prt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,f=n*s,h=i*o,d=i*s,v=i*l,m=a*o,b=a*s,p=a*l;return e[0]=1-f-v,e[1]=c+p,e[2]=h-b,e[3]=0,e[4]=c-p,e[5]=1-u-v,e[6]=d+m,e[7]=0,e[8]=h+b,e[9]=d-m,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var vre=ye((Air,dre)=>{dre.exports=Irt;function Irt(e,t,r,n,i,a,o){var s=1/(r-t),l=1/(i-n),u=1/(a-o);return e[0]=a*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a*2*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*l,e[10]=(o+a)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*u,e[15]=0,e}});var gre=ye((Sir,pre)=>{pre.exports=Rrt;function Rrt(e,t,r,n,i){var a=1/Math.tan(t/2),o=1/(n-i);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*n*o,e[15]=0,e}});var yre=ye((Mir,mre)=>{mre.exports=Drt;function Drt(e,t,r,n){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(i-a)*u*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}});var xre=ye((Eir,_re)=>{_re.exports=Frt;function Frt(e,t,r,n,i,a,o){var s=1/(t-r),l=1/(n-i),u=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(o+a)*u,e[15]=1,e}});var wre=ye((kir,bre)=>{var zrt=Gq();bre.exports=qrt;function qrt(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v=t[0],m=t[1],b=t[2],p=n[0],k=n[1],M=n[2],T=r[0],L=r[1],x=r[2];return Math.abs(v-T)<1e-6&&Math.abs(m-L)<1e-6&&Math.abs(b-x)<1e-6?zrt(e):(c=v-T,f=m-L,h=b-x,d=1/Math.sqrt(c*c+f*f+h*h),c*=d,f*=d,h*=d,i=k*h-M*f,a=M*c-p*h,o=p*f-k*c,d=Math.sqrt(i*i+a*a+o*o),d?(d=1/d,i*=d,a*=d,o*=d):(i=0,a=0,o=0),s=f*o-h*a,l=h*i-c*o,u=c*a-f*i,d=Math.sqrt(s*s+l*l+u*u),d?(d=1/d,s*=d,l*=d,u*=d):(s=0,l=0,u=0),e[0]=i,e[1]=s,e[2]=c,e[3]=0,e[4]=a,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=u,e[10]=h,e[11]=0,e[12]=-(i*v+a*m+o*b),e[13]=-(s*v+l*m+u*b),e[14]=-(c*v+f*m+h*b),e[15]=1,e)}});var Are=ye((Cir,Tre)=>{Tre.exports=Ort;function Ort(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}});var Hq=ye((Lir,Sre)=>{Sre.exports={create:Tte(),clone:Ste(),copy:Ete(),identity:Gq(),transpose:Lte(),invert:Ite(),adjoint:Dte(),determinant:zte(),multiply:Ote(),translate:Nte(),scale:Vte(),rotate:Hte(),rotateX:Wte(),rotateY:Zte(),rotateZ:Kte(),fromRotation:$te(),fromRotationTranslation:ere(),fromScaling:rre(),fromTranslation:nre(),fromXRotation:ore(),fromYRotation:lre(),fromZRotation:cre(),fromQuat:hre(),frustum:vre(),perspective:gre(),perspectiveFromFieldOfView:yre(),ortho:xre(),lookAt:wre(),str:Are()}});var I6=ye(fh=>{"use strict";var Brt=Hq();fh.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{"use strict";var Nrt=qa(),Mre=K1(),Urt=I6(),Vrt=Hq();function Grt(e){var t;if(typeof e=="string"){if(t=document.getElementById(e),t===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function Hrt(e){var t=Nrt.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function Ere(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function jrt(e,t){kre("global",e,t)}function kre(e,t,r){var n="plotly.js-style-"+e,i=document.getElementById(n);if(!(i&&i.matches(".no-inline-styles"))){i||(i=document.createElement("style"),i.setAttribute("id",n),i.appendChild(document.createTextNode("")),document.head.appendChild(i));var a=i.sheet;a?a.insertRule?a.insertRule(t+"{"+r+"}",0):a.addRule?a.addRule(t,r,0):Mre.warn("addStyleRule failed"):Mre.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function Wrt(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&Ere(r)}function Xrt(e,t,r,n,i,a){var o=n.split(":"),s=i.split(":"),l="data-btn-style-event-added";a||(a=document),a.querySelectorAll(e).forEach(function(u){u.getAttribute(l)||(u.addEventListener("mouseenter",function(){var c=this.querySelector(r);c&&(c.style[o[0]]=o[1])}),u.addEventListener("mouseleave",function(){var c=this.querySelector(r);c&&(t&&this.matches(t)?c.style[o[0]]=o[1]:c.style[s[0]]=s[1])}),u.setAttribute(l,!0))})}function Zrt(e){var t=Lre(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(n){var i=Cre(n);if(i){var a=Urt.convertCssMatrix(i);r=Vrt.multiply(r,r,a)}}),r}function Cre(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(n){return+n})}function Lre(e){for(var t=[];Yrt(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function Yrt(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function Krt(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}Pre.exports={getGraphDiv:Grt,isPlotDiv:Hrt,removeElement:Ere,addStyleRule:jrt,addRelatedStyleRule:kre,deleteRelatedStyleRule:Wrt,setStyleOnHover:Xrt,getFullTransformMatrix:Zrt,getElementTransformMatrix:Cre,getElementAndAncestors:Lre,equalDomRects:Krt}});var WS=ye((Rir,Ire)=>{"use strict";Ire.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}});var mc=ye((Dir,Bre)=>{"use strict";var Dre=Ao().extendFlat,Jrt=Ay(),Fre={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},zre={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},$rt=Fre.flags.slice().concat(["fullReplot"]),Qrt=zre.flags.slice().concat("layoutReplot");Bre.exports={traces:Fre,layout:zre,traceFlags:function(){return Rre($rt)},layoutFlags:function(){return Rre(Qrt)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var n=r.split("+"),i=0;i{"use strict";jq.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};jq.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",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"}});var Wq=ye((zir,Nre)=>{"use strict";Nre.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"}});var Ll=ye(x3=>{"use strict";var{DATE_FORMAT_LINK:eit,FORMAT_LINK:tit}=Wq(),rit=["Variables that can't be found will be replaced with the specifier.",'For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.',"Variables with an undefined value will be replaced with the fallback value."].join(" ");function iit({supportOther:e}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,tit,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,eit,"for details on the date formatting syntax.",rit].join(" ")}x3.templateFormatStringDescription=iit;x3.hovertemplateAttrs=({editType:e="none",arrayOk:t}={},r={})=>_g({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});x3.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>_g({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});x3.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e});x3.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})});var F6=ye((Bir,Wre)=>{"use strict";function J1(e,t){return t?t.d2l(e):e}function Ure(e,t){return t?t.l2d(e):e}function nit(e){return e.x0}function ait(e){return e.x1}function oit(e){return e.y0}function sit(e){return e.y1}function Vre(e){return e.x0shift||0}function Gre(e){return e.x1shift||0}function Hre(e){return e.y0shift||0}function jre(e){return e.y1shift||0}function R6(e,t){return J1(e.x1,t)+Gre(e)-J1(e.x0,t)-Vre(e)}function D6(e,t,r){return J1(e.y1,r)+jre(e)-J1(e.y0,r)-Hre(e)}function lit(e,t){return Math.abs(R6(e,t))}function uit(e,t,r){return Math.abs(D6(e,t,r))}function cit(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(R6(e,t),2)+Math.pow(D6(e,t,r),2))}function fit(e,t){return Ure((J1(e.x1,t)+Gre(e)+J1(e.x0,t)+Vre(e))/2,t)}function hit(e,t,r){return Ure((J1(e.y1,r)+jre(e)+J1(e.y0,r)+Hre(e))/2,r)}function dit(e,t,r){return e.type!=="line"?void 0:D6(e,t,r)/R6(e,t)}var vit=["x0","x1","y0","y1","dy","height","ycenter"],pit=["x0","x1","y0","y1","dx","width","xcenter"];Wre.exports={x0:nit,x1:ait,y0:oit,y1:sit,slope:dit,dx:R6,dy:D6,width:lit,height:uit,length:cit,xcenter:fit,ycenter:hit,simpleXVariables:vit,simpleYVariables:pit}});var Yre=ye((Nir,Zre)=>{"use strict";var git=mc().overrideAll,bb=Gl(),Xre=ec(),mit=Pd().dash,$1=Ao().extendFlat,{shapeTexttemplateAttrs:yit,templatefallbackAttrs:_it}=Ll(),xit=F6();Zre.exports=git({newshape:{visible:$1({},bb.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:$1({},bb.legend,{}),legendgroup:$1({},bb.legendgroup,{}),legendgrouptitle:{text:$1({},bb.legendgrouptitle.text,{}),font:Xre({})},legendrank:$1({},bb.legendrank,{}),legendwidth:$1({},bb.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:$1({},mit,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:$1({},bb.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:yit({newshape:!0},{keys:Object.keys(xit)}),texttemplatefallback:_it({editType:"arraydraw"}),font:Xre({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var Jre=ye((Uir,Kre)=>{"use strict";var bit=Pd().dash,wit=Ao().extendFlat;Kre.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:wit({},bit,{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"}}});var z6=ye((Vir,$re)=>{"use strict";$re.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}});var b3=ye((Gir,rie)=>{"use strict";var Xq=ec(),Tit=WS(),q6=Ih(),Qre=Yre(),eie=Jre(),Ait=z6(),tie=Ao().extendFlat,O6=Xq({editType:"calc"});O6.family.dflt='"Open Sans", verdana, arial, sans-serif';O6.size.dflt=12;O6.color.dflt=q6.defaultLine;rie.exports={font:O6,title:{text:{valType:"string",editType:"layoutstyle"},font:Xq({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:Xq({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:tie(Ait({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:q6.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:q6.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:q6.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:Qre.newshape,activeshape:Qre.activeshape,newselection:eie.newselection,activeselection:eie.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:tie({},Tit.transition,{editType:"none"})}});var iie=ye(()=>{(function(){if(!document.getElementById("8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc")){var e=document.createElement("style");e.id="8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc",e.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(e)}})()});var Oa=ye(el=>{"use strict";var w3=K1(),nie=P6(),aie=Vq(),Sit=Ay(),Mit=jS().addStyleRule,oie=Ao(),Eit=Gl(),kit=b3(),Cit=oie.extendFlat,Zq=oie.extendDeepAll;el.modules={};el.allCategories={};el.allTypes=[];el.subplotsRegistry={};el.componentsRegistry={};el.layoutArrayContainers=[];el.layoutArrayRegexes=[];el.traceLayoutAttributes={};el.localeRegistry={};el.apiMethodRegistry={};el.collectableSubplotTypes=null;el.register=function(t){if(el.collectableSubplotTypes=null,t)t&&!Array.isArray(t)&&(t=[t]);else throw new Error("No argument passed to Plotly.register.");for(var r=0;r{"use strict";var Fit=d3().timeFormat,mie=Eo(),Yq=K1(),e_=p3().mod,S3=fs(),_0=S3.BADNUM,Ap=S3.ONEDAY,XS=S3.ONEHOUR,Q1=S3.ONEMIN,A3=S3.ONESEC,ZS=S3.EPOCHJD,Sy=Oa(),fie=d3().utcFormat,zit=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,qit=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,hie=new Date().getFullYear()-70;function My(e){return e&&Sy.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}hh.dateTick0=function(e,t){var r=Oit(e,!!t);if(t<2)return r;var n=hh.dateTime2ms(r,e);return n+=Ap*(t-1),hh.ms2DateTime(n,0,e)};function Oit(e,t){return My(e)?t?Sy.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:Sy.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}hh.dfltRange=function(e){return My(e)?Sy.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};hh.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var N6,U6;hh.dateTime2ms=function(e,t){if(hh.isJSDate(e)){var r=e.getTimezoneOffset()*Q1,n=(e.getUTCMinutes()-e.getMinutes())*Q1+(e.getUTCSeconds()-e.getSeconds())*A3+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var i=3*Q1;r=r-i/2+e_(n-r+i/2,i)}return e=Number(e)-r,e>=N6&&e<=U6?e:_0}if(typeof e!="string"&&typeof e!="number")return _0;e=String(e);var a=My(t),o=e.charAt(0);a&&(o==="G"||o==="g")&&(e=e.slice(1),t="");var s=a&&t.slice(0,7)==="chinese",l=e.match(s?qit:zit);if(!l)return _0;var u=l[1],c=l[3]||"1",f=Number(l[5]||1),h=Number(l[7]||0),d=Number(l[9]||0),v=Number(l[11]||0);if(a){if(u.length===2)return _0;u=Number(u);var m;try{var b=Sy.getComponentMethod("calendars","getCal")(t);if(s){var p=c.charAt(c.length-1)==="i";c=parseInt(c,10),m=b.newDate(u,b.toMonthIndex(u,c,p),f)}else m=b.newDate(u,Number(c),f)}catch(M){return _0}return m?(m.toJD()-ZS)*Ap+h*XS+d*Q1+v*A3:_0}u.length===2?u=(Number(u)+2e3-hie)%100+hie:u=Number(u),c-=1;var k=new Date(Date.UTC(2e3,c,f,h,d));return k.setUTCFullYear(u),k.getUTCMonth()!==c||k.getUTCDate()!==f?_0:k.getTime()+v*A3};N6=hh.MIN_MS=hh.dateTime2ms("-9999");U6=hh.MAX_MS=hh.dateTime2ms("9999-12-31 23:59:59.9999");hh.isDateTime=function(e,t){return hh.dateTime2ms(e,t)!==_0};function T3(e,t){return String(e+Math.pow(10,t)).slice(1)}var B6=90*Ap,die=3*XS,vie=5*Q1;hh.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=N6&&e<=U6))return _0;t||(t=0);var n=Math.floor(e_(e+.05,1)*10),i=Math.round(e-n/10),a,o,s,l,u,c;if(My(r)){var f=Math.floor(i/Ap)+ZS,h=Math.floor(e_(e,Ap));try{a=Sy.getComponentMethod("calendars","getCal")(r).fromJD(f).formatDate("yyyy-mm-dd")}catch(d){a=fie("G%Y-%m-%d")(new Date(i))}if(a.charAt(0)==="-")for(;a.length<11;)a="-0"+a.slice(1);else for(;a.length<10;)a="0"+a;o=t=N6+Ap&&e<=U6-Ap))return _0;var t=Math.floor(e_(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=Fit("%Y-%m-%d")(r),i=r.getHours(),a=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return yie(n,i,a,o,s)};function yie(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+T3(t,2)+":"+T3(r,2),(n||i)&&(e+=":"+T3(n,2),i))){for(var a=4;i%10===0;)a-=1,i/=10;e+="."+T3(i,a)}return e}hh.cleanDate=function(e,t,r){if(e===_0)return t;if(hh.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(My(r))return Yq.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=hh.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!hh.isDateTime(e,r))return Yq.error("unrecognized date",e),t;return e};var Bit=/%\d?f/g,Nit=/%h/g,Uit={1:"1",2:"1",3:"2",4:"2"};function pie(e,t,r,n){e=e.replace(Bit,function(a){var o=Math.min(+a.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).slice(2).replace(/0+$/,"")||"0";return s});var i=new Date(Math.floor(t+.05));if(e=e.replace(Nit,function(){return Uit[r("%q")(i)]}),My(n))try{e=Sy.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(a){return"Invalid"}return r(e)(i)}var Vit=[59,59.9,59.99,59.999,59.9999];function Git(e,t){var r=e_(e+.05,Ap),n=T3(Math.floor(r/XS),2)+":"+T3(e_(Math.floor(r/Q1),60),2);if(t!=="M"){mie(t)||(t=0);var i=Math.min(e_(e/A3,60),Vit[t]),a=(100+i).toFixed(t).slice(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}hh.formatDate=function(e,t,r,n,i,a){if(i=My(i)&&i,!t)if(r==="y")t=a.year;else if(r==="m")t=a.month;else if(r==="d")t=a.dayMonth+` +`+a.year;else return Git(e,r)+` +`+pie(a.dayMonthYear,e,n,i);return pie(t,e,n,i)};var gie=3*Ap;hh.incrementMonth=function(e,t,r){r=My(r)&&r;var n=e_(e,Ap);if(e=Math.round(e-n),r)try{var i=Math.round(e/Ap)+ZS,a=Sy.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return t%12?a.add(o,t,"m"):a.add(o,t/12,"y"),(o.toJD()-ZS)*Ap+n}catch(l){Yq.error("invalid ms "+e+" in calendar "+r)}var s=new Date(e+gie);return s.setUTCMonth(s.getUTCMonth()+t)+n-gie};hh.findExactDates=function(e,t){for(var r=0,n=0,i=0,a=0,o,s,l=My(t)&&Sy.getComponentMethod("calendars","getCal")(t),u=0;u{"use strict";xie.exports=function(t){return t}});var V6=ye(Ey=>{"use strict";var Hit=Eo(),jit=K1(),Wit=YS(),Xit=fs().BADNUM,Kq=1e-9;Ey.findBin=function(e,t,r){if(Hit(t.start))return r?Math.ceil((e-t.start)/t.size-Kq)-1:Math.floor((e-t.start)/t.size+Kq);var n=0,i=t.length,a=0,o=i>1?(t[i-1]-t[0])/(i-1):1,s,l;for(o>=0?l=r?Zit:Yit:l=r?Jit:Kit,e+=o*Kq*(r?-1:1)*(o>=0?1:-1);n90&&jit.log("Long binary search..."),n-1};function Zit(e,t){return et}function Jit(e,t){return e>=t}Ey.sorterAsc=function(e,t){return e-t};Ey.sorterDes=function(e,t){return t-e};Ey.distinctVals=function(e){var t=e.slice();t.sort(Ey.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===Xit;r--);for(var n=t[r]-t[0]||1,i=n/(r||1)/1e4,a=[],o,s=0;s<=r;s++){var l=t[s],u=l-o;o===void 0?(a.push(l),o=l):u>i&&(n=Math.min(n,u),a.push(l),o=l)}return{vals:a,minDiff:n}};Ey.roundUp=function(e,t,r){for(var n=0,i=t.length-1,a,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;n0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()};Ey.findIndexOfMin=function(e,t){t=t||Wit;for(var r=1/0,n,i=0;i{"use strict";bie.exports=function(t){return Object.keys(t).sort()}});var wie=ye(dh=>{"use strict";var KS=Eo(),$it=Yd().isArrayOrTypedArray;dh.aggNums=function(e,t,r,n){var i,a;if((!n||n>r.length)&&(n=r.length),KS(t)||(t=!1),$it(r[0])){for(a=new Array(n),i=0;ie.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var Eie=ye(($ir,Mie)=>{"use strict";var Tie=p3(),Jq=Tie.mod,Qit=Tie.modHalf,JS=Math.PI,r_=2*JS;function ent(e){return e/180*JS}function tnt(e){return e/JS*180}function $q(e){return Math.abs(e[1]-e[0])>r_-1e-14}function Aie(e,t){return Qit(t-e,r_)}function rnt(e,t){return Math.abs(Aie(e,t))}function Sie(e,t){if($q(t))return!0;var r,n;t[0]n&&(n+=r_);var i=Jq(e,r_),a=i+r_;return i>=r&&i<=n||a>=r&&a<=n}function int(e,t,r,n){if(!Sie(t,n))return!1;var i,a;return r[0]=i&&e<=a}function Qq(e,t,r,n,i,a,o){i=i||0,a=a||0;var s=$q([r,n]),l,u,c,f,h;s?(l=0,u=JS,c=r_):r{"use strict";wb.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};wb.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};wb.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};wb.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};wb.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};wb.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var Pie=ye(Tb=>{"use strict";var eO=p3().mod;Tb.segmentsIntersect=Lie;function Lie(e,t,r,n,i,a,o,s){var l=r-e,u=i-e,c=o-i,f=n-t,h=a-t,d=s-a,v=l*d-c*f;if(v===0)return null;var m=(u*d-c*h)/v,b=(u*f-l*h)/v;return b<0||b>1||m<0||m>1?null:{x:e+l*m,y:t+f*m}}Tb.segmentDistance=function(t,r,n,i,a,o,s,l){if(Lie(t,r,n,i,a,o,s,l))return 0;var u=n-t,c=i-r,f=s-a,h=l-o,d=u*u+c*c,v=f*f+h*h,m=Math.min(G6(u,c,d,a-t,o-r),G6(u,c,d,s-t,l-r),G6(f,h,v,t-a,r-o),G6(f,h,v,n-a,i-o));return Math.sqrt(m)};function G6(e,t,r,n,i){var a=n*e+i*t;if(a<0)return n*n+i*i;if(a>r){var o=n-e,s=i-t;return o*o+s*s}else{var l=n*t-i*e;return l*l/r}}var H6,tO,Cie;Tb.getTextLocation=function(t,r,n,i){if((t!==tO||i!==Cie)&&(H6={},tO=t,Cie=i),H6[n])return H6[n];var a=t.getPointAtLength(eO(n-i/2,r)),o=t.getPointAtLength(eO(n+i/2,r)),s=Math.atan((o.y-a.y)/(o.x-a.x)),l=t.getPointAtLength(eO(n,r)),u=(l.x*4+a.x+o.x)/6,c=(l.y*4+a.y+o.y)/6,f={x:u,y:c,theta:s};return H6[n]=f,f};Tb.clearLocationCache=function(){tO=null};Tb.getVisibleSegment=function(t,r,n){var i=r.left,a=r.right,o=r.top,s=r.bottom,l=0,u=t.getTotalLength(),c=u,f,h;function d(m){var b=t.getPointAtLength(m);m===0?f=b:m===u&&(h=b);var p=b.xa?b.x-a:0,k=b.ys?b.y-s:0;return Math.sqrt(p*p+k*k)}for(var v=d(l);v;){if(l+=v+n,l>c)return;v=d(l)}for(v=d(c);v;){if(c-=v+n,l>c)return;v=d(c)}return{min:l,max:c,len:c-l,total:u,isClosed:l===0&&c===u&&Math.abs(f.x-h.x)<.1&&Math.abs(f.y-h.y)<.1}};Tb.findPointOnPath=function(t,r,n,i){i=i||{};for(var a=i.pathLength||t.getTotalLength(),o=i.tolerance||.001,s=i.iterationLimit||30,l=t.getPointAtLength(0)[n]>t.getPointAtLength(a)[n]?-1:1,u=0,c=0,f=a,h,d,v;u0?f=h:c=h,u++}return d}});var j6=ye($S=>{"use strict";var ky={};$S.throttle=function(t,r,n){var i=ky[t],a=Date.now();if(!i){for(var o in ky)ky[o].tsi.ts+r){s();return}i.timer=setTimeout(function(){s(),i.timer=null},r)};$S.done=function(e){var t=ky[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};$S.clear=function(e){if(e)Iie(ky[e]),delete ky[e];else for(var t in ky)$S.clear(t)};function Iie(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var Die=ye((rnr,Rie)=>{"use strict";Rie.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var Fie=ye((inr,W6)=>{"use strict";W6.exports=rO;W6.exports.isMobile=rO;W6.exports.default=rO;var snt=/(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,lnt=/CrOS/,unt=/android|ipad|playbook|silk/i;function rO(e){e||(e={});let t=e.ua;if(!t&&typeof navigator!="undefined"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let r=snt.test(t)&&!lnt.test(t)||!!e.tablet&&unt.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var qie=ye((nnr,zie)=>{"use strict";var cnt=Eo(),fnt=Fie();zie.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=hnt(),typeof r!="string")return!0;var n=fnt({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!n)for(var i=r.split(" "),a=1;a-1;s--){var l=i[s];if(l.slice(0,8)==="Version/"){var u=l.slice(8).split(".")[0];if(cnt(u)&&(u=+u),u>=13)return!0}}}return n};function hnt(){var e;return typeof navigator!="undefined"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),e}});var Bie=ye((anr,Oie)=>{"use strict";var dnt=qa();Oie.exports=function(t,r,n){var i=t.selectAll("g."+n.replace(/\s/g,".")).data(r,function(o){return o[0].trace.uid});i.exit().remove(),i.enter().append("g").attr("class",n),i.order();var a=t.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each(function(o){o[0][a]=dnt.select(this)}),i}});var Uie=ye((onr,Nie)=>{"use strict";var vnt=Oa();Nie.exports=function(t,r){for(var n=t._context.locale,i=0;i<2;i++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[n]||{}).dictionary;if(s){var l=s[r];if(l)return l}a=vnt.localeRegistry}var u=n.split("-")[0];if(u===n)break;n=u}return r}});var iO=ye((snr,Vie)=>{"use strict";Vie.exports=function(t){for(var r={},n=[],i=0,a=0;a{"use strict";Gie.exports=function(t){for(var r=mnt(t)?gnt:pnt,n=[],i=0;i{"use strict";jie.exports=function(t,r){if(!r)return t;var n=1/Math.abs(r),i=n>1?(n*t+n*r)/n:t+r,a=String(i).length;if(a>16){var o=String(r).length,s=String(t).length;if(a>=s+o){var l=parseFloat(i).toPrecision(12);l.indexOf("e+")===-1&&(i=+l)}}return i}});var Zie=ye((cnr,Xie)=>{"use strict";var ynt=Eo(),_nt=fs().BADNUM,xnt=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;Xie.exports=function(t){return typeof t=="string"&&(t=t.replace(xnt,"")),ynt(t)?Number(t):_nt}});var Pr=ye((fnr,sne)=>{"use strict";var QS=qa(),bnt=d3().utcFormat,wnt=kq().format,ene=Eo(),tne=fs(),rne=tne.FP_SAFE,Tnt=-rne,Yie=tne.BADNUM,Ai=sne.exports={};Ai.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:t==="0.f"?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var Kie={};Ai.warnBadFormat=function(e){var t=String(e);Kie[t]||(Kie[t]=1,Ai.warn('encountered bad format: "'+t+'"'))};Ai.noFormat=function(e){return String(e)};Ai.numberFormat=function(e){var t;try{t=wnt(Ai.adjustFormat(e))}catch(r){return Ai.warnBadFormat(e),Ai.noFormat}return t};Ai.nestedProperty=zS();Ai.keyedContainer=Vee();Ai.relativeAttr=Hee();Ai.isPlainObject=Ay();Ai.toLogRange=M6();Ai.relinkPrivateKeys=Zee();var i_=Yd();Ai.isArrayBuffer=i_.isArrayBuffer;Ai.isTypedArray=i_.isTypedArray;Ai.isArrayOrTypedArray=i_.isArrayOrTypedArray;Ai.isArray1D=i_.isArray1D;Ai.ensureArray=i_.ensureArray;Ai.concat=i_.concat;Ai.maxRowLength=i_.maxRowLength;Ai.minRowLength=i_.minRowLength;var ine=p3();Ai.mod=ine.mod;Ai.modHalf=ine.modHalf;var n_=dte();Ai.valObjectMeta=n_.valObjectMeta;Ai.coerce=n_.coerce;Ai.coerce2=n_.coerce2;Ai.coerceFont=n_.coerceFont;Ai.coercePattern=n_.coercePattern;Ai.coerceHoverinfo=n_.coerceHoverinfo;Ai.coerceSelectionMarkerOpacity=n_.coerceSelectionMarkerOpacity;Ai.validate=n_.validate;var jp=_ie();Ai.dateTime2ms=jp.dateTime2ms;Ai.isDateTime=jp.isDateTime;Ai.ms2DateTime=jp.ms2DateTime;Ai.ms2DateTimeLocal=jp.ms2DateTimeLocal;Ai.cleanDate=jp.cleanDate;Ai.isJSDate=jp.isJSDate;Ai.formatDate=jp.formatDate;Ai.incrementMonth=jp.incrementMonth;Ai.dateTick0=jp.dateTick0;Ai.dfltRange=jp.dfltRange;Ai.findExactDates=jp.findExactDates;Ai.MIN_MS=jp.MIN_MS;Ai.MAX_MS=jp.MAX_MS;var Ab=V6();Ai.findBin=Ab.findBin;Ai.sorterAsc=Ab.sorterAsc;Ai.sorterDes=Ab.sorterDes;Ai.distinctVals=Ab.distinctVals;Ai.roundUp=Ab.roundUp;Ai.sort=Ab.sort;Ai.findIndexOfMin=Ab.findIndexOfMin;Ai.sortObjectKeys=t_();var Cy=wie();Ai.aggNums=Cy.aggNums;Ai.len=Cy.len;Ai.mean=Cy.mean;Ai.geometricMean=Cy.geometricMean;Ai.median=Cy.median;Ai.midRange=Cy.midRange;Ai.variance=Cy.variance;Ai.stdev=Cy.stdev;Ai.interp=Cy.interp;var wg=I6();Ai.init2dArray=wg.init2dArray;Ai.transposeRagged=wg.transposeRagged;Ai.dot=wg.dot;Ai.translationMatrix=wg.translationMatrix;Ai.rotationMatrix=wg.rotationMatrix;Ai.rotationXYMatrix=wg.rotationXYMatrix;Ai.apply3DTransform=wg.apply3DTransform;Ai.apply2DTransform=wg.apply2DTransform;Ai.apply2DTransform2=wg.apply2DTransform2;Ai.convertCssMatrix=wg.convertCssMatrix;Ai.inverseTransformMatrix=wg.inverseTransformMatrix;var gm=Eie();Ai.deg2rad=gm.deg2rad;Ai.rad2deg=gm.rad2deg;Ai.angleDelta=gm.angleDelta;Ai.angleDist=gm.angleDist;Ai.isFullCircle=gm.isFullCircle;Ai.isAngleInsideSector=gm.isAngleInsideSector;Ai.isPtInsideSector=gm.isPtInsideSector;Ai.pathArc=gm.pathArc;Ai.pathSector=gm.pathSector;Ai.pathAnnulus=gm.pathAnnulus;var E3=kie();Ai.isLeftAnchor=E3.isLeftAnchor;Ai.isCenterAnchor=E3.isCenterAnchor;Ai.isRightAnchor=E3.isRightAnchor;Ai.isTopAnchor=E3.isTopAnchor;Ai.isMiddleAnchor=E3.isMiddleAnchor;Ai.isBottomAnchor=E3.isBottomAnchor;var k3=Pie();Ai.segmentsIntersect=k3.segmentsIntersect;Ai.segmentDistance=k3.segmentDistance;Ai.getTextLocation=k3.getTextLocation;Ai.clearLocationCache=k3.clearLocationCache;Ai.getVisibleSegment=k3.getVisibleSegment;Ai.findPointOnPath=k3.findPointOnPath;var Y6=Ao();Ai.extendFlat=Y6.extendFlat;Ai.extendDeep=Y6.extendDeep;Ai.extendDeepAll=Y6.extendDeepAll;Ai.extendDeepNoArrays=Y6.extendDeepNoArrays;var nO=K1();Ai.log=nO.log;Ai.warn=nO.warn;Ai.error=nO.error;var Ant=m3();Ai.counterRegex=Ant.counter;var aO=j6();Ai.throttle=aO.throttle;Ai.throttleDone=aO.done;Ai.clearThrottle=aO.clear;var Tg=jS();Ai.getGraphDiv=Tg.getGraphDiv;Ai.isPlotDiv=Tg.isPlotDiv;Ai.removeElement=Tg.removeElement;Ai.addStyleRule=Tg.addStyleRule;Ai.addRelatedStyleRule=Tg.addRelatedStyleRule;Ai.deleteRelatedStyleRule=Tg.deleteRelatedStyleRule;Ai.setStyleOnHover=Tg.setStyleOnHover;Ai.getFullTransformMatrix=Tg.getFullTransformMatrix;Ai.getElementTransformMatrix=Tg.getElementTransformMatrix;Ai.getElementAndAncestors=Tg.getElementAndAncestors;Ai.equalDomRects=Tg.equalDomRects;Ai.clearResponsive=Die();Ai.preserveDrawingBuffer=qie();Ai.makeTraceGroups=Bie();Ai._=Uie();Ai.notifier=Bq();Ai.filterUnique=iO();Ai.filterVisible=Hie();Ai.pushUnique=Vq();Ai.increment=Wie();Ai.cleanNumber=Zie();Ai.ensureNumber=function(t){return ene(t)?(t=Number(t),t>rne||t=t?!1:ene(e)&&e>=0&&e%1===0};Ai.noop=P6();Ai.identity=YS();Ai.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};Ai.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r};Ai.simpleMap=function(e,t,r,n,i){for(var a=e.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(Ai.warn("randstr failed uniqueness"),o):e(t,r,n,(i||0)+1):o};Ai.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)},r["_"+t]=e,r};Ai.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,n=2*r,i=2*t-1,a=new Array(i),o=new Array(r),s,l,u,c;for(s=0;s=n&&(u-=n*Math.floor(u/n)),u<0?u=-1-u:u>=r&&(u=n-1-u),c+=e[u]*a[l];o[s]=c}return o};Ai.syncOrAsync=function(e,t,r){var n,i;function a(){return Ai.syncOrAsync(e,t,r)}for(;e.length;)if(i=e.splice(0,1)[0],n=i(t),n&&n.then)return n.then(a);return r&&r(t)};Ai.stripTrailingSlash=function(e){return e.slice(-1)==="/"?e.slice(0,-1):e};Ai.noneOrAll=function(e,t,r){if(e){var n=!1,i=!0,a,o;for(a=0;a0?i:0})};Ai.fillArray=function(e,t,r,n){if(n=n||Ai.identity,Ai.isArrayOrTypedArray(e))for(var i=0;iEnt.test(window.navigator.userAgent);var knt=/Firefox\/(\d+)\.\d+/;Ai.getFirefoxVersion=function(){var e=knt.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null};Ai.isD3Selection=function(e){return e instanceof QS.selection};Ai.ensureSingle=function(e,t,r,n){var i=e.select(t+(r?"."+r:""));if(i.size())return i;var a=e.append(t);return r&&a.classed(r,!0),n&&a.call(n),a};Ai.ensureSingleById=function(e,t,r,n){var i=e.select(t+"#"+r);if(i.size())return i;var a=e.append(t).attr("id",r);return n&&a.call(n),a};Ai.objectFromPath=function(e,t){for(var r=e.split("."),n,i=n={},a=0;a1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l};Ai.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var one=/^\w*$/;Ai.templateString=function(e,t){var r={};return e.replace(Ai.TEMPLATE_STRING_REGEX,function(n,i){var a;return one.test(i)?a=t[i]:(r[i]=r[i]||Ai.nestedProperty(t,i).get,a=r[i](!0)),a!==void 0?a:""})};var Pnt={max:10,count:0,name:"hovertemplate"};Ai.hovertemplateString=e=>oO(j1(_g({},e),{opts:Pnt}));var Int={max:10,count:0,name:"texttemplate"};Ai.texttemplateString=e=>oO(j1(_g({},e),{opts:Int}));var Rnt=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Dnt(e){var t=e.match(Rnt);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var Fnt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};Ai.texttemplateStringForShapes=e=>oO(j1(_g({},e),{opts:Fnt}));var Jie=/^[:|\|]/;function oO({data:e=[],locale:t,fallback:r,labels:n={},opts:i,template:a}){return a.replace(Ai.TEMPLATE_STRING_REGEX,(o,s,l)=>{let u=["xother","yother"].includes(s),c=["_xother","_yother"].includes(s),f=["_xother_","_yother_"].includes(s),h=["xother_","yother_"].includes(s),d=u||c||h||f;(c||f)&&(s=s.substring(1)),(h||f)&&(s=s.substring(0,s.length-1));let v=null,m=null;if(i.parseMultDiv){var b=Dnt(s);s=b.key,v=b.op,m=b.number}let p;if(d){if(n[s]===void 0)return"";p=n[s]}else for(let L of e)if(L){if(L.hasOwnProperty(s)){p=L[s];break}if(one.test(s)||(p=Ai.nestedProperty(L,s).get(!0)),p!==void 0)break}if(p===void 0){let{count:L,max:x,name:C}=i,S=r===!1?o:r;return L=Z6&&o<=$ie,u=s>=Z6&&s<=$ie;if(l&&(n=10*n+o-Z6),u&&(i=10*i+s-Z6),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var M3=2e9;Ai.seedPseudoRandom=function(){M3=2e9};Ai.pseudoRandom=function(){var e=M3;return M3=(69069*M3+1)%4294967296,Math.abs(M3-e)<429496729?Ai.pseudoRandom():M3/4294967296};Ai.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=Ai.extractOption(e,t,"htx","hovertext");if(Ai.isValidTextValue(i))return n(i);var a=Ai.extractOption(e,t,"tx","text");if(Ai.isValidTextValue(a))return n(a)};Ai.isValidTextValue=function(e){return e||e===0};Ai.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(u=1):u=0,Ai.strTranslate(i-u*(r+o),a-u*(n+s))+Ai.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")};Ai.setTransormAndDisplay=function(e,t){e.attr("transform",Ai.getTextTransform(t)),e.style("display",t.scale?null:"none")};Ai.ensureUniformFontSize=function(e,t){var r=Ai.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};Ai.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)};Ai.bigFont=function(e){return Math.round(1.2*e)};var Qie=Ai.getFirefoxVersion(),znt=Qie!==null&&Qie<86;Ai.getPositionFromD3Event=function(){return znt?[QS.event.layerX,QS.event.layerY]:[QS.event.offsetX,QS.event.offsetY]}});var cne=ye(()=>{"use strict";var qnt=Pr(),lne={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border: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 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:focus-within .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-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","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(sO in lne)une=sO.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),qnt.addStyleRule(une,lne[sO]);var une,sO});var lO=ye((pnr,fne)=>{fne.exports=!0});var cO=ye((gnr,hne)=>{"use strict";var Ont=lO(),uO;typeof window.matchMedia=="function"?uO=!window.matchMedia("(hover: none)").matches:uO=Ont;hne.exports=uO});var Sb=ye((mnr,fO)=>{"use strict";var C3=typeof Reflect=="object"?Reflect:null,dne=C3&&typeof C3.apply=="function"?C3.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},K6;C3&&typeof C3.ownKeys=="function"?K6=C3.ownKeys:Object.getOwnPropertySymbols?K6=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:K6=function(t){return Object.getOwnPropertyNames(t)};function Bnt(e){console&&console.warn&&console.warn(e)}var pne=Number.isNaN||function(t){return t!==t};function Jc(){Jc.init.call(this)}fO.exports=Jc;fO.exports.once=Gnt;Jc.EventEmitter=Jc;Jc.prototype._events=void 0;Jc.prototype._eventsCount=0;Jc.prototype._maxListeners=void 0;var vne=10;function J6(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Jc,"defaultMaxListeners",{enumerable:!0,get:function(){return vne},set:function(e){if(typeof e!="number"||e<0||pne(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");vne=e}});Jc.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Jc.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||pne(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function gne(e){return e._maxListeners===void 0?Jc.defaultMaxListeners:e._maxListeners}Jc.prototype.getMaxListeners=function(){return gne(this)};Jc.prototype.emit=function(t){for(var r=[],n=1;n0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[t];if(l===void 0)return!1;if(typeof l=="function")dne(l,this,r);else for(var u=l.length,c=bne(l,u),n=0;n0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,Bnt(s)}return e}Jc.prototype.addListener=function(t,r){return mne(this,t,r,!1)};Jc.prototype.on=Jc.prototype.addListener;Jc.prototype.prependListener=function(t,r){return mne(this,t,r,!0)};function Nnt(){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 yne(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=Nnt.bind(n);return i.listener=r,n.wrapFn=i,i}Jc.prototype.once=function(t,r){return J6(r),this.on(t,yne(this,t,r)),this};Jc.prototype.prependOnceListener=function(t,r){return J6(r),this.prependListener(t,yne(this,t,r)),this};Jc.prototype.removeListener=function(t,r){var n,i,a,o,s;if(J6(r),i=this._events,i===void 0)return this;if(n=i[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(a=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,a=o;break}if(a<0)return this;a===0?n.shift():Unt(n,a),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Jc.prototype.off=Jc.prototype.removeListener;Jc.prototype.removeAllListeners=function(t){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var a=Object.keys(n),o;for(i=0;i=0;i--)this.removeListener(t,r[i]);return this};function _ne(e,t,r){var n=e._events;if(n===void 0)return[];var i=n[t];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?Vnt(i):bne(i,i.length)}Jc.prototype.listeners=function(t){return _ne(this,t,!0)};Jc.prototype.rawListeners=function(t){return _ne(this,t,!1)};Jc.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):xne.call(e,t)};Jc.prototype.listenerCount=xne;function xne(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Jc.prototype.eventNames=function(){return this._eventsCount>0?K6(this._events):[]};function bne(e,t){for(var r=new Array(t),n=0;n{"use strict";var hO=Sb().EventEmitter,jnt={init:function(e){if(e._ev instanceof hO)return e;var t=new hO,r=new hO;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,i){t.emit(n,i),r.emit(n,i)},typeof e.addEventListener=="function"&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var n,i=e._ev;if(!i)return;var a=i._events[t];if(!a)return;function o(l){if(l.listener){if(i.removeListener(t,l.listener),!l.fired)return l.fired=!0,l.listener.apply(i,[r])}else return l.apply(i,[r])}a=Array.isArray(a)?a:[a];var s;for(s=0;s{"use strict";var Ane=Pr(),Wnt=xb().dfltConfig;function Xnt(e,t){for(var r=[],n,i=0;iWnt.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Ly.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Ly.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Ly.undo=function(t){var r,n;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n{"use strict";Ene.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var R3=ye(ed=>{"use strict";var x0=Oa(),eM=Pr(),Q6=Gl(),vO=b3(),Znt=dO(),Ynt=WS(),Knt=xb().configAttributes,kne=mc(),Ag=eM.extendDeepAll,P3=eM.isPlainObject,Jnt=eM.isArrayOrTypedArray,eL=eM.nestedProperty,$nt=eM.valObjectMeta,pO="_isSubplotObj",tL="_isLinkedToArray",Qnt="_arrayAttrRegexps",Lne="_deprecated",gO=[pO,tL,Qnt,Lne];ed.IS_SUBPLOT_OBJ=pO;ed.IS_LINKED_TO_ARRAY=tL;ed.DEPRECATED=Lne;ed.UNDERSCORE_ATTRS=gO;ed.get=function(){var e={};return x0.allTypes.forEach(function(t){e[t]=tat(t)}),{defs:{valObjects:$nt,metaKeys:gO.concat(["description","role","editType","impliedEdits"]),editType:{traces:kne.traces,layout:kne.layout},impliedEdits:{}},traces:e,layout:rat(),frames:iat(),animation:I3(Ynt),config:I3(Knt)}};ed.crawl=function(e,t,r,n){var i=r||0;n=n||"",Object.keys(e).forEach(function(a){var o=e[a];if(gO.indexOf(a)===-1){var s=(n?n+".":"")+a;t(o,a,e,i,s),!ed.isValObject(o)&&P3(o)&&a!=="impliedEdits"&&ed.crawl(o,t,i+1,s)}})};ed.isValObject=function(e){return e&&e.valType!==void 0};ed.findArrayAttributes=function(e){var t=[],r=[],n=[],i,a;function o(l,u,c,f){r=r.slice(0,f).concat([u]),n=n.slice(0,f).concat([l&&l._isLinkedToArray]);var h=l&&(l.valType==="data_array"||l.arrayOk===!0)&&!(r[f-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&s(i,0,"")}function s(l,u,c){var f=l[r[u]],h=c+r[u];if(u===r.length-1)Jnt(f)&&t.push(a+h);else if(n[u]){if(Array.isArray(f))for(var d=0;d=a.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var o=t[r];if(!$6(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function $6(e){return e===Math.round(e)&&e>=0}function tat(e){var t,r;t=x0.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var i=Ag({},Q6),a=Ag({},t.attributes);ed.crawl(a,function(l,u,c,f,h){eL(i,h).set(void 0),l===void 0&&eL(a,h).set(void 0)}),Ag(n,i),x0.traceIs(e,"noOpacity")&&delete n.opacity,x0.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),x0.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),t.selectPoints||delete n.selectedpoints,Ag(n,a),r.attributes&&Ag(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:I3(n)};if(t.layoutAttributes){var s={};Ag(s,t.layoutAttributes),o.layoutAttributes=I3(s)}return t.animatable||ed.crawl(o,function(l){ed.isValObject(l)&&"anim"in l&&delete l.anim}),o}function rat(){var e={},t,r;Ag(e,vO);for(t in x0.subplotsRegistry)if(r=x0.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var n=0;n{"use strict";var D3=Pr(),lat=Gl(),a_="templateitemname",mO={name:{valType:"string",editType:"none"}};mO[a_]={valType:"string",editType:"calc"};Mb.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=mO.name,t[a_]=mO[a_],t};Mb.traceTemplater=function(e){var t={},r,n;for(r in e)n=e[r],Array.isArray(n)&&n.length&&(t[r]=0);function i(a){r=D3.coerce(a,{},lat,"type");var o={type:r,_template:null};if(r in t){n=e[r];var s=t[r]%n.length;t[r]++,o._template=n[s]}return o}return{newTrace:i}};Mb.newContainer=function(e,t,r){var n=e._template,i=n&&(n[t]||r&&n[r]);D3.isPlainObject(i)||(i=null);var a=e[t]={_template:i};return a};Mb.arrayTemplater=function(e,t,r){var n=e._template,i=n&&n[Rne(t)],a=n&&n[t];(!Array.isArray(a)||!a.length)&&(a=[]);var o={};function s(u){var c={name:u.name,_input:u},f=c[a_]=u[a_];if(!Ine(f))return c._template=i,c;for(var h=0;h=n&&(r._input||{})._templateitemname;a&&(i=n);var o=t+"["+i+"]",s;function l(){s={},a&&(s[o]={},s[o][a_]=a)}l();function u(d,v){s[d]=v}function c(d,v){a?D3.nestedProperty(s[o],d).set(v):s[o+"."+d]=v}function f(){var d=s;return l(),d}function h(d,v){d&&c(d,v);var m=f();for(var b in m)D3.nestedProperty(e,b).set(m[b])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:h}}});var Rh=ye((Tnr,Dne)=>{"use strict";var tM=m3().counter;Dne.exports={idRegex:{x:tM("x","( domain)?"),y:tM("y","( domain)?")},attrRegex:tM("[xy]axis"),xAxisMatch:tM("xaxis"),yAxisMatch:tM("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"},zindexSeparator:"z"}});var df=ye(Sp=>{"use strict";var uat=Oa(),yO=Rh();Sp.id2name=function(t){if(!(typeof t!="string"||!t.match(yO.AX_ID_PATTERN))){var r=t.split(" ")[0].slice(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Sp.name2id=function(t){if(t.match(yO.AX_NAME_PATTERN)){var r=t.slice(5);return r==="1"&&(r=""),t.charAt(0)+r}};Sp.cleanId=function(t,r,n){var i=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(yO.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(i&&!n)){var a=t.split(" ")[0].slice(1).replace(/^0+/,"");return a==="1"&&(a=""),t.charAt(0)+a+(i&&n?" domain":"")}};Sp.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var i=Sp.listIds(e,t),a=new Array(i.length),o;for(o=0;on?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)};Sp.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function Fne(e,t){if(t&&t.length){for(var r=0;r{"use strict";function cat(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function fat(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}zne.exports={clearOutlineControllers:cat,clearOutline:fat}});var rL=ye((Mnr,qne)=>{"use strict";qne.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var Id=ye(nL=>{"use strict";var iL=Oa(),Enr=Rh().SUBPLOT_PATTERN;nL.getSubplotCalcData=function(e,t,r){var n=iL.subplotsRegistry[t];if(!n)return[];for(var i=n.attr,a=[],o=0;o{"use strict";var hat=Oa(),F3=Pr();Eb.manageCommandObserver=function(e,t,r,n){var i={},a=!0;t&&t._commandObserver&&(i=t._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var o=Eb.hasSimpleAPICommandBindings(e,r,i.lookupTable);if(t&&t._commandObserver){if(o)return i;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,i}if(o){One(e,o,i.cache),i.check=function(){if(a){var c=One(e,o,i.cache);return c.changed&&n&&i.lookupTable[c.value]!==void 0&&(i.disable(),Promise.resolve(n({value:c.value,type:o.type,prop:o.prop,traces:o.traces,index:i.lookupTable[c.value]})).then(i.enable,i.enable)),c.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],l=0;l0?".":"")+i;F3.isPlainObject(a)?_O(a,t,o,n+1):t(o,i,a)}})}});var Mc=ye((Lnr,tae)=>{"use strict";var Zne=qa(),vat=d3().timeFormatLocale,pat=kq().formatLocale,rM=Eo(),gat=Cq(),Xl=Oa(),Yne=R3(),mat=vl(),Na=Pr(),Kne=ka(),Vne=fs().BADNUM,Mp=df(),yat=o_().clearOutline,_at=rL(),xO=WS(),xat=dO(),bat=Id().getModuleCalcData,Gne=Na.relinkPrivateKeys,kb=Na._,xa=tae.exports={};Na.extendFlat(xa,Xl);xa.attributes=Gl();xa.attributes.type.values=xa.allTypes;xa.fontAttrs=ec();xa.layoutAttributes=b3();var oL=Une();xa.executeAPICommand=oL.executeAPICommand;xa.computeAPICommandBindings=oL.computeAPICommandBindings;xa.manageCommandObserver=oL.manageCommandObserver;xa.hasSimpleAPICommandBindings=oL.hasSimpleAPICommandBindings;xa.redrawText=function(e){return e=Na.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(Xl.getComponentMethod("annotations","draw")(e),Xl.getComponentMethod("legend","draw")(e),Xl.getComponentMethod("colorbar","draw")(e),t(xa.previousPromises(e)))},300)})};xa.resize=function(e){e=Na.getGraphDiv(e);var t,r=new Promise(function(n,i){(!e||Na.isHidden(e))&&i(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Na.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var a=e.changed;e.autoplay=!0,Xl.call("relayout",e,{autosize:!0}).then(function(){e.changed=a,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};xa.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};xa.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var t=e._fullLayout,r=Na.ensureSingle(t._paper,"text","js-plot-link-container",function(l){l.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:Kne.defaultLine,"pointer-events":"all"}).each(function(){var u=Zne.select(this);u.append("tspan").classed("js-link-to-tool",!0),u.append("tspan").classed("js-link-spacer",!0),u.append("tspan").classed("js-sourcelinks",!0)})}),n=r.node(),i={y:t._paper.attr("height")-9};document.body.contains(n)&&n.getComputedTextLength()>=t.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=t._paper.attr("width")-7),r.attr(i);var a=r.select(".js-link-to-tool"),o=r.select(".js-link-spacer"),s=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&wat(e,a),o.text(a.text()&&s.text()?" - ":"")}};function wat(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)r.on("click",function(){xa.sendDataToCloud(e)});else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}xa.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=Zne.select(e).append("div").attr("id","hiddenform").style("display","none"),n=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"}),i=n.append("input").attr({type:"text",name:"data"});return i.node().value=xa.graphJson(e,!1,"keepdata"),n.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var Tat=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],Aat=["year","month","dayMonth","dayMonthYear"];xa.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults){delete n._skipDefaults;return}var i=e._fullLayout={},a=e.layout||{},o=e._fullData||[],s=e._fullData=[],l=e.data||[],u=e.calcdata||[],c=e._context||{},f;e._transitionData||xa.createTransitionData(e),i._dfltTitle={plot:kb(e,"Click to enter Plot title"),subtitle:kb(e,"Click to enter Plot subtitle"),x:kb(e,"Click to enter X axis title"),y:kb(e,"Click to enter Y axis title"),colorbar:kb(e,"Click to enter Colorscale title"),annotation:kb(e,"new text")},i._traceWord=kb(e,"trace");var h=Hne(e,Tat);if(i._mapboxAccessToken=c.mapboxAccessToken,n._initialAutoSizeIsDone){var d=n.width,v=n.height;xa.supplyLayoutGlobalDefaults(a,i,h),a.width||(i.width=d),a.height||(i.height=v),xa.sanitizeMargins(i)}else{xa.supplyLayoutGlobalDefaults(a,i,h);var m=!a.width||!a.height,b=i.autosize,p=c.autosizable,k=m&&(b||p);k?xa.plotAutoSize(e,a,i):m&&xa.sanitizeMargins(i),!b&&m&&(a.width=i.width,a.height=i.height)}i._d3locale=Eat(h,i.separators),i._extraFormat=Hne(e,Aat),i._initialAutoSizeIsDone=!0,i._dataLength=l.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var M=i._subplots=Mat(),T=i._splomAxes={x:{},y:{}},L=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=Sat(o,l),xa.supplyDataDefaults(l,s,a,i);var x=Object.keys(T.x),C=Object.keys(T.y);if(x.length>1&&C.length>1){for(Xl.getComponentMethod("grid","sizeDefaults")(a,i),f=0;f15&&C.length>15&&i.shapes.length===0&&i.images.length===0,xa.linkSubplots(s,i,o,n),xa.cleanPlot(s,i,o,n);var z=!!(n._has&&n._has("cartesian")),q=!!(i._has&&i._has("cartesian")),V=z,G=q;V&&!G?n._bgLayer.remove():G&&!V&&(i._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&yat({_fullLayout:n}),kat(s,i),Gne(i,n),Xl.getComponentMethod("colorscale","crossTraceDefaults")(s,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var Z=i._tracePreGUI,j={},N;for(N in Z)j[N]="old";for(f=0;f0){var c=1-2*a;o=Math.round(c*o),s=Math.round(c*s)}}var f=xa.layoutAttributes.width.min,h=xa.layoutAttributes.height.min;o1,v=!r.height&&Math.abs(n.height-s)>1;(v||d)&&(d&&(n.width=o),v&&(n.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),xa.sanitizeMargins(n)};xa.supplyLayoutModuleDefaults=function(e,t,r,n){var i=Xl.componentsRegistry,a=t._basePlotModules,o,s,l,u=Xl.subplotsRegistry.cartesian;for(o in i)l=i[o],l.includeBasePlot&&l.includeBasePlot(e,t);a.length||a.push(u),t._has("cartesian")&&(Xl.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(Na.subplotSort);for(s=0;s1&&(r.l/=b,r.r/=b)}if(h){var p=(r.t+r.b)/h;p>1&&(r.t/=p,r.b/=p)}var k=r.xl!==void 0?r.xl:r.x,M=r.xr!==void 0?r.xr:r.x,T=r.yt!==void 0?r.yt:r.y,L=r.yb!==void 0?r.yb:r.y;d[t]={l:{val:k,size:r.l+m},r:{val:M,size:r.r+m},b:{val:L,size:r.b+m},t:{val:T,size:r.t+m}},v[t]=1}if(!n._replotting)return xa.doAutoMargin(e)}};function Lat(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=Mp.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}xa.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),Jne(t);var i=t._size,a=t.margin,o={t:0,b:0,l:0,r:0},s=Na.extendFlat({},i),l=a.l,u=a.r,c=a.t,f=a.b,h=t._pushmargin,d=t._pushmarginIds,v=t.minreducedwidth,m=t.minreducedheight;if(a.autoexpand!==!1){for(var b in h)d[b]||delete h[b];var p=e._fullLayout._reservedMargin;for(var k in p)for(var M in p[k]){var T=p[k][M];o[M]=Math.max(o[M],T)}h.base={l:{val:0,size:l},r:{val:1,size:u},t:{val:1,size:c},b:{val:0,size:f}};for(var L in o){var x=0;for(var C in h)C!=="base"&&rM(h[C][L].size)&&(x=h[C][L].size>x?h[C][L].size:x);var S=Math.max(0,a[L]-x);o[L]=Math.max(0,o[L]-S)}for(var g in h){var P=h[g].l||{},E=h[g].b||{},z=P.val,q=P.size,V=E.val,G=E.size,Z=r-o.r-o.l,j=n-o.t-o.b;for(var N in h){if(rM(q)&&h[N].r){var H=h[N].r.val,ie=h[N].r.size;if(H>z){var ae=(q*H+(ie-Z)*z)/(H-z),_e=(ie*(1-z)+(q-Z)*(1-H))/(H-z);ae+_e>l+u&&(l=ae,u=_e)}}if(rM(G)&&h[N].t){var Ee=h[N].t.val,Ce=h[N].t.size;if(Ee>V){var ge=(G*Ee+(Ce-j)*V)/(Ee-V),re=(Ce*(1-V)+(G-j)*(1-Ee))/(Ee-V);ge+re>f+c&&(f=ge,c=re)}}}}}var Se=Na.constrain(r-a.l-a.r,$ne,v),ke=Na.constrain(n-a.t-a.b,Qne,m),be=Math.max(0,r-Se),Be=Math.max(0,n-ke);if(be){var Le=(l+u)/be;Le>1&&(l/=Le,u/=Le)}if(Be){var me=(f+c)/Be;me>1&&(f/=me,c/=me)}if(i.l=Math.round(l)+o.l,i.r=Math.round(u)+o.r,i.t=Math.round(c)+o.t,i.b=Math.round(f)+o.b,i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!t._replotting&&(xa.didMarginChange(s,i)||Lat(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var Pe=3*(1+Object.keys(d).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};xa.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&xa.supplyDefaults(e);var o=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function u(h,d){if(typeof h=="function")return d?"_function_":null;if(Na.isPlainObject(h)){var v={},m;return Object.keys(h).sort().forEach(function(M){if(["_","["].indexOf(M.charAt(0))===-1){if(typeof h[M]=="function"){d&&(v[M]="_function");return}if(r==="keepdata"){if(M.slice(-3)==="src")return}else if(r==="keepstream"){if(m=h[M+"src"],typeof m=="string"&&m.indexOf(":")>0&&!Na.isPlainObject(h.stream))return}else if(r!=="keepall"&&(m=h[M+"src"],typeof m=="string"&&m.indexOf(":")>0))return;v[M]=u(h[M],d)}}),v}var b=Array.isArray(h),p=Na.isTypedArray(h);if((b||p)&&h.dtype&&h.shape){var k=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:Na.isArrayBuffer(k)?gat.encode(k):k},d)}return b?h.map(function(M){return u(M,d)}):p?Na.simpleMap(h,Na.identity):Na.isJSDate(h)?Na.ms2DateTimeLocal(+h):h}var c={data:(o||[]).map(function(h){var d=u(h);return t&&delete d.fit,d})};if(!t&&(c.layout=u(s),i)){var f=s._size;c.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return l&&(c.frames=u(l)),a&&(c.config=u(e._context,!0)),n==="object"?c:JSON.stringify(c)};xa.modifyFrames=function(e,t){var r,n,i,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return Xl.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function v(){return h++,function(){d++,!n&&d===h&&s(f)}}r.runFn(v),setTimeout(v())})}function s(f){if(e._transitionData)return a(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return Xl.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(f)}function l(){if(e._transitionData)return e._transitioning=!1,i(e._transitionData._interruptCallbacks)}var u=[xa.previousPromises,l,r.prepareFn,xa.rehover,xa.reselect,o],c=Na.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}xa.doCalcdata=function(e,t){var r=Mp.list(e),n=e._fullData,i=e._fullLayout,a,o,s,l,u=new Array(n.length),c=(e.calcdata||[]).slice();for(e.calcdata=u,i._numBoxes=0,i._numViolins=0,i._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,i._piecolormap={},i._sunburstcolormap={},i._treemapcolormap={},i._iciclecolormap={},i._funnelareacolormap={},s=0;s=0;l--)if(L[l].enabled){a._indexToPoints=L[l]._indexToPoints;break}o&&o.calc&&(T=o.calc(e,a))}(!Array.isArray(T)||!T[0])&&(T=[{x:Vne,y:Vne}]),T[0].t||(T[0].t={}),T[0].trace=a,u[k]=T}}for(Wne(r,n,i),s=0;s{"use strict";Cb.xmlns="http://www.w3.org/2000/xmlns/";Cb.svg="http://www.w3.org/2000/svg";Cb.xlink="http://www.w3.org/1999/xlink";Cb.svgAttrs={xmlns:Cb.svg,"xmlns:xlink":Cb.xlink}});var Dh=ye((Inr,rae)=>{"use strict";rae.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"}}});var Zl=ye(b0=>{"use strict";var Fh=qa(),Py=Pr(),Dat=Py.strTranslate,bO=Wp(),Fat=Dh().LINE_SPACING,zat=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;b0.convertToTspans=function(e,t,r){var n=e.text(),i=!e.attr("data-notex")&&t&&t._context.typesetMath&&typeof MathJax!="undefined"&&n.match(zat),a=Fh.select(e.node().parentNode);if(a.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":n,"data-math":"N"});function s(){a.empty()||(o=e.attr("class")+"-math",a.select("svg."+o).remove()),e.text("").style("white-space","pre");var l=Yat(e.node(),n);l&&e.style("pointer-events","all"),b0.positionText(e),r&&r.call(e)}return i?(t&&t._promises||[]).push(new Promise(function(l){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),c={fontSize:u};Nat(i[2],c,function(f,h,d){a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove();var v=f&&f.select("svg");if(!v||!v.node()){s(),l();return}var m=a.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});m.node().appendChild(v.node()),h&&h.node()&&v.node().insertBefore(h.node().cloneNode(!0),v.node().firstChild);var b=d.width,p=d.height;v.attr({class:o,height:p,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var k=e.node().style.fill||"black",M=v.select("g");M.attr({fill:k,stroke:k});var T=M.node().getBoundingClientRect(),L=T.width,x=T.height;(L>b||x>p)&&(v.style("overflow","hidden"),T=v.node().getBoundingClientRect(),L=T.width,x=T.height);var C=+e.attr("x"),S=+e.attr("y"),g=u||e.node().getBoundingClientRect().height,P=-g/4;if(o[0]==="y")m.attr({transform:"rotate("+[-90,C,S]+")"+Dat(-L/2,P-x/2)});else if(o[0]==="l")S=P-x/2;else if(o[0]==="a"&&o.indexOf("atitle")!==0)C=0,S=P;else{var E=e.attr("text-anchor");C=C-L*(E==="middle"?.5:E==="end"?1:0),S=S+P-x/2}v.attr({x:C,y:S}),r&&r.call(e,m),l(m)})})):s(),e};var qat=/(<|<|<)/g,Oat=/(>|>|>)/g;function Bat(e){return e.replace(qat,"\\lt ").replace(Oat,"\\gt ")}var iae=[["$","$"],["\\(","\\)"]];function Nat(e,t,r){var n=parseInt((MathJax.version||"").split(".")[0]);if(n!==2&&n!==3){Py.warn("No MathJax version:",MathJax.version);return}var i,a,o,s,l=function(){return a=Py.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:iae},displayAlign:"left"})},u=function(){a=Py.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=iae},c=function(){if(i=MathJax.Hub.config.menuSettings.renderer,i!=="SVG")return MathJax.Hub.setRenderer("SVG")},f=function(){i=MathJax.config.startup.output,i!=="svg"&&(MathJax.config.startup.output="svg")},h=function(){var k="math-output-"+Py.randstr({},64);s=Fh.select("body").append("div").attr({id:k}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(Bat(e));var M=s.node();return n===2?MathJax.Hub.Typeset(M):MathJax.typeset([M])},d=function(){var k=s.select(n===2?".MathJax_SVG":".MathJax"),M=!k.empty()&&s.select("svg").node();if(!M)Py.log("There was an error in the tex syntax.",e),r();else{var T=M.getBoundingClientRect(),L;n===2?L=Fh.select("body").select("#MathJax_SVG_glyphs"):L=k.select("defs"),r(k,L,T)}s.remove()},v=function(){if(i!=="SVG")return MathJax.Hub.setRenderer(i)},m=function(){i!=="svg"&&(MathJax.config.startup.output=i)},b=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(a)},p=function(){MathJax.config=a};n===2?MathJax.Hub.Queue(l,c,h,d,v,b):n===3&&(u(),f(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),m(),p()}))}var sae={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},Uat={sub:"0.3em",sup:"-0.6em"},Vat={sub:"-0.21em",sup:"0.42em"},nae="\u200B",aae=["http:","https:","mailto:","",void 0,":"],lae=b0.NEWLINES=/(\r\n?|\n)/g,TO=/(<[^<>]*>)/,AO=/<(\/?)([^ >]*)(\s+(.*))?>/i,Gat=//i;b0.BR_TAG_ALL=//gi;var uae=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,cae=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,fae=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,Hat=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function Lb(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&sL(n)}var jat=/(^|;)\s*color:/;b0.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,n=t.allowedTags!==void 0?t.allowedTags:["br"],i="...",a=i.length,o=e.split(TO),s=[],l="",u=0,c=0;ca?s.push(f.slice(0,Math.max(0,m-a))+i):s.push(f.slice(0,m));break}l=""}}return s.join("")};var Wat={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},Xat=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function sL(e){return e.replace(Xat,function(t,r){var n;return r.charAt(0)==="#"?n=Zat(r.charAt(1)==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10)):n=Wat[r],n||t})}b0.convertEntities=sL;function Zat(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r((e>>10)+55232,e%1024+56320)}}function Yat(e,t){t=t.replace(lae," ");var r=!1,n=[],i,a=-1;function o(){a++;var x=document.createElementNS(bO.svg,"tspan");Fh.select(x).attr({class:"line",dy:a*Fat+"em"}),e.appendChild(x),i=x;var C=n;if(n=[{node:x}],C.length>1)for(var S=1;S.",t);return}var C=n.pop();x!==C.type&&Py.log("Start tag <"+C.type+"> doesnt match end tag <"+x+">. Pretending it did match.",t),i=n[n.length-1].node}var c=Gat.test(t);c?o():(i=e,n=[{node:e}]);for(var f=t.split(TO),h=0;h{"use strict";var Kat=qa(),uL=fd(),nM=Eo(),lL=Pr(),dae=ka(),Jat=yb().isValid;function $at(e,t,r){var n=t?lL.nestedProperty(e,t).get()||{}:e,i=n[r||"color"];i&&i._inputArray&&(i=i._inputArray);var a=!1;if(lL.isArrayOrTypedArray(i)){for(var o=0;o=0;n--,i++){var a=e[n];r[i]=[1-a[0],a[1]]}return r}function _ae(e,t){t=t||{};for(var r=e.domain,n=e.range,i=n.length,a=new Array(i),o=0;o{"use strict";var bae=Wq(),eot=bae.FORMAT_LINK,tot=bae.DATE_FORMAT_LINK;function rot(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?SO:wae)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function SO(e,t){return["Sets the "+e+" formatting rule"+(t?"for `"+t+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+eot+"."].join(" ")}function wae(e,t){return SO(e,t)+[" And for dates see: "+tot+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}Tae.exports={axisHoverFormat:rot,descriptionOnlyNumbers:SO,descriptionWithDates:wae}});var Rd=ye((qnr,Nae)=>{"use strict";var Aae=ec(),z3=Ih(),Bae=Pd().dash,EO=Ao().extendFlat,Sae=vl().templatedArray,znr=Ll().templateFormatStringDescription,Mae=vf().descriptionWithDates,iot=fs().ONEDAY,mm=Rh(),not=mm.HOUR_PATTERN,aot=mm.WEEKDAY_PATTERN,MO={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},oot=EO({},MO,{values:MO.values.slice().concat(["sync"])});function Eae(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var kae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Cae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Lae={valType:"data_array",editType:"ticks"},Pae={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function Iae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function Rae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Dae={valType:"color",dflt:z3.defaultLine,editType:"ticks"},Fae={valType:"color",dflt:z3.lightLine,editType:"ticks"};function zae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var qae=EO({},Bae,{editType:"ticks"}),Oae={valType:"boolean",editType:"ticks"};Nae.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:z3.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:Aae({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[mm.idRegex.x.toString(),mm.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[mm.idRegex.x.toString(),mm.idRegex.y.toString()],editType:"calc"},rangebreaks:Sae("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[aot,not,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:iot},editType:"calc"}),tickmode:oot,nticks:Eae(),tick0:kae,dtick:Cae,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:Lae,ticktext:{valType:"data_array",editType:"ticks"},ticks:Pae,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:Iae(),tickwidth:Rae(),tickcolor:Dae,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:EO({},Bae,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:Aae({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Mae("tick label")},tickformatstops:Sae("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:Mae("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:z3.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:Oae,gridcolor:Fae,gridwidth:zae(),griddash:qae,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:z3.defaultLine,editType:"ticks"},zerolinelayer:{valType:"enumerated",values:["above traces","below traces"],dflt:"below traces",editType:"plot"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:z3.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",mm.idRegex.x.toString(),mm.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",mm.idRegex.x.toString(),mm.idRegex.y.toString()],editType:"plot"},minor:{tickmode:MO,nticks:Eae("minor"),tick0:kae,dtick:Cae,tickvals:Lae,ticks:Pae,ticklen:Iae("minor"),tickwidth:Rae("minor"),tickcolor:Dae,gridcolor:Fae,gridwidth:zae("minor"),griddash:qae,showgrid:Oae,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var cL=ye((Onr,Gae)=>{"use strict";var $c=Rd(),Uae=ec(),Vae=Ao().extendFlat,sot=mc().overrideAll;Gae.exports=sot({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:$c.linecolor,outlinewidth:$c.linewidth,bordercolor:$c.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:$c.minor.tickmode,nticks:$c.nticks,tick0:$c.tick0,dtick:$c.dtick,tickvals:$c.tickvals,ticktext:$c.ticktext,ticks:Vae({},$c.ticks,{dflt:""}),ticklabeloverflow:Vae({},$c.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:$c.ticklen,tickwidth:$c.tickwidth,tickcolor:$c.tickcolor,ticklabelstep:$c.ticklabelstep,showticklabels:$c.showticklabels,labelalias:$c.labelalias,tickfont:Uae({}),tickangle:$c.tickangle,tickformat:$c.tickformat,tickformatstops:$c.tickformatstops,tickprefix:$c.tickprefix,showtickprefix:$c.showtickprefix,ticksuffix:$c.ticksuffix,showticksuffix:$c.showticksuffix,separatethousands:$c.separatethousands,exponentformat:$c.exponentformat,minexponent:$c.minexponent,showexponent:$c.showexponent,title:{text:{valType:"string"},font:Uae({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Tu=ye((Nnr,jae)=>{"use strict";var lot=cL(),uot=m3().counter,cot=t_(),Hae=yb().scales,Bnr=cot(Hae);function fL(e){return"`"+e+"`"}jae.exports=function(t,r){t=t||"",r=r||{};var n=r.cLetter||"c",i="onlyIfNumerical"in r?r.onlyIfNumerical:!!t,a="noScale"in r?r.noScale:t==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:n==="z",s=typeof r.colorscaleDflt=="string"?Hae[r.colorscaleDflt]:null,l=r.editTypeOverride||"",u=t?t+".":"",c,f;"colorAttr"in r?(c=r.colorAttr,f=r.colorAttr):(c={z:"z",c:"color"}[n],f="in "+fL(u+c));var h=i?" Has an effect only if "+f+" is set to a numerical array.":"",d=n+"auto",v=n+"min",m=n+"max",b=n+"mid",p=fL(u+d),k=fL(u+v),M=fL(u+m),T=k+" and "+M,L={};L[v]=L[m]=void 0;var x={};x[d]=!1;var C={};return c==="color"&&(C.color={valType:"color",arrayOk:!0,editType:l||"style"},r.anim&&(C.color.anim=!0)),C[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:L},C[v]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},C[m]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},C[b]={valType:"number",dflt:null,editType:"calc",impliedEdits:L},C.colorscale={valType:"colorscale",editType:"calc",dflt:s,impliedEdits:{autocolorscale:!1}},C.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},C.reversescale={valType:"boolean",dflt:!1,editType:"plot"},a||(C.showscale={valType:"boolean",dflt:o,editType:"calc"},C.colorbar=lot),r.noColorAxis||(C.coloraxis={valType:"subplotid",regex:uot("coloraxis"),dflt:null,editType:"calc"}),C}});var CO=ye((Unr,Wae)=>{"use strict";var fot=Ao().extendFlat,hot=Tu(),kO=yb().scales;Wae.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:kO.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:kO.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:kO.RdBu,editType:"calc"}},coloraxis:fot({_isSubplotObj:!0,editType:"calc"},hot("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var LO=ye((Vnr,Xae)=>{"use strict";var dot=Pr();Xae.exports=function(t){return dot.isPlainObject(t.colorbar)}});var RO=ye(IO=>{"use strict";var PO=Eo(),Zae=Pr(),Yae=fs(),vot=Yae.ONEDAY,pot=Yae.ONEWEEK;IO.dtick=function(e,t){var r=t==="log",n=t==="date",i=t==="category",a=n?vot:1;if(!e)return a;if(PO(e))return e=Number(e),e<=0?a:i?Math.max(1,Math.round(e)):n?Math.max(.1,e):e;if(typeof e!="string"||!(n||r))return a;var o=e.charAt(0),s=e.slice(1);return s=PO(s)?Number(s):0,s<=0||!(n&&o==="M"&&s===Math.round(s)||r&&o==="L"||r&&o==="D"&&(s===1||s===2))?a:e};IO.tick0=function(e,t,r,n){if(t==="date")return Zae.cleanDate(e,Zae.dateTick0(r,n%pot===0?1:0));if(!(n==="D1"||n==="D2"))return PO(e)?Number(e):0}});var Pb=ye((Hnr,Jae)=>{"use strict";var Kae=RO(),got=Pr().isArrayOrTypedArray,mot=Yd().isTypedArraySpec,yot=Yd().decodeTypedArraySpec;Jae.exports=function(t,r,n,i,a){a||(a={});var o=a.isMinor,s=o?t.minor||{}:t,l=o?r.minor:r,u=o?"minor.":"";function c(k){var M=s[k];return mot(M)&&(M=yot(M)),M!==void 0?M:(l._template||{})[k]}var f=c("tick0"),h=c("dtick"),d=c("tickvals"),v=got(d)?"array":h?"linear":"auto",m=n(u+"tickmode",v);if(m==="auto"||m==="sync")n(u+"nticks");else if(m==="linear"){var b=l.dtick=Kae.dtick(h,i);l.tick0=Kae.tick0(f,i,r.calendar,b)}else if(i!=="multicategory"){var p=n(u+"tickvals");p===void 0?l.tickmode="auto":o||n("ticktext")}}});var q3=ye((jnr,Qae)=>{"use strict";var DO=Pr(),$ae=Rd();Qae.exports=function(t,r,n,i){var a=i.isMinor,o=a?t.minor||{}:t,s=a?r.minor:r,l=a?$ae.minor:$ae,u=a?"minor.":"",c=DO.coerce2(o,s,l,"ticklen",a?(r.ticklen||5)*.6:void 0),f=DO.coerce2(o,s,l,"tickwidth",a?r.tickwidth||1:void 0),h=DO.coerce2(o,s,l,"tickcolor",(a?r.tickcolor:void 0)||s.color),d=n(u+"ticks",!a&&i.outerTicks||c||f||h?"outside":"");d||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var FO=ye((Wnr,eoe)=>{"use strict";eoe.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],n=r.filter(function(a){return t[a]!==void 0}),i=function(a){return t[a]===t[n[0]]};if(n.every(i)||n.length===1)return t[n[0]]}});var Kd=ye((Xnr,toe)=>{"use strict";var hL=Pr(),_ot=vl();toe.exports=function(t,r,n){var i=n.name,a=n.inclusionAttr||"visible",o=r[i],s=hL.isArrayOrTypedArray(t[i])?t[i]:[],l=r[i]=[],u=_ot.arrayTemplater(r,i,a),c,f;for(c=0;c{"use strict";var zO=Pr(),xot=ka().contrast,roe=Rd(),bot=FO(),wot=Kd();ioe.exports=function(t,r,n,i,a){a||(a={});var o=n("labelalias");zO.isPlainObject(o)||delete r.labelalias;var s=bot(t),l=n("showticklabels");if(l){a.noTicklabelshift||n("ticklabelshift"),a.noTicklabelstandoff||n("ticklabelstandoff");var u=a.font||{},c=r.color,f=r.ticklabelposition||"",h=f.indexOf("inside")!==-1?xot(a.bgColor):c&&c!==roe.color.dflt?c:u.color;if(zO.coerceFont(n,"tickfont",u,{overrideDflt:{color:h}}),!a.noTicklabelstep&&i!=="multicategory"&&i!=="log"&&n("ticklabelstep"),!a.noAng){var d=n("tickangle");!a.noAutotickangles&&d==="auto"&&n("autotickangles")}if(i!=="category"){var v=n("tickformat");wot(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:Tot}),r.tickformatstops.length||delete r.tickformatstops,!a.noExp&&!v&&i!=="date"&&(n("showexponent",s),n("exponentformat"),n("minexponent"),n("separatethousands"))}!a.noMinorloglabels&&i==="log"&&n("minorloglabels")}};function Tot(e,t){function r(i,a){return zO.coerce(e,t,roe.tickformatstops,i,a)}var n=r("enabled");n&&(r("dtickrange"),r("value"))}});var l_=ye((Ynr,noe)=>{"use strict";var Aot=FO();noe.exports=function(t,r,n,i,a){a||(a={});var o=a.tickSuffixDflt,s=Aot(t),l=n("tickprefix");l&&n("showtickprefix",s);var u=n("ticksuffix",o);u&&n("showticksuffix",s)}});var qO=ye((Knr,aoe)=>{"use strict";var u_=Pr(),Sot=vl(),Mot=Pb(),Eot=q3(),kot=s_(),Cot=l_(),Lot=cL();aoe.exports=function(t,r,n){var i=Sot.newContainer(r,"colorbar"),a=t.colorbar||{};function o(E,z){return u_.coerce(a,i,Lot,E,z)}var s=n.margin||{t:0,b:0,l:0,r:0},l=n.width-s.l-s.r,u=n.height-s.t-s.b,c=o("orientation"),f=c==="v",h=o("thicknessmode");o("thickness",h==="fraction"?30/(f?l:u):30);var d=o("lenmode");o("len",d==="fraction"?1:f?u:l);var v=o("yref"),m=o("xref"),b=v==="paper",p=m==="paper",k,M,T,L="left";f?(T="middle",L=p?"left":"right",k=p?1.02:1,M=.5):(T=b?"bottom":"top",L="center",k=.5,M=b?1.02:1),u_.coerce(a,i,{x:{valType:"number",min:p?-2:0,max:p?3:1,dflt:k}},"x"),u_.coerce(a,i,{y:{valType:"number",min:b?-2:0,max:b?3:1,dflt:M}},"y"),o("xanchor",L),o("xpad"),o("yanchor",T),o("ypad"),u_.noneOrAll(a,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var x=u_.coerce(a,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:f?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",x.indexOf("inside")!==-1?"hide past domain":"hide past div"),Mot(a,i,o,"linear");var C=n.font,S={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:C};x.indexOf("inside")!==-1&&(S.bgColor="black"),Cot(a,i,o,"linear",S),kot(a,i,o,"linear",S),Eot(a,i,o,"linear",S),o("title.text",n._dfltTitle.colorbar);var g=i.showticklabels?i.tickfont:C,P=u_.extendFlat({},C,{family:g.family,size:u_.bigFont(g.size)});u_.coerceFont(o,"title.font",P),o("title.side",f?"top":"right")}});var td=ye((Jnr,loe)=>{"use strict";var ooe=Eo(),BO=Pr(),Pot=LO(),Iot=qO(),soe=yb().isValid,Rot=Oa().traceIs;function OO(e,t){var r=t.slice(0,t.length-1);return t?BO.nestedProperty(e,r).get()||{}:e}loe.exports=function e(t,r,n,i,a){var o=a.prefix,s=a.cLetter,l="_module"in r,u=OO(t,o),c=OO(r,o),f=OO(r._template||{},o)||{},h=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,n,i,a)};if(l){var d=n._colorAxes||{},v=i(o+"coloraxis");if(v){var m=Rot(r,"contour")&&BO.nestedProperty(r,"contours.coloring").get()||"heatmap",b=d[v];b?(b[2].push(h),b[0]!==m&&(b[0]=!1,BO.warn(["Ignoring coloraxis:",v,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[v]=[m,r,[h]];return}}var p=u[s+"min"],k=u[s+"max"],M=ooe(p)&&ooe(k)&&p{"use strict";var uoe=Pr(),Dot=vl(),coe=CO(),Fot=td();foe.exports=function(t,r){function n(f,h){return uoe.coerce(t,r,coe,f,h)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var i=r._colorAxes,a,o;function s(f,h){return uoe.coerce(a,o,coe.coloraxis,f,h)}for(var l in i){var u=i[l];if(u[0])a=t[l]||{},o=Dot.newContainer(r,l,"coloraxis"),o._name=l,Fot(a,o,r,s,{prefix:"",cLetter:"c"});else{for(var c=0;c{"use strict";var zot=Pr(),qot=pv().hasColorscale,Oot=pv().extractOpts;doe.exports=function(t,r){function n(c,f){var h=c["_"+f];h!==void 0&&(c[f]=h)}function i(c,f){var h=f.container?zot.nestedProperty(c,f.container).get():c;if(h)if(h.coloraxis)h._colorAx=r[h.coloraxis];else{var d=Oot(h),v=d.auto;(v||d.min===void 0)&&n(h,f.min),(v||d.max===void 0)&&n(h,f.max),d.autocolorscale&&n(h,"colorscale")}}for(var a=0;a{"use strict";var poe=Eo(),NO=Pr(),Bot=pv().extractOpts;goe.exports=function(t,r,n){var i=t._fullLayout,a=n.vals,o=n.containerStr,s=o?NO.nestedProperty(r,o).get():r,l=Bot(s),u=l.auto!==!1,c=l.min,f=l.max,h=l.mid,d=function(){return NO.aggNums(Math.min,null,a)},v=function(){return NO.aggNums(Math.max,null,a)};if(c===void 0?c=d():u&&(s._colorAx&&poe(c)?c=Math.min(c,d()):c=d()),f===void 0?f=v():u&&(s._colorAx&&poe(f)?f=Math.max(f,v()):f=v()),u&&h!==void 0&&(f-h>h-c?c=h-(f-h):f-h=0?m=i.colorscale.sequential:m=i.colorscale.sequentialminus,l._sync("colorscale",m)}}});var tc=ye((tar,moe)=>{"use strict";var dL=yb(),O3=pv();moe.exports={moduleType:"component",name:"colorscale",attributes:Tu(),layoutAttributes:CO(),supplyLayoutDefaults:hoe(),handleDefaults:td(),crossTraceDefaults:voe(),calc:gv(),scales:dL.scales,defaultScale:dL.defaultScale,getScale:dL.get,isValidScale:dL.isValid,hasColorscale:O3.hasColorscale,extractOpts:O3.extractOpts,extractScale:O3.extractScale,flipScale:O3.flipScale,makeColorScaleFunc:O3.makeColorScaleFunc,makeColorScaleFuncFromTrace:O3.makeColorScaleFuncFromTrace}});var Ru=ye((rar,_oe)=>{"use strict";var yoe=Pr(),Not=Yd().isTypedArraySpec;_oe.exports={hasLines:function(e){return e.visible&&e.mode&&e.mode.indexOf("lines")!==-1},hasMarkers:function(e){return e.visible&&(e.mode&&e.mode.indexOf("markers")!==-1||e.type==="splom")},hasText:function(e){return e.visible&&e.mode&&e.mode.indexOf("text")!==-1},isBubble:function(e){var t=e.marker;return yoe.isPlainObject(t)&&(yoe.isArrayOrTypedArray(t.size)||Not(t.size))}}});var B3=ye((iar,xoe)=>{"use strict";var Uot=Eo();xoe.exports=function(t,r){r||(r=2);var n=t.marker,i=n.sizeref||1,a=n.sizemin||0,o=n.sizemode==="area"?function(s){return Math.sqrt(s/i)}:function(s){return s/i};return function(s){var l=o(s/r);return Uot(l)&&l>0?Math.max(l,a):0}}});var ip=ye(mv=>{"use strict";var vL=Pr();mv.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};mv.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],n=e.yaxes||[],i=0;i=0&&r.index{Toe.exports=Wot;var UO={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},jot=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function Wot(e){var t=[];return e.replace(jot,function(r,n,i){var a=n.toLowerCase();for(i=Zot(i),a=="m"&&i.length>2&&(t.push([n].concat(i.splice(0,2))),a="l",n=n=="m"?"l":"L");;){if(i.length==UO[a])return i.unshift(n),t.push(i);if(i.length{"use strict";var Yot=aM(),ca=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},hs="M0,0Z",Aoe=Math.sqrt(2),c_=Math.sqrt(3),VO=Math.PI,GO=Math.cos,HO=Math.sin;Coe.exports={circle:{n:0,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?vs(t,r,i):i}},square:{n:1,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2);return vs(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.4,2),i=ca(e*1.2,2);return vs(t,r,"M"+i+","+n+"H"+n+"V"+i+"H-"+n+"V"+n+"H-"+i+"V-"+n+"H-"+n+"V-"+i+"H"+n+"V-"+n+"H"+i+"Z")}},x:{n:4,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.8/Aoe,2),i="l"+n+","+n,a="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return vs(t,r,"M0,"+n+i+a+o+a+o+s+o+s+i+s+i+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M-"+n+","+i+"H"+n+"L0,-"+a+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M-"+n+",-"+i+"H"+n+"L0,"+a+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M"+i+",-"+n+"V"+n+"L-"+a+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M-"+i+",-"+n+"V"+n+"L"+a+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M-"+i+",-"+n+"H"+n+"V"+i+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M"+n+",-"+i+"V"+n+"H-"+i+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M"+i+","+n+"H-"+n+"V-"+i+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M-"+n+","+i+"V-"+n+"H"+i+"Z")}},pentagon:{n:13,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.951,2),i=ca(e*.588,2),a=ca(-e,2),o=ca(e*-.309,2),s=ca(e*.809,2);return vs(t,r,"M"+n+","+o+"L"+i+","+s+"H-"+i+"L-"+n+","+o+"L0,"+a+"Z")}},hexagon:{n:14,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/2,2),a=ca(e*c_/2,2);return vs(t,r,"M"+a+",-"+i+"V"+i+"L0,"+n+"L-"+a+","+i+"V-"+i+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/2,2),a=ca(e*c_/2,2);return vs(t,r,"M-"+i+","+a+"H"+i+"L"+n+",0L"+i+",-"+a+"H-"+i+"L-"+n+",0Z")}},octagon:{n:16,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.924,2),i=ca(e*.383,2);return vs(t,r,"M-"+i+",-"+n+"H"+i+"L"+n+",-"+i+"V"+i+"L"+i+","+n+"H-"+i+"L-"+n+","+i+"V-"+i+"Z")}},star:{n:17,f:function(e,t,r){if(ds(t))return hs;var n=e*1.4,i=ca(n*.225,2),a=ca(n*.951,2),o=ca(n*.363,2),s=ca(n*.588,2),l=ca(-n,2),u=ca(n*-.309,2),c=ca(n*.118,2),f=ca(n*.809,2),h=ca(n*.382,2);return vs(t,r,"M"+i+","+u+"H"+a+"L"+o+","+c+"L"+s+","+f+"L0,"+h+"L-"+s+","+f+"L-"+o+","+c+"L-"+a+","+u+"H-"+i+"L0,"+l+"Z")}},hexagram:{n:18,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.66,2),i=ca(e*.38,2),a=ca(e*.76,2);return vs(t,r,"M-"+a+",0l-"+i+",-"+n+"h"+a+"l"+i+",-"+n+"l"+i+","+n+"h"+a+"l-"+i+","+n+"l"+i+","+n+"h-"+a+"l-"+i+","+n+"l-"+i+",-"+n+"h-"+a+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*c_*.8,2),i=ca(e*.8,2),a=ca(e*1.6,2),o=ca(e*4,2),s="A "+o+","+o+" 0 0 1 ";return vs(t,r,"M-"+n+","+i+s+n+","+i+s+"0,-"+a+s+"-"+n+","+i+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*c_*.8,2),i=ca(e*.8,2),a=ca(e*1.6,2),o=ca(e*4,2),s="A "+o+","+o+" 0 0 1 ";return vs(t,r,"M"+n+",-"+i+s+"-"+n+",-"+i+s+"0,"+a+s+n+",-"+i+"Z")}},"star-square":{n:21,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.1,2),i=ca(e*2,2),a="A "+i+","+i+" 0 0 1 ";return vs(t,r,"M-"+n+",-"+n+a+"-"+n+","+n+a+n+","+n+a+n+",-"+n+a+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2),i=ca(e*1.9,2),a="A "+i+","+i+" 0 0 1 ";return vs(t,r,"M-"+n+",0"+a+"0,"+n+a+n+",0"+a+"0,-"+n+a+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.7,2),i=ca(e*1.4,2);return vs(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2),i=ca(e*.7,2);return vs(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/Aoe,2);return vs(t,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2);return vs(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM0,-"+n+"V"+n+"M-"+n+",0H"+n)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2),i=ca(e*.65,2);return vs(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+i+",-"+i+"L"+i+","+i+"M-"+i+","+i+"L"+i+",-"+i)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*.85,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(ds(t))return hs;var n=ca(e/2,2),i=ca(e,2);return vs(t,r,"M"+n+","+i+"V-"+i+"M"+(n-i)+",-"+i+"V"+i+"M"+i+","+n+"H-"+i+"M-"+i+","+(n-i)+"H"+i)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M-"+n+","+a+"L0,0M"+n+","+a+"L0,0M0,-"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M-"+n+",-"+a+"L0,0M"+n+",-"+a+"L0,0M0,"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M"+a+","+n+"L0,0M"+a+",-"+n+"L0,0M-"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M-"+a+","+n+"L0,0M-"+a+",-"+n+"L0,0M"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M0,0L-"+n+","+i+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M0,0L-"+n+",-"+i+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,0L"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,0L-"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+","+i+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+i+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,-"+i+"V"+i+"M0,0L"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,-"+i+"V"+i+"M0,0L-"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(ds(t))return hs;var n=VO/2.5,i=2*e*GO(n),a=2*e*HO(n);return vs(t,r,"M0,0L"+-i+","+a+"L"+i+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(ds(t))return hs;var n=VO/4,i=2*e*GO(n),a=2*e*HO(n);return vs(t,r,"M0,0L"+-i+","+a+"A "+2*e+","+2*e+" 0 0 1 "+i+","+a+"Z")},backoff:.4,noDot:!0}};function ds(e){return e===null}var Soe,Moe,Eoe,koe;function vs(e,t,r){if((!e||e%360===0)&&!t)return r;if(Eoe===e&&koe===t&&Soe===r)return Moe;Eoe=e,koe=t,Soe=r;function n(b,p){var k=GO(b),M=HO(b),T=p[0],L=p[1]+(t||0);return[T*k-L*M,T*M+L*k]}for(var i=e/180*VO,a=0,o=0,s=Yot(r),l="",u=0;u{"use strict";var dd=qa(),Du=Pr(),Kot=Du.numberFormat,Fb=Eo(),KO=fd(),gL=Oa(),Jd=ka(),Jot=tc(),sM=Du.strTranslate,mL=Zl(),$ot=Wp(),Qot=Dh(),est=Qot.LINE_SPACING,Noe=X1().DESELECTDIM,tst=Ru(),rst=B3(),ist=ip().appendArrayPointValue,Ta=Koe.exports={};Ta.font=function(e,t){var r=t.variant,n=t.style,i=t.weight,a=t.color,o=t.size,s=t.family,l=t.shadow,u=t.lineposition,c=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),a&&e.call(Jd.fill,a),i&&e.style("font-weight",i),n&&e.style("font-style",n),r&&e.style("font-variant",r),c&&e.style("text-transform",jO(ast(c))),l&&e.style("text-shadow",l==="auto"?mL.makeTextShadow(Jd.contrast(a)):jO(l)),u&&e.style("text-decoration-line",jO(ost(u)))};function jO(e){return e==="none"?void 0:e}var nst={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function ast(e){return nst[e]}function ost(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Ta.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};Ta.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};Ta.setRect=function(e,t,r,n,i){e.call(Ta.setPosition,t,r).call(Ta.setSize,n,i)};Ta.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),a=n.c2p(e.y);if(Fb(i)&&Fb(a)&&t.node())t.node().nodeName==="text"?t.attr("x",i).attr("y",a):t.attr("transform",sM(i,a));else return!1;return!0};Ta.translatePoints=function(e,t,r){e.each(function(n){var i=dd.select(this);Ta.translatePoint(n,i,t,r)})};Ta.hideOutsideRangePoint=function(e,t,r,n,i,a){t.attr("display",r.isPtWithinRange(e,i)&&n.isPtWithinRange(e,a)?null:"none")};Ta.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,n=t.yaxis;e.each(function(i){var a=i[0].trace,o=a.xcalendar,s=a.ycalendar,l=gL.traceIs(a,"bar-like")?".bartext":".point,.textpoint";e.selectAll(l).each(function(u){Ta.hideOutsideRangePoint(u,dd.select(this),r,n,o,s)})})}};Ta.crispRound=function(e,t,r){return!t||!Fb(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};Ta.singleLineStyle=function(e,t,r,n,i){t.style("fill","none");var a=(((e||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";Jd.stroke(t,n||a.color),Ta.dashLine(t,s,o)};Ta.lineGroupStyle=function(e,t,r,n){e.style("fill","none").each(function(i){var a=(((i||[])[0]||{}).trace||{}).line||{},o=t||a.width||0,s=n||a.dash||"";dd.select(this).call(Jd.stroke,r||a.color).call(Ta.dashLine,s,o)})};Ta.dashLine=function(e,t,r){r=+r||0,t=Ta.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};Ta.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return e==="solid"?e="":e==="dot"?e=r+"px,"+r+"px":e==="dash"?e=3*r+"px,"+3*r+"px":e==="longdash"?e=5*r+"px,"+5*r+"px":e==="dashdot"?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":e==="longdashdot"&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e};function Uoe(e,t,r,n){var i=t.fillpattern,a=t.fillgradient,o=Ta.getPatternAttr,s=i&&(o(i.shape,0,"")||o(i.path,0,""));if(s){var l=o(i.bgcolor,0,null),u=o(i.fgcolor,0,null),c=i.fgopacity,f=o(i.size,0,8),h=o(i.solidity,0,.3),d=t.uid;Ta.pattern(e,"point",r,d,s,f,h,void 0,i.fillmode,l,u,c)}else if(a&&a.type!=="none"){var v=a.type,m="scatterfill-"+t.uid;if(n&&(m="legendfill-"+t.uid),!n&&(a.start!==void 0||a.stop!==void 0)){var b,p;v==="horizontal"?(b={x:a.start,y:0},p={x:a.stop,y:0}):v==="vertical"&&(b={x:0,y:a.start},p={x:0,y:a.stop}),b.x=t._xA.c2p(b.x===void 0?t._extremes.x.min[0].val:b.x,!0),b.y=t._yA.c2p(b.y===void 0?t._extremes.y.min[0].val:b.y,!0),p.x=t._xA.c2p(p.x===void 0?t._extremes.x.max[0].val:p.x,!0),p.y=t._yA.c2p(p.y===void 0?t._extremes.y.max[0].val:p.y,!0),e.call(Hoe,r,m,"linear",a.colorscale,"fill",b,p,!0,!1)}else v==="horizontal"&&(v=v+"reversed"),e.call(Ta.gradient,r,m,v,a.colorscale,"fill")}else t.fillcolor&&e.call(Jd.fill,t.fillcolor)}Ta.singleFillStyle=function(e,t){var r=dd.select(e.node()),n=r.data(),i=((n[0]||[])[0]||{}).trace||{};Uoe(e,i,t,!1)};Ta.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(n){var i=dd.select(this);n[0].trace&&Uoe(i,n[0].trace,t,r)})};var Poe=Loe();Ta.symbolNames=[];Ta.symbolFuncs=[];Ta.symbolBackOffs=[];Ta.symbolNeedLines={};Ta.symbolNoDot={};Ta.symbolNoFill={};Ta.symbolList=[];Object.keys(Poe).forEach(function(e){var t=Poe[e],r=t.n;Ta.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),Ta.symbolNames[r]=e,Ta.symbolFuncs[r]=t.f,Ta.symbolBackOffs[r]=t.backoff||0,t.needLine&&(Ta.symbolNeedLines[r]=!0),t.noDot?Ta.symbolNoDot[r]=!0:Ta.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(Ta.symbolNoFill[r]=!0)});var sst=Ta.symbolNames.length,lst="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Ta.symbolNumber=function(e){if(Fb(e))e=+e;else if(typeof e=="string"){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),e=Ta.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=sst||e>=400?0:Math.floor(Math.max(e,0))};function Voe(e,t,r,n){var i=e%100;return Ta.symbolFuncs[i](t,r,n)+(e>=200?lst:"")}var Ioe=Kot("~f"),Goe={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}};Ta.gradient=function(e,t,r,n,i,a){var o=Goe[n];return Hoe(e,t,r,o.type,i,a,o.start,o.stop,!1,o.reversed)};function Hoe(e,t,r,n,i,a,o,s,l,u){var c=i.length,f;n==="linear"?f={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:n==="radial"&&(f={node:"radialGradient",reversed:u});for(var h=new Array(c),d=0;d=0&&e.i===void 0&&(e.i=a.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),n.ms2mrc){var l;e.ms==="various"||o.size==="various"?l=3:l=n.ms2mrc(e.ms),e.mrc=l,n.selectedSizeFn&&(l=e.mrc=n.selectedSizeFn(e));var u=Ta.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=QO(e,r),f=$O(e,r);t.attr("d",Voe(u,l,c,f))}var h=!1,d,v,m;if(e.so)m=s.outlierwidth,v=s.outliercolor,d=o.outliercolor;else{var b=(s||{}).width;m=(e.mlw+1||b+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?v=e.mlcc=n.lineScale(e.mlc):Du.isArrayOrTypedArray(s.color)?v=Jd.defaultLine:v=s.color,Du.isArrayOrTypedArray(o.color)&&(d=Jd.defaultLine,h=!0),"mc"in e?d=e.mcc=n.markerScale(e.mc):d=o.color||o.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(d=n.selectedColorFn(e))}let p=e.mld||(s||{}).dash;if(p&&Ta.dashLine(t,p,m),e.om)t.call(Jd.stroke,d).style({"stroke-width":(m||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:m)+"px");var k=o.gradient,M=e.mgt;M?h=!0:M=k&&k.type,Du.isArrayOrTypedArray(M)&&(M=M[0],Goe[M]||(M=0));var T=o.pattern,L=Ta.getPatternAttr,x=T&&(L(T.shape,e.i,"")||L(T.path,e.i,""));if(M&&M!=="none"){var C=e.mgc;C?h=!0:C=k.color;var S=r.uid;h&&(S+="-"+e.i),Ta.gradient(t,i,S,M,[[0,C],[1,d]],"fill")}else if(x){var g=!1,P=T.fgcolor;!P&&a&&a.color&&(P=a.color,g=!0);var E=L(P,e.i,a&&a.color||null),z=L(T.bgcolor,e.i,null),q=T.fgopacity,V=L(T.size,e.i,8),G=L(T.solidity,e.i,.3);g=g||e.mcc||Du.isArrayOrTypedArray(T.shape)||Du.isArrayOrTypedArray(T.path)||Du.isArrayOrTypedArray(T.bgcolor)||Du.isArrayOrTypedArray(T.fgcolor)||Du.isArrayOrTypedArray(T.size)||Du.isArrayOrTypedArray(T.solidity);var Z=r.uid;g&&(Z+="-"+e.i),Ta.pattern(t,"point",i,Z,x,V,G,e.mcc,T.fillmode,z,E,q)}else Du.isArrayOrTypedArray(d)?Jd.fill(t,d[e.i]):Jd.fill(t,d);m&&Jd.stroke(t,v)}};Ta.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=Ta.tryColorscale(r,""),t.lineScale=Ta.tryColorscale(r,"line"),gL.traceIs(e,"symbols")&&(t.ms2mrc=tst.isBubble(e)?rst(e):function(){return(r.size||6)/2}),e.selectedpoints&&Du.extendFlat(t,Ta.makeSelectedPointStyleFns(e)),t};Ta.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},a=r.marker||{},o=n.marker||{},s=i.opacity,l=a.opacity,u=o.opacity,c=l!==void 0,f=u!==void 0;(Du.isArrayOrTypedArray(s)||c||f)&&(t.selectedOpacityFn=function(T){var L=T.mo===void 0?i.opacity:T.mo;return T.selected?c?l:L:f?u:Noe*L});var h=i.color,d=a.color,v=o.color;(d||v)&&(t.selectedColorFn=function(T){var L=T.mcc||h;return T.selected?d||L:v||L});var m=i.size,b=a.size,p=o.size,k=b!==void 0,M=p!==void 0;return gL.traceIs(e,"symbols")&&(k||M)&&(t.selectedSizeFn=function(T){var L=T.mrc||m/2;return T.selected?k?b/2:L:M?p/2:L}),t};Ta.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return t.selectedTextColorFn=function(c){var f=c.tc||s;return c.selected?l||f:u||(l?f:Jd.addOpacity(f,Noe))},t};Ta.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=Ta.makeSelectedPointStyleFns(t),n=t.marker||{},i=[];r.selectedOpacityFn&&i.push(function(a,o){a.style("opacity",r.selectedOpacityFn(o))}),r.selectedColorFn&&i.push(function(a,o){Jd.fill(a,r.selectedColorFn(o))}),r.selectedSizeFn&&i.push(function(a,o){var s=o.mx||n.symbol||0,l=r.selectedSizeFn(o);a.attr("d",Voe(Ta.symbolNumber(s),l,QO(o,t),$O(o,t))),o.mrc2=l}),i.length&&e.each(function(a){for(var o=dd.select(this),s=0;s0?r:0}Ta.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var i=Ta.makeSelectedTextStyleFns(t);n=i.selectedTextColorFn}var a=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=dd.select(this),u=a?Du.extractOption(s,t,"txt","texttemplate"):Du.extractOption(s,t,"tx","text");if(!u&&u!==0){l.remove();return}if(a){var c=t._module.formatLabels,f=c?c(s,t,o):{},h={};ist(h,t,s.i),u=Du.texttemplateString({data:[h,s,t._meta],fallback:t.texttemplatefallback,labels:f,locale:o._d3locale,template:u})}var d=s.tp||t.textposition,v=Woe(s,t),m=n?n(s):s.tc||t.textfont.color;l.call(Ta.font,{family:s.tf||t.textfont.family,weight:s.tw||t.textfont.weight,style:s.ty||t.textfont.style,variant:s.tv||t.textfont.variant,textcase:s.tC||t.textfont.textcase,lineposition:s.tE||t.textfont.lineposition,shadow:s.tS||t.textfont.shadow,size:v,color:m}).text(u).call(mL.convertToTspans,r).call(joe,d,v,s.mrc)})}};Ta.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=Ta.makeSelectedTextStyleFns(t);e.each(function(n){var i=dd.select(this),a=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=Woe(n,t);Jd.fill(i,a);var l=gL.traceIs(t,"bar-like");joe(i,o,s,n.mrc2||n.mrc,l)})}};var Roe=.5;Ta.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],n=[],i;for(i=1;i=l||T>=c&&T<=l)&&(L<=f&&L>=u||L>=f&&L<=u)&&(e=[T,L])}return e}Ta.applyBackoff=Yoe;Ta.makeTester=function(){var e=Du.ensureSingleById(dd.select("body"),"svg","js-plotly-tester",function(r){r.attr($ot.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=Du.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Ta.tester=e,Ta.testref=t};Ta.savedBBoxes={};var XO=0,fst=1e4;Ta.bBox=function(e,t,r){r||(r=Doe(e));var n;if(r){if(n=Ta.savedBBoxes[r],n)return Du.extendFlat({},n)}else if(e.childNodes.length===1){var i=e.childNodes[0];if(r=Doe(i),r){var a=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,s=i.getAttribute("transform");if(!s){var l=Ta.bBox(i,!1,r);return a&&(l.left+=a,l.right+=a),o&&(l.top+=o,l.bottom+=o),l}if(r+="~"+a+"~"+o+"~"+s,n=Ta.savedBBoxes[r],n)return Du.extendFlat({},n)}}var u,c;t?u=e:(c=Ta.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),dd.select(u).attr("transform",null).call(mL.positionText,0,0);var f=u.getBoundingClientRect(),h=Ta.testref.node().getBoundingClientRect();t||c.removeChild(u);var d={height:f.height,width:f.width,left:f.left-h.left,top:f.top-h.top,right:f.right-h.left,bottom:f.bottom-h.top};return XO>=fst&&(Ta.savedBBoxes={},XO=0),r&&(Ta.savedBBoxes[r]=d),XO++,Du.extendFlat({},d)};function Doe(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}Ta.setClipUrl=function(e,t,r){e.attr("clip-path",JO(t,r))};function JO(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}Ta.getTranslate=function(e){var t=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",i=n.replace(t,function(a,o,s){return[o,s].join(" ")}).split(" ");return{x:+i[0]||0,y:+i[1]||0}};Ta.setTranslate=function(e,t,r){var n=/(\btranslate\(.*?\);?)/,i=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",o=e[i]("transform")||"";return t=t||0,r=r||0,o=o.replace(n,"").trim(),o+=sM(t,r),o=o.trim(),e[a]("transform",o),o};Ta.getScale=function(e){var t=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",i=n.replace(t,function(a,o,s){return[o,s].join(" ")}).split(" ");return{x:+i[0]||1,y:+i[1]||1}};Ta.setScale=function(e,t,r){var n=/(\bscale\(.*?\);?)/,i=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",o=e[i]("transform")||"";return t=t||1,r=r||1,o=o.replace(n,"").trim(),o+="scale("+t+","+r+")",o=o.trim(),e[a]("transform",o),o};var hst=/\s*sc.*/;Ta.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var n=t===1&&r===1?"":"scale("+t+","+r+")";e.each(function(){var i=(this.getAttribute("transform")||"").replace(hst,"");i+=n,i=i.trim(),this.setAttribute("transform",i)})}};var dst=/translate\([^)]*\)\s*$/;Ta.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,i=dd.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(dst);t===1&&r===1?n=[]:n=[sM(o,s),"scale("+t+","+r+")",sM(-o,-s)],l&&n.push(l),i.attr("transform",n.join(""))}})};function $O(e,t){var r;return e&&(r=e.mf),r===void 0&&(r=t.marker&&t.marker.standoff||0),!t._geo&&!t._xA?-r:r}Ta.getMarkerStandoff=$O;var oM=Math.atan2,Ib=Math.cos,U3=Math.sin;function Foe(e,t){var r=t[0],n=t[1];return[r*Ib(e)-n*U3(e),r*U3(e)+n*Ib(e)]}var zoe,qoe,Ooe,Boe,ZO,YO;function QO(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!r||Du.isArrayOrTypedArray(r))&&(r=0));var n,i,a=t.marker.angleref;if(a==="previous"||a==="north"){if(t._geo){var o=t._geo.project(e.lonlat);n=o[0],i=o[1]}else{var s=t._xA,l=t._yA;if(s&&l)n=s.c2p(e.x),i=l.c2p(e.y);else return 90}if(t._geo){var u=e.lonlat[0],c=e.lonlat[1],f=t._geo.project([u,c+1e-5]),h=t._geo.project([u+1e-5,c]),d=oM(h[1]-i,h[0]-n),v=oM(f[1]-i,f[0]-n),m;if(a==="north")m=r/180*Math.PI;else if(a==="previous"){var b=u/180*Math.PI,p=c/180*Math.PI,k=zoe/180*Math.PI,M=qoe/180*Math.PI,T=k-b,L=Ib(M)*U3(T),x=U3(M)*Ib(p)-Ib(M)*U3(p)*Ib(T);m=-oM(L,x)-Math.PI,zoe=u,qoe=c}var C=Foe(d,[Ib(m),0]),S=Foe(v,[U3(m),0]);r=oM(C[1]+S[1],C[0]+S[0])/Math.PI*180,a==="previous"&&!(YO===t.uid&&e.i===ZO+1)&&(r=null)}if(a==="previous"&&!t._geo)if(YO===t.uid&&e.i===ZO+1&&Fb(n)&&Fb(i)){var g=n-Ooe,P=i-Boe,E=t.line&&t.line.shape||"",z=E.slice(E.length-1);z==="h"&&(P=0),z==="v"&&(g=0),r+=oM(P,g)/Math.PI*180+90}else r=null}return Ooe=n,Boe=i,ZO=e.i,YO=t.uid,r}Ta.getMarkerAngle=QO});var qb=ye((lar,ese)=>{"use strict";var V3=qa(),vst=Eo(),pst=Mc(),eB=Oa(),zb=Pr(),Joe=zb.strTranslate,yL=So(),_L=ka(),G3=Zl(),$oe=X1(),gst=Dh().OPPOSITE_SIDE,Qoe=/ [XY][0-9]* /,tB=1.6,rB=1.6;function mst(e,t,r){var n=e._fullLayout,i=r.propContainer,a=r.propName,o=r.placeholder,s=r.traceIndex,l=r.avoid||{},u=r.attributes,c=r.transform,f=r.containerGroup,h=1,d=i.title,v=(d&&d.text?d.text:"").trim(),m=!1,b=d&&d.font?d.font:{},p=b.family,k=b.size,M=b.color,T=b.weight,L=b.style,x=b.variant,C=b.textcase,S=b.lineposition,g=b.shadow,P=r.subtitlePropName,E=!!P,z=r.subtitlePlaceholder,q=(i.title||{}).subtitle||{text:"",font:{}},V=(q.text||"").trim(),G=!1,Z=1,j=q.font,N=j.family,H=j.size,ie=j.color,ae=j.weight,_e=j.style,Ee=j.variant,Ce=j.textcase,ge=j.lineposition,re=j.shadow,Se;a==="title.text"?Se="titleText":a.indexOf("axis")!==-1?Se="axisTitleText":a.indexOf("colorbar")!==-1&&(Se="colorbarTitleText");var ke=e._context.edits[Se];function be(Vt,rr){return Vt===void 0||rr===void 0?!1:Vt.replace(Qoe," % ")===rr.replace(Qoe," % ")}v===""?h=0:be(v,o)&&(ke||(v=""),h=.2,m=!0),E&&(V===""?Z=0:be(V,z)&&(ke||(V=""),Z=.2,G=!0)),r._meta?v=zb.templateString(v,r._meta):n._meta&&(v=zb.templateString(v,n._meta));var Be=v||V||ke,Le;f||(f=zb.ensureSingle(n._infolayer,"g","g-"+t),Le=n._hColorbarMoveTitle);var me=f.selectAll("text."+t).data(Be?[0]:[]);me.enter().append("text"),me.text(v).attr("class",t),me.exit().remove();var Pe=null,ce=t+"-subtitle",He=V||ke;if(E&&(Pe=f.selectAll("text."+ce).data(He?[0]:[]),Pe.enter().append("text"),Pe.text(V).attr("class",ce),Pe.exit().remove()),!Be)return f;function lt(Vt,rr){zb.syncOrAsync([mt,Ht],{title:Vt,subtitle:rr})}function mt(Vt){var rr=Vt.title,tt=Vt.subtitle,je;!c&&Le&&(c={}),c?(je="",c.rotate&&(je+="rotate("+[c.rotate,u.x,u.y]+")"),(c.offset||Le)&&(je+=Joe(0,(c.offset||0)-(Le||0)))):je=null,rr.attr("transform",je);function Ue(Et){if(Et){var pt=V3.select(Et.node().parentNode).select("."+ce);if(!pt.empty()){var jt=Et.node().getBBox();if(jt.height){var or=jt.y+jt.height+tB*H;pt.attr("y",or)}}}}if(rr.style("opacity",h*_L.opacity(M)).call(yL.font,{color:_L.rgb(M),size:V3.round(k,2),family:p,weight:T,style:L,variant:x,textcase:C,shadow:g,lineposition:S}).attr(u).call(G3.convertToTspans,e,Ue),tt&&!tt.empty()){var Ae=f.select("."+t+"-math-group"),rt=rr.node().getBBox(),St=Ae.node()?Ae.node().getBBox():void 0,Tt=St?St.y+St.height+tB*H:rt.y+rt.height+rB*H,dt=zb.extendFlat({},u,{y:Tt});tt.attr("transform",je),tt.style("opacity",Z*_L.opacity(ie)).call(yL.font,{color:_L.rgb(ie),size:V3.round(H,2),family:N,weight:ae,style:_e,variant:Ee,textcase:Ce,shadow:re,lineposition:ge}).attr(dt).call(G3.convertToTspans,e)}return pst.previousPromises(e)}function Ht(Vt){var rr=Vt.title,tt=V3.select(rr.node().parentNode);if(l&&l.selection&&l.side&&v){tt.attr("transform",null);var je=gst[l.side],Ue=l.side==="left"||l.side==="top"?-1:1,Ae=vst(l.pad)?l.pad:2,rt=yL.bBox(tt.node()),St={t:0,b:0,l:0,r:0},Tt=e._fullLayout._reservedMargin;for(var dt in Tt)for(var Et in Tt[dt]){var pt=Tt[dt][Et];St[Et]=Math.max(St[Et],pt)}var jt={left:St.l,top:St.t,right:n.width-St.r,bottom:n.height-St.b},or=l.maxShift||Ue*(jt[l.side]-rt[l.side]),mr=0;if(or<0)mr=or;else{var Ar=l.offsetLeft||0,ei=l.offsetTop||0;rt.left-=Ar,rt.right-=Ar,rt.top-=ei,rt.bottom-=ei,l.selection.each(function(){var jr=yL.bBox(this);zb.bBoxIntersect(rt,jr,Ae)&&(mr=Math.max(mr,Ue*(jr[l.side]-rt[je])+Ae))}),mr=Math.min(or,mr),i._titleScoot=Math.abs(mr)}if(mr>0||or<0){var qr={left:[-mr,0],right:[mr,0],top:[0,-mr],bottom:[0,mr]}[l.side];tt.attr("transform",Joe(qr[0],qr[1]))}}}me.call(lt,Pe);function at(Vt,rr){Vt.text(rr).on("mouseover.opacity",function(){V3.select(this).transition().duration($oe.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){V3.select(this).transition().duration($oe.HIDE_PLACEHOLDER).style("opacity",0)})}if(ke&&(v?me.on(".opacity",null):(at(me,o),m=!0),me.call(G3.makeEditable,{gd:e}).on("edit",function(Vt){s!==void 0?eB.call("_guiRestyle",e,a,Vt,s):eB.call("_guiRelayout",e,a,Vt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(lt)}).on("input",function(Vt){this.text(Vt||" ").call(G3.positionText,u.x,u.y)}),E)){if(E&&!v){var ct=me.node().getBBox(),ar=ct.y+ct.height+rB*H;Pe.attr("y",ar)}V?Pe.on(".opacity",null):(at(Pe,z),G=!0),Pe.call(G3.makeEditable,{gd:e}).on("edit",function(Vt){eB.call("_guiRelayout",e,"title.subtitle.text",Vt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(lt)}).on("input",function(Vt){this.text(Vt||" ").call(G3.positionText,Pe.attr("x"),Pe.attr("y"))})}return me.classed("js-placeholder",m),Pe&&!Pe.empty()&&Pe.classed("js-placeholder",G),f}ese.exports={draw:mst,SUBTITLE_PADDING_EM:rB,SUBTITLE_PADDING_MATHJAX_EM:tB}});var xm=ye((uar,ase)=>{"use strict";var yst=qa(),_st=d3().utcFormat,yc=Pr(),xst=yc.numberFormat,ym=Eo(),f_=yc.cleanNumber,bst=yc.ms2DateTime,tse=yc.dateTime2ms,_m=yc.ensureNumber,rse=yc.isArrayOrTypedArray,h_=fs(),xL=h_.FP_SAFE,Sg=h_.BADNUM,wst=h_.LOG_CLIP,Tst=h_.ONEWEEK,bL=h_.ONEDAY,wL=h_.ONEHOUR,ise=h_.ONEMIN,nse=h_.ONESEC,TL=df(),ML=Rh(),AL=ML.HOUR_PATTERN,SL=ML.WEEKDAY_PATTERN;function lM(e){return Math.pow(10,e)}function iB(e){return e!=null}ase.exports=function(t,r){r=r||{};var n=t._id||"x",i=n.charAt(0);function a(T,L){if(T>0)return Math.log(T)/Math.LN10;if(T<=0&&L&&t.range&&t.range.length===2){var x=t.range[0],C=t.range[1];return .5*(x+C-2*wst*Math.abs(x-C))}else return Sg}function o(T,L,x,C){if((C||{}).msUTC&&ym(T))return+T;var S=tse(T,x||t.calendar);if(S===Sg)if(ym(T)){T=+T;var g=Math.floor(yc.mod(T+.05,1)*10),P=Math.round(T-g/10);S=tse(new Date(P))+g/10}else return Sg;return S}function s(T,L,x){return bst(T,L,x||t.calendar)}function l(T){return t._categories[Math.round(T)]}function u(T){if(iB(T)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[T]!==void 0)return t._categoriesMap[T];t._categories.push(typeof T=="number"?String(T):T);var L=t._categories.length-1;return t._categoriesMap[T]=L,L}return Sg}function c(T,L){for(var x=new Array(L),C=0;Ct.range[1]&&(x=!x);for(var C=x?-1:1,S=C*T,g=0,P=0;Pz)g=P+1;else{g=S<(E+z)/2?P:P+1;break}}var q=t._B[g]||0;return isFinite(q)?v(T,t._m2,q):0},p=function(T){var L=t._rangebreaks.length;if(!L)return m(T,t._m,t._b);for(var x=0,C=0;Ct._rangebreaks[C].pmax&&(x=C+1);return m(T,t._m2,t._B[x])}}t.c2l=t.type==="log"?a:_m,t.l2c=t.type==="log"?lM:_m,t.l2p=b,t.p2l=p,t.c2p=t.type==="log"?function(T,L){return b(a(T,L))}:b,t.p2c=t.type==="log"?function(T){return lM(p(T))}:p,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=f_,t.c2d=t.c2r=t.l2d=t.l2r=_m,t.d2p=t.r2p=function(T){return t.l2p(f_(T))},t.p2d=t.p2r=p,t.cleanPos=_m):t.type==="log"?(t.d2r=t.d2l=function(T,L){return a(f_(T),L)},t.r2d=t.r2c=function(T){return lM(f_(T))},t.d2c=t.r2l=f_,t.c2d=t.l2r=_m,t.c2r=a,t.l2d=lM,t.d2p=function(T,L){return t.l2p(t.d2r(T,L))},t.p2d=function(T){return lM(p(T))},t.r2p=function(T){return t.l2p(f_(T))},t.p2r=p,t.cleanPos=_m):t.type==="date"?(t.d2r=t.r2d=yc.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(T,L,x){return t.l2p(o(T,0,x))},t.p2d=t.p2r=function(T,L,x){return s(p(T),L,x)},t.cleanPos=function(T){return yc.cleanDate(T,Sg,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=u,t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(T){var L=d(T);return L!==void 0?L:t.fraction2r(.5)},t.l2r=t.c2r=_m,t.r2l=d,t.d2p=function(T){return t.l2p(t.r2c(T))},t.p2d=function(T){return l(p(T))},t.r2p=t.d2p,t.p2r=p,t.cleanPos=function(T){return typeof T=="string"&&T!==""?T:_m(T)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(T){var L=h(T);return L!==void 0?L:t.fraction2r(.5)},t.r2c_just_indices=f,t.l2r=t.c2r=_m,t.r2l=h,t.d2p=function(T){return t.l2p(t.r2c(T))},t.p2d=function(T){return l(p(T))},t.r2p=t.d2p,t.p2r=p,t.cleanPos=function(T){return Array.isArray(T)||typeof T=="string"&&T!==""?T:_m(T)},t.setupMultiCategory=function(T){var L=t._traceIndices,x,C,S=t._matchGroup;if(S&&t._categories.length===0){for(var g in S)if(g!==n){var P=r[TL.id2name(g)];L=L.concat(P._traceIndices)}}var E=[[0,{}],[0,{}]],z=[];for(x=0;xP[1]&&(C[g?0:1]=x,S[1]=P[1]),S[0]>=S[1])if(L!==void 0){var E=P[0]+1;x!==void 0&&(E=Math.min(E,P[1])),C[g?0:1]=t.l2r(E)}else x!==void 0&&(C[g?1:0]=t.l2r(P[1]-1))}},t.cleanRange=function(T,L){t._cleanRange(T,L),t.limitRange(T)},t._cleanRange=function(T,L){L||(L={}),T||(T="range");var x=yc.nestedProperty(t,T).get(),C,S;if(t.type==="date"?S=yc.dfltRange(t.calendar):i==="y"?S=ML.DFLTRANGEY:t._name==="realaxis"?S=[0,1]:S=L.dfltRange||ML.DFLTRANGEX,S=S.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(S[0]=0),!x||x.length!==2){yc.nestedProperty(t,T).set(S);return}var g=x[0]===null,P=x[1]===null;for(t.type==="date"&&!t.autorange&&(x[0]=yc.cleanDate(x[0],Sg,t.calendar),x[1]=yc.cleanDate(x[1],Sg,t.calendar)),C=0;C<2;C++)if(t.type==="date"){if(!yc.isDateTime(x[C],t.calendar)){t[T]=S;break}if(t.r2l(x[0])===t.r2l(x[1])){var E=yc.constrain(t.r2l(x[0]),yc.MIN_MS+1e3,yc.MAX_MS-1e3);x[0]=t.l2r(E-1e3),x[1]=t.l2r(E+1e3);break}}else{if(!ym(x[C]))if(!(g||P)&&ym(x[1-C]))x[C]=x[1-C]*(C?10:.1);else{t[T]=S;break}if(x[C]<-xL?x[C]=-xL:x[C]>xL&&(x[C]=xL),x[0]===x[1]){var z=Math.max(1,Math.abs(x[0]*1e-6));x[0]-=z,x[1]+=z}}},t.setScale=function(T){var L=r._size;if(t.overlaying){var x=TL.getFromId({_fullLayout:r},t.overlaying);t.domain=x.domain}var C=T&&t._r?"_r":"range",S=t.calendar;t.cleanRange(C);var g=t.r2l(t[C][0],S),P=t.r2l(t[C][1],S),E=i==="y";if(E?(t._offset=L.t+(1-t.domain[1])*L.h,t._length=L.h*(t.domain[1]-t.domain[0]),t._m=t._length/(g-P),t._b=-t._m*P):(t._offset=L.l+t.domain[0]*L.w,t._length=L.w*(t.domain[1]-t.domain[0]),t._m=t._length/(P-g),t._b=-t._m*g),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var z,q;if(t._rangebreaks=t.locateBreaks(Math.min(g,P),Math.max(g,P)),t._rangebreaks.length){for(z=0;zP&&(V=!V),V&&t._rangebreaks.reverse();var G=V?-1:1;for(t._m2=G*t._length/(Math.abs(P-g)-t._lBreaks),t._B.push(-t._m2*(E?P:g)),z=0;zS&&(S+=7,gS&&(S+=24,g=C&&g=C&&T=re.min&&(_ere.max&&(re.max=Ee),Ce=!1)}Ce&&P.push({min:_e,max:Ee})}};for(x=0;x{"use strict";var ose=Eo(),nB=Pr(),Ast=fs().BADNUM,EL=nB.isArrayOrTypedArray,Sst=nB.isDateTime,Mst=nB.cleanNumber,sse=Math.round;use.exports=function(t,r,n){var i=t,a=n.noMultiCategory;if(EL(i)&&!i.length)return"-";if(!a&&Pst(i))return"multicategory";if(a&&Array.isArray(i[0])){for(var o=[],s=0;sa*2}function lse(e){return Math.max(1,(e-1)/1e3)}function Lst(e,t){for(var r=e.length,n=lse(r),i=0,a=0,o={},s=0;si*2}function Pst(e){return EL(e[0])&&EL(e[1])}});var Mg=ye((far,mse)=>{"use strict";var Ist=qa(),dse=Eo(),d_=Pr(),kL=fs().FP_SAFE,Rst=Oa(),Dst=So(),vse=df(),Fst=vse.getFromId,zst=vse.isLinked;mse.exports={applyAutorangeOptions:gse,getAutoRange:aB,makePadFn:oB,doAutoRange:Ost,findExtremes:Bst,concatExtremes:uB};function aB(e,t){var r,n,i=[],a=e._fullLayout,o=oB(a,t,0),s=oB(a,t,1),l=uB(e,t),u=l.min,c=l.max;if(u.length===0||c.length===0)return d_.simpleMap(t.range,t.r2l);var f=u[0].val,h=c[0].val;for(r=1;r0&&(P=M-o(x)-s(C),P>T?E/P>L&&(S=x,g=C,L=E/P):E/M>L&&(S={val:x.val,nopad:1},g={val:C.val,nopad:1},L=E/M));function z(j,N){return Math.max(j,s(N))}if(f===h){var q=f-1,V=f+1;if(p)if(f===0)i=[0,1];else{var G=(f>0?c:u).reduce(z,0),Z=f/(1-Math.min(.5,G/M));i=f>0?[0,Z]:[Z,0]}else k?i=[Math.max(0,q),Math.max(1,V)]:i=[q,V]}else p?(S.val>=0&&(S={val:0,nopad:1}),g.val<=0&&(g={val:0,nopad:1})):k&&(S.val-L*o(S)<0&&(S={val:0,nopad:1}),g.val<=0&&(g={val:1,nopad:1})),L=(g.val-S.val-cse(t,x.val,C.val))/(M-o(S)-s(g)),i=[S.val-L*o(S),g.val+L*s(g)];return i=gse(i,t),t.limitRange&&t.limitRange(),v&&i.reverse(),d_.simpleMap(i,t.l2r||Number)}function cse(e,t,r){var n=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),x=T((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=T(r.vpadplus||r.vpad),S=T(r.vpadminus||r.vpad);if(!u){if(k=1/0,M=-1/0,l)for(f=0;f0&&(k=h),h>M&&h-kL&&(k=h),h>M&&h=E;f--)P(f);return{min:n,max:i,opts:r}}function sB(e,t,r,n){pse(e,t,r,n,Nst)}function lB(e,t,r,n){pse(e,t,r,n,Ust)}function pse(e,t,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l=r&&(u.extrapad||!o)){s=!1;break}else i(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=a&&t===0;e.push({val:t,pad:c?0:r,extrapad:c?!1:o})}}function hse(e){return dse(e)&&Math.abs(e)=t}function Vst(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&CL(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&CL(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function Gst(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&CL(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&CL(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function CL(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t=l&&(a=l,r=l),o<=l&&(o=l,n=l)}}return r=Vst(r,t),n=Gst(n,t),[r,n]}});var ho=ye((dar,Nse)=>{"use strict";var w0=qa(),zh=Eo(),j3=Mc(),cM=Oa(),Wo=Pr(),W3=Wo.strTranslate,Ob=Zl(),Hst=qb(),fM=ka(),Xp=So(),jst=Rd(),yse=RO(),har=Rh(),$d=fs(),Wst=$d.ONEMAXYEAR,IL=$d.ONEAVGYEAR,RL=$d.ONEMINYEAR,Xst=$d.ONEMAXQUARTER,dB=$d.ONEAVGQUARTER,DL=$d.ONEMINQUARTER,Zst=$d.ONEMAXMONTH,X3=$d.ONEAVGMONTH,FL=$d.ONEMINMONTH,Zp=$d.ONEWEEK,qv=$d.ONEDAY,v_=qv/2,wm=$d.ONEHOUR,hM=$d.ONEMIN,zL=$d.ONESEC,Yst=$d.ONEMILLI,Kst=$d.ONEMICROSEC,Bb=$d.MINUS_SIGN,OL=$d.BADNUM,vB={K:"zeroline"},pB={K:"gridline",L:"path"},gB={K:"minor-gridline",L:"path"},Cse={K:"tick",L:"path"},_se={K:"tick",L:"text"},xse={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},BL=Dh(),uM=BL.MID_SHIFT,Nb=BL.CAP_SHIFT,dM=BL.LINE_SPACING,Jst=BL.OPPOSITE_SIDE,qL=3,$n=Nse.exports={};$n.setConvert=xm();var $st=H3(),Tm=df(),Qst=Tm.idSort,elt=Tm.isLinked;$n.id2name=Tm.id2name;$n.name2id=Tm.name2id;$n.cleanId=Tm.cleanId;$n.list=Tm.list;$n.listIds=Tm.listIds;$n.getFromId=Tm.getFromId;$n.getFromTrace=Tm.getFromTrace;var Lse=Mg();$n.getAutoRange=Lse.getAutoRange;$n.findExtremes=Lse.findExtremes;var tlt=1e-4;function xB(e){var t=(e[1]-e[0])*tlt;return[e[0]-t,e[1]+t]}$n.coerceRef=function(e,t,r,n,i,a){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+"axis"],l=n+"ref",u={};return i||(i=s[0]||(typeof a=="string"?a:a[0])),a||(a=i),s=s.concat(s.map(function(c){return c+" domain"})),u[l]={valType:"enumerated",values:s.concat(a?typeof a=="string"?[a]:a:[]),dflt:i},Wo.coerce(e,t,u,l)};$n.coerceRefArray=function(e,t,r,n,i,a,o){let s=n.charAt(n.length-1);var l=r._fullLayout._subplots[s+"axis"];let u=n+"ref";var c=e[u];i||(i=l[0]||(typeof a=="string"?a:a[0])),l=l.concat(l.map(h=>h+" domain")),l=l.concat(a||[]),c.length>o?(Wo.warn("Array attribute "+u+" has more entries than expected, truncating to "+o),c=c.slice(0,o)):c.length2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};$n.saveRangeInitial=function(e,t){for(var r=$n.list(e,"",!0),n=!1,i=0;if*.3||u(n)||u(i))){var h=r.dtick/2;e+=e+ho){var s=Number(r.slice(1));a.exactYears>o&&s%12===0?e=$n.tickIncrement(e,"M6","reverse")+qv*1.5:a.exactMonths>o?e=$n.tickIncrement(e,"M1","reverse")+qv*15.5:e-=v_;var l=$n.tickIncrement(e,r);if(l<=n)return l}return e}$n.prepMinorTicks=function(e,t,r){var f,h;if(!((f=t.minor)!=null&&f.dtick)){delete e.dtick;var n=t.dtick&&zh(t._tmin),i;if(n){var a=$n.tickIncrement(t._tmin,t.dtick,!0);i=[t._tmin,a*.99+t._tmin*.01]}else{var o=Wo.simpleMap(t.range,t.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(e.range=Wo.simpleMap(i,t.l2r),e._isMinor=!0,$n.prepTicks(e,r),n){var s=zh(t.dtick),l=zh(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?cB(u,c)?u===2*Zp&&c===2*qv&&(e.dtick=Zp):u===2*Zp&&c===3*qv?e.dtick=Zp:u===Zp&&!(t._input.minor||{}).nticks?e.dtick=qv:Tse(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)==="M"?l?e.dtick="M1":cB(u,c)?u>=12&&c===2&&(e.dtick="M3"):e.dtick=t.dtick:String(e.dtick).charAt(0)==="L"?String(t.dtick).charAt(0)==="L"?cB(u,c)||(e.dtick=Tse(u/c,2.5)?t.dtick/2:t.dtick):e.dtick="D1":e.dtick==="D2"&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}((h=t.minor)==null?void 0:h._tick0Init)===void 0&&(e.tick0=t.tick0)};function cB(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function Tse(e,t){return Math.abs(e/t-1)<.001}$n.prepTicks=function(e,t){var r=Wo.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode==="auto"||!e.dtick){var n=e.nticks,i;n||(e.type==="category"||e.type==="multicategory"?(i=e.tickfont?Wo.bigFont(e.tickfont.size||12):15,n=e._length/i):(i=e._id.charAt(0)==="y"?40:80,n=Wo.constrain(e._length/i,4,9)+1),e._name==="radialaxis"&&(n*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(n*=100),e._roughDTick=Math.abs(r[1]-r[0])/n,$n.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(a=n-1,o=n):(a=n,o=n);var s=e[a].value,l=e[o].value,u=Math.abs(l-s),c=r||u,f=0;c>=RL?u>=RL&&u<=Wst?f=u:f=IL:r===dB&&c>=DL?u>=DL&&u<=Xst?f=u:f=dB:c>=FL?u>=FL&&u<=Zst?f=u:f=X3:r===Zp&&c>=Zp?f=Zp:c>=qv?f=qv:r===v_&&c>=v_?f=v_:r===wm&&c>=wm&&(f=wm);var h;f>=u&&(f=u,h=!0);var d=i+f;if(t.rangebreaks&&f>0){for(var v=84,m=0,b=0;bZp&&(f=u)}(f>0||n===0)&&(e[n].periodX=i+f/2)}}$n.calcTicks=function(t,r){for(var n=t.type,i=t.calendar,a=t.ticklabelstep,o=t.ticklabelmode==="period",s=t.range[0]>t.range[1],l=!t.ticklabelindex||Wo.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],u=Wo.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]=(T?0:1);L--){var x=!L;L?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):T&&(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var C=L?t:Wo.extendFlat({},t,T?t.minor:{minor:{}});if(x?$n.prepMinorTicks(C,t,r):$n.prepTicks(C,r),C.tickmode==="array"){L?(b=[],v=Ase(t,!x)):(p=[],m=Ase(t,!x));continue}if(C.tickmode==="sync"){b=[],v=slt(t);continue}var S=xB(u),g=S[0],P=S[1],E=zh(C.dtick),z=n==="log"&&!(E||C.dtick.charAt(0)==="L"),q=$n.tickFirst(C,r);if(L){if(t._tmin=q,q=P:G<=P;G=$n.tickIncrement(G,N,c,i)){if(L&&Z++,C.rangebreaks&&!c){if(G=h)break}if(b.length>d||G===V)break;V=G;var H={value:G};L?(z&&G!==(G|0)&&(H.simpleLabel=!0),a>1&&Z%a&&(H.skipLabel=!0),b.push(H)):(H.minor=!0,p.push(H))}}if(!p||p.length<3)l=!1;else{var ie=(p[2].value-p[1].value)*(s?-1:1);Ilt(ie,t.tickformat)||(l=!1,p=p.slice(1))}if(!l)k=b;else{var ae=b.concat(p);o&&b.length&&(ae=ae.slice(1)),ae=ae.sort(function(Vt,rr){return Vt.value-rr.value}).filter(function(Vt,rr,tt){return rr===0||Vt.value!==tt[rr-1].value});var _e=ae.map(function(Vt,rr){return Vt.minor===void 0&&!Vt.skipLabel?rr:null}).filter(function(Vt){return Vt!==null});_e.forEach(function(Vt){l.map(function(rr){var tt=Vt+rr;tt>=0&&tt-1;Le--){if(b[Le].drop){b.splice(Le,1);continue}b[Le].value=hB(b[Le].value,t);var He=t.c2p(b[Le].value);(me?ce>He-Pe:ceh||jeh&&(tt.periodX=h),jei&&hIL)t/=IL,n=i(10),e.dtick="M"+12*bm(t,n,LL);else if(a>X3)t/=X3,e.dtick="M"+bm(t,1,Sse);else if(a>qv){if(e.dtick=bm(t,qv,e._hasDayOfWeekBreaks?[1,2,7,14]:llt),!r){var o=$n.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=Wo.dateTick0(e.calendar,2):e.tick0=Wo.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else a>wm?e.dtick=bm(t,wm,Sse):a>hM?e.dtick=bm(t,hM,Mse):a>zL?e.dtick=bm(t,zL,Mse):(n=i(10),e.dtick=bm(t,n,LL))}else if(e.type==="log"){e.tick0=0;var l=Wo.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(l[1]-l[0])<1){var u=1.5*Math.abs((l[1]-l[0])/t);t=Math.abs(Math.pow(10,l[1])-Math.pow(10,l[0]))/u,n=i(10),e.dtick="L"+bm(t,n,LL)}else e.dtick=t>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):AB(e)?(e.tick0=0,n=1,e.dtick=bm(t,n,ult)):(e.tick0=0,n=i(10),e.dtick=bm(t,n,LL));if(e.dtick===0&&(e.dtick=1),!zh(e.dtick)&&typeof e.dtick!="string"){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}};function Dse(e){var t=e.dtick;if(e._tickexponent=0,!zh(t)&&typeof t!="string"&&(t=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var r=e.r2l(e.tick0),n=e.l2r(r).replace(/(^-|i)/g,""),i=n.length;if(String(t).charAt(0)==="M")i>10||n.slice(5)!=="01-01"?e._tickround="d":e._tickround=+t.slice(1)%12===0?"y":"m";else if(t>=qv&&i<=10||t>=qv*15)e._tickround="d";else if(t>=hM&&i<=16||t>=wm)e._tickround="M";else if(t>=zL&&i<=19||t>=hM)e._tickround="S";else{var a=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(i,a)-20,e._tickround<0&&(e._tickround=4)}}else if(zh(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);zh(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(l)>u&&(Z3(e.exponentformat)&&e.exponentformat!=="SI extended"&&!bB(l)||Z3(e.exponentformat)&&e.exponentformat==="SI extended"&&!wB(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}$n.tickIncrement=function(e,t,r,n){var i=r?-1:1;if(zh(t))return Wo.increment(e,i*t);var a=t.charAt(0),o=i*Number(t.slice(1));if(a==="M")return Wo.incrementMonth(e,o,n);if(a==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(a==="D"){var s=t==="D2"?Rse:Ise,l=e+i*.01,u=Wo.roundUp(Wo.mod(l,1),s,r);return Math.floor(l)+Math.log(w0.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(t)};$n.tickFirst=function(e,t){var r=e.r2l||Number,n=Wo.simpleMap(e.range,r,void 0,void 0,t),i=n[1]=0&&p<=e._length?b:null};if(a&&Wo.isArrayOrTypedArray(e.ticktext)){var f=Wo.simpleMap(e.range,e.r2l),h=(Math.abs(f[1]-f[0])-(e._lBreaks||0))/1e4;for(u=0;u"+s;else{var u=pM(e),c=e._trueSide||e.side;(!u&&c==="top"||u&&c==="bottom")&&(o+="
")}t.text=o}function flt(e,t,r,n,i){var a=e.dtick,o=t.x,s=e.tickformat,l=typeof a=="string"&&a.charAt(0);if(i==="never"&&(i=""),n&&l!=="L"&&(a="L3",l="L"),s||l==="L")t.text=vM(Math.pow(10,o),e,i,n);else if(zh(a)||l==="D"&&(e.minorloglabels==="complete"||Wo.mod(o+.01,1)<.1)){var u;e.minorloglabels==="complete"&&!(Wo.mod(o+.01,1)<.1)&&(u=!0,t.fontSize*=.75);var c=Math.pow(10,o).toExponential(0),f=c.split("e"),h=+f[1],d=Math.abs(h),v=e.exponentformat;v==="power"||Z3(v)&&v!=="SI extended"&&bB(h)||Z3(v)&&v==="SI extended"&&wB(h)?(t.text=f[0],d>0&&(t.text+="x10"),t.text==="1x10"&&(t.text="10"),h!==0&&h!==1&&(t.text+=""+(h>0?"":Bb)+d+""),t.fontSize*=1.25):(v==="e"||v==="E")&&d>2?t.text=f[0]+v+(h>0?"+":Bb)+d:(t.text=vM(Math.pow(10,o),e,"","fakehover"),a==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(l==="D")t.text=e.minorloglabels==="none"?"":String(Math.round(Math.pow(10,Wo.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if(e.dtick==="D1"){var m=String(t.text).charAt(0);(m==="0"||m==="1")&&(e._id.charAt(0)==="y"?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(o<0?.5:.25)))}}function hlt(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function dlt(e,t,r){var n=Math.round(t.x),i=e._categories[n]||[],a=i[1]===void 0?"":String(i[1]),o=i[0]===void 0?"":String(i[0]);r?t.text=o+" - "+a:(t.text=a,t.text2=o)}function vlt(e,t,r,n,i){i==="never"?i="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide"),t.text=vM(t.x,e,i,n)}function plt(e,t,r,n,i){if(e.thetaunit==="radians"&&!r){var a=t.x/180;if(a===0)t.text="0";else{var o=glt(a);if(o[1]>=100)t.text=vM(Wo.deg2rad(t.x),e,i,n);else{var s=t.x<0;o[1]===1?o[0]===1?t.text="\u03C0":t.text=o[0]+"\u03C0":t.text=["",o[0],"","\u2044","",o[1],"","\u03C0"].join(""),s&&(t.text=Bb+t.text)}}}else t.text=vM(t.x,e,i,n)}function glt(e){function t(s,l){return Math.abs(s-l)<=1e-6}function r(s,l){return t(l,0)?s:r(l,s%l)}function n(s){for(var l=1;!t(Math.round(s*l)/l,s);)l*=10;return l}var i=n(e),a=e*i,o=Math.abs(r(a,i));return[Math.round(a/o),Math.round(i/o)]}var zse=["f","p","n","\u03BC","m","","k","M","G","T"],mlt=["q","r","y","z","a",...zse,"P","E","Z","Y","R","Q"],Z3=e=>["SI","SI extended","B"].includes(e);function bB(e){return e>14||e<-15}function wB(e){return e>32||e<-30}function ylt(e,t){return Z3(t)?!!(t==="SI extended"&&wB(e)||t!=="SI extended"&&bB(e)):!1}function vM(e,t,r,n){var i=e<0,a=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,l=$n.getTickFormat(t),u=t.separatethousands;if(n){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:zh(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};Dse(c),a=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,Bb);var f=Math.pow(10,-a)/2;if(o==="none"&&(s=0),e=Math.abs(e),e"+v+"":o==="B"&&s===9?e+="B":Z3(o)&&(e+=o==="SI extended"?mlt[s/3+10]:zse[s/3+5])}return i?Bb+e:e}$n.getTickFormat=function(e){var t;function r(l){return typeof l!="string"?l:Number(l.replace("M",""))*X3}function n(l,u){var c=["L","D"];if(typeof l==typeof u){if(typeof l=="number")return l-u;var f=c.indexOf(l.charAt(0)),h=c.indexOf(u.charAt(0));return f===h?Number(l.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):f-h}else return typeof l=="number"?1:-1}function i(l,u,c){var f=c||function(v){return v},h=u[0],d=u[1];return(!h&&typeof h!="number"||f(h)<=f(l))&&(!d&&typeof d!="number"||f(d)>=f(l))}function a(l,u){var c=u[0]===null,f=u[1]===null,h=n(l,u[0])>=0,d=n(l,u[1])<=0;return(c||h)&&(f||d)}var o,s;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(t=0;t=0&&i.unshift(i.splice(c,1).shift())}});var s={false:{left:0,right:0}};return Wo.syncOrAsync(i.map(function(l){return function(){if(l){var u=$n.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=$n.drawOne(e,u,r);return u._shiftPusher&&_B(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=Wo.simpleMap(u._r,u.r2l),c}}}))};$n.drawOne=function(e,t,r){r=r||{};var n=r.axShifts||{},i=r.overlayingShiftedAx||[],a,o,s;t.setScale();var l=e._fullLayout,u=t._id,c=u.charAt(0),f=$n.counterLetter(u),h=l._plots[t._mainSubplot],d=t.zerolinelayer==="above traces";if(!h)return;if(t._shiftPusher=t.autoshift||i.indexOf(t._id)!==-1||i.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var v=t.linewidth/2||0;t.ticks==="inside"&&(v+=t.ticklen),_B(t,v,n,!0),_B(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=Plt(t,n));var m=h[c+"axislayer"],b=t._mainLinePosition,p=b+=t._shift,k=t._mainMirrorPosition,M=t._vals=$n.calcTicks(t),T=[t.mirror,p,k].join("_");for(a=0;a0?tt.bottom-Vt:0,rr))));var rt=0,St=0;if(t._shiftPusher&&(rt=Math.max(rr,tt.height>0?ct==="l"?Vt-tt.left:tt.right-Vt:0),t.title.text!==l._dfltTitle[c]&&(St=(t._titleStandoff||0)+(t._titleScoot||0),ct==="l"&&(St+=kse(t))),t._fullDepth=Math.max(rt,St)),t.automargin){je={x:0,y:0,r:0,l:0,t:0,b:0};var Tt=[0,1],dt=typeof t._shift=="number"?t._shift:0;if(c==="x"){if(ct==="b"?je[ct]=t._depth:(je[ct]=t._depth=Math.max(tt.width>0?Vt-tt.top:0,rr),Tt.reverse()),tt.width>0){var Et=tt.right-(t._offset+t._length);Et>0&&(je.xr=1,je.r=Et);var pt=t._offset-tt.left;pt>0&&(je.xl=0,je.l=pt)}}else if(ct==="l"?(t._depth=Math.max(tt.height>0?Vt-tt.left:0,rr),je[ct]=t._depth-dt):(t._depth=Math.max(tt.height>0?tt.right-Vt:0,rr),je[ct]=t._depth+dt,Tt.reverse()),tt.height>0){var jt=tt.bottom-(t._offset+t._length);jt>0&&(je.yb=0,je.b=jt);var or=t._offset-tt.top;or>0&&(je.yt=1,je.t=or)}je[f]=t.anchor==="free"?t.position:t._anchorAxis.domain[Tt[0]],t.title.text!==l._dfltTitle[c]&&(je[ct]+=kse(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(Ue={x:0,y:0,r:0,l:0,t:0,b:0},Ue[ar]=t.linewidth,t.mirror&&t.mirror!==!0&&(Ue[ar]+=rr),t.mirror===!0||t.mirror==="ticks"?Ue[f]=t._anchorAxis.domain[Tt[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(Ue[f]=[t._counterDomainMin,t._counterDomainMax][Tt[1]]))}at&&(Ae=cM.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(Ese(je,t.automargin),Ese(Ue,t.automargin)),j3.autoMargin(e,TB(t),je),j3.autoMargin(e,Ose(t),Ue),j3.autoMargin(e,Bse(t),Ae)}),Wo.syncOrAsync(mt)}};function Ese(e,t){if(e){var r=Object.keys(xse).reduce(function(n,i){return t.indexOf(i)!==-1&&xse[i].forEach(function(a){n[a]=1}),n},{});Object.keys(e).forEach(function(n){r[n]||(n.length===1?e[n]=0:delete e[n])})}}function _lt(e,t){var r=[],n,i=function(a,o){var s=a.xbnd[o];s!==null&&r.push(Wo.extendFlat({},a,{x:s}))};if(t.length){for(n=0;ne.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,l=!s;if(r){var u=o?-1:1;r=r*u}if(n){var c=e.side,f=s&&(c==="top"||c==="left")||l&&(c==="bottom"||c==="right")?1:-1;n=n*f}return e._id.charAt(0)==="x"?function(h){return W3(i+e._offset+e.l2p(mB(h))+r,a+n)}:function(h){return W3(a+n,i+e._offset+e.l2p(mB(h))+r)}};function mB(e){return e.periodX!==void 0?e.periodX:e.x}function Tlt(e){var t=e.ticklabelposition||"",r=e.tickson||"",n=function(v){return t.indexOf(v)!==-1},i=n("top"),a=n("left"),o=n("right"),s=n("bottom"),l=n("inside"),u=r!=="boundaries"&&(s||a||i||o);if(!u&&!l)return[0,0];var c=e.side,f=u?(e.tickwidth||0)/2:0,h=qL,d=e.tickfont?e.tickfont.size:12;return(s||i)&&(f+=d*Nb,h+=(e.linewidth||0)/2),(a||o)&&(f+=(e.linewidth||0)/2,h+=qL),l&&c==="top"&&(h-=d*(1-Nb)),(a||i)&&(f=-f),(c==="bottom"||c==="right")&&(h=-h),[u?f:0,l?h:0]}$n.makeTickPath=function(e,t,r,n){n||(n={});var i=n.minor;if(i&&!e.minor)return"";var a=n.len!==void 0?n.len:i?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return o==="x"?"M0,"+(t+s*r)+"v"+a*r:"M"+(t+s*r)+",0h"+a*r};$n.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",i=e.tickson||"",a=function(q){return n.indexOf(q)!==-1},o=a("top"),s=a("left"),l=a("right"),u=a("bottom"),c=i!=="boundaries"&&(u||s||o||l),f=a("inside"),h=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&i!=="boundaries",d=0,v=0,m=h?e.ticklen:0;if(f?m*=-1:c&&(m=0),h&&(d+=m,r)){var b=Wo.deg2rad(r);d=m*Math.cos(b)+1,v=m*Math.sin(b)}e.showticklabels&&(h||e.showline)&&(d+=.2*e.tickfont.size),d+=(e.linewidth||1)/2*(f?-1:1);var p={labelStandoff:d,labelShift:v},k,M,T,L,x=0,C=e.side,S=e._id.charAt(0),g=e.tickangle,P;if(S==="x")P=!f&&C==="bottom"||f&&C==="top",L=P?1:-1,f&&(L*=-1),k=v*L,M=t+d*L,T=P?1:-.2,Math.abs(g)===90&&(f?T+=uM:g===-90&&C==="bottom"?T=Nb:g===90&&C==="top"?T=uM:T=.5,x=uM/2*(g/90)),p.xFn=function(q){return q.dx+k+x*q.fontSize},p.yFn=function(q){return q.dy+M+q.fontSize*T},p.anchorFn=function(q,V){if(c){if(s)return"end";if(l)return"start"}return!zh(V)||V===0||V===180?"middle":V*L<0!==f?"end":"start"},p.heightFn=function(q,V,G){return V<-60||V>60?-.5*G:e.side==="top"!==f?-G:0};else if(S==="y"){if(P=!f&&C==="left"||f&&C==="right",L=P?1:-1,f&&(L*=-1),k=d,M=v*L,T=0,!f&&Math.abs(g)===90&&(g===-90&&C==="left"||g===90&&C==="right"?T=Nb:T=.5),f){var E=zh(g)?+g:0;if(E!==0){var z=Wo.deg2rad(E);x=Math.abs(Math.sin(z))*Nb*L,T=0}}p.xFn=function(q){return q.dx+t-(k+q.fontSize*T)*L+x*q.fontSize},p.yFn=function(q){return q.dy+M+q.fontSize*uM},p.anchorFn=function(q,V){return zh(V)&&Math.abs(V)===90?"middle":P?"end":"start"},p.heightFn=function(q,V,G){return e.side==="right"&&(V*=-1),V<-30?-G:V<30?-.5*G:0}}return p};function NL(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}$n.drawTicks=function(e,t,r){r=r||{};var n=t._id+"tick",i=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(t.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),a=r.layer.selectAll("path."+n).data(i,NL);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return fM.stroke(w0.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return Xp.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),UL(t,[Cse]),a.attr("transform",r.transFn)};$n.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!=="sync"){var n=t._id+"grid",i=t.minor&&t.minor.showgrid,a=i?r.vals.filter(function(p){return p.minor}):[],o=t.showgrid?r.vals.filter(function(p){return!p.minor}):[],s=r.counterAxis;if(s&&$n.shouldShowZeroLine(e,t,s))for(var l=t.tickmode==="array",u=0;u=0;v--){var m=v?h:d;if(m){var b=m.selectAll("path."+n).data(v?o:a,NL);b.exit().remove(),b.enter().append("path").classed(n,1).classed("crisp",r.crisp!==!1),b.attr("transform",r.transFn).attr("d",r.path).each(function(p){return fM.stroke(w0.select(this),p.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(p){return Xp.dashStyle(p.minor?t.minor.griddash:t.griddash,p.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(p){return(p.minor?f:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&b.attr("d",r.path)}}UL(t,[pB,gB])}};$n.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=$n.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll("path."+n).data(i?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(o,s){return Qst(o.id,s.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(fM.stroke,t.zerolinecolor||fM.defaultLine).style("stroke-width",Xp.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),UL(t,[vB])};$n.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,i=t._id,a=t.zerolinelayer==="above traces",o=r.cls||i+"tick",s=r.vals.filter(function(H){return H.text}),l=r.labelFns,u=r.secondary?0:t.tickangle,c=(t._prevTickAngles||{})[o],f=r.layer.selectAll("g."+o).data(t.showticklabels?s:[],NL),h=[];f.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(H){var ie=w0.select(this),ae=e._promises.length;ie.call(Ob.positionText,l.xFn(H),l.yFn(H)).call(Xp.font,{family:H.font,size:H.fontSize,color:H.fontColor,weight:H.fontWeight,style:H.fontStyle,variant:H.fontVariant,textcase:H.fontTextcase,lineposition:H.fontLineposition,shadow:H.fontShadow}).text(H.text).call(Ob.convertToTspans,e),e._promises[ae]?h.push(e._promises.pop().then(function(){d(ie,u)})):d(ie,u)}),UL(t,[_se]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(H){w0.select(this).select("text").call(Ob.positionText,l.xFn(H),l.yFn(H))});function d(H,ie){H.each(function(ae){var _e=w0.select(this),Ee=_e.select(".text-math-group"),Ce=l.anchorFn(ae,ie),ge=r.transFn.call(_e.node(),ae)+(zh(ie)&&+ie!=0?" rotate("+ie+","+l.xFn(ae)+","+(l.yFn(ae)-ae.fontSize/2)+")":""),re=Ob.lineCount(_e),Se=dM*ae.fontSize,ke=l.heightFn(ae,zh(ie)?+ie:0,(re-1)*Se);if(ke&&(ge+=W3(0,ke)),Ee.empty()){var be=_e.select("text");be.attr({transform:ge,"text-anchor":Ce}),be.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var Be=Xp.bBox(Ee.node()).width,Le=Be*{end:-.5,start:.5}[Ce];Ee.attr("transform",ge+W3(Le,0))}})}t._adjustTickLabelsOverflow=function(){var H=t.ticklabeloverflow;if(!(!H||H==="allow")){var ie=H.indexOf("hide")!==-1,ae=t._id.charAt(0)==="x",_e=0,Ee=ae?e._fullLayout.width:e._fullLayout.height;if(H.indexOf("domain")!==-1){var Ce=Wo.simpleMap(t.range,t.r2l);_e=t.l2p(Ce[0])+t._offset,Ee=t.l2p(Ce[1])+t._offset}var ge=Math.min(_e,Ee),re=Math.max(_e,Ee),Se=t.side,ke=1/0,be=-1/0;f.each(function(Pe){var ce=w0.select(this),He=ce.select(".text-math-group");if(He.empty()){var lt=Xp.bBox(ce.node()),mt=0;ae?(lt.right>re||lt.leftre||lt.top+(t.tickangle?0:Pe.fontSize/4)t["_visibleLabelMin_"+Ce._id]?ce.style("display","none"):re.K==="tick"&&!ge&&ce.node().style.display!=="none"&&ce.style("display",null)})})})})},d(f,c+1?c:u);function v(){return h.length&&Promise.all(h)}var m=null;function b(){if(d(f,u),s.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){m=t.autotickangles[0];var H=0,ie=[],ae,_e=1;f.each(function(je){H=Math.max(H,je.fontSize);var Ue=t.l2p(je.x),Ae=yB(this),rt=Xp.bBox(Ae.node());_e=Math.max(_e,Ob.lineCount(Ae)),ie.push({top:0,bottom:10,height:10,left:Ue-rt.width/2,right:Ue+rt.width/2+2,width:rt.width+2})});var Ee=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,Ce=s.length,ge=Math.abs((s[Ce-1].x-s[0].x)*t._m)/(Ce-1),re=Ee?ge/2:ge,Se=Ee?t.ticklen:H*1.25*_e,ke=Math.sqrt(Math.pow(re,2)+Math.pow(Se,2)),be=re/ke,Be=t.autotickangles.map(function(je){return je*Math.PI/180}),Le=Be.find(function(je){return Math.abs(Math.cos(je))<=be});Le===void 0&&(Le=Be.reduce(function(je,Ue){return Math.abs(Math.cos(je))Z*G&&(z=G,g[S]=P[S]=q[S])}var j=Math.abs(z-E);j-L>0?(j-=L,L*=1+L/j):L=0,t._id.charAt(0)!=="y"&&(L=-L),g[C]=M.p2r(M.r2p(P[C])+x*L),M.autorange==="min"||M.autorange==="max reversed"?(g[0]=null,M._rangeInitial0=void 0,M._rangeInitial1=void 0):(M.autorange==="max"||M.autorange==="min reversed")&&(g[1]=null,M._rangeInitial0=void 0,M._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[M._name+".range"]=g}var N=Wo.syncOrAsync(p);return N&&N.then&&e._promises.push(N),N};function Alt(e,t,r){var n=t._id+"divider",i=r.vals,a=r.layer.selectAll("path."+n).data(i,NL);a.exit().remove(),a.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(fM.stroke,t.dividercolor).style("stroke-width",Xp.crispRound(e,t.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}$n.getPxPosition=function(e,t){var r=e._fullLayout._size,n=t._id.charAt(0),i=t.side,a;if(t.anchor!=="free"?a=t._anchorAxis:n==="x"?a={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:n==="y"&&(a={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),i==="top"||i==="left")return a._offset;if(i==="bottom"||i==="right")return a._offset+a._length};function kse(e){var t=e.title.font.size,r=(e.title.text.match(Ob.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(Nb+r*dM):r?t*(r+1)*dM:t}function Slt(e,t){var r=e._fullLayout,n=t._id,i=n.charAt(0),a=t.title.font.size,o,s=(t.title.text.match(Ob.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+a*Nb:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+a*(uM+s*dM));else{var l=pM(t);if(t.type==="multicategory")o=t._depth;else{var u=1.5*a;l&&(u=.5*a,t.ticks==="outside"&&(u+=t.ticklen)),o=10+u+(t.linewidth?t.linewidth-1:0)}l||(i==="x"?o+=t.side==="top"?a*(t.showticklabels?1:0):a*(t.showticklabels?1.5:.5):o+=t.side==="right"?a*(t.showticklabels?1:.5):a*(t.showticklabels?.5:0))}var c=$n.getPxPosition(e,t),f,h,d;i==="x"?(h=t._offset+t._length/2,d=t.side==="top"?c-o:c+o):(d=t._offset+t._length/2,h=t.side==="right"?c+o:c-o,f={rotate:"-90",offset:0});var v;if(t.type!=="multicategory"){var m=t._selections[t._id+"tick"];if(v={selection:m,side:t.side},m&&m.node()&&m.node().parentNode){var b=Xp.getTranslate(m.node().parentNode);v.offsetLeft=b.x,v.offsetTop=b.y}t.title.hasOwnProperty("standoff")&&(v.pad=0)}return t._titleStandoff=o,Hst.draw(e,n+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[i],avoid:v,transform:f,attributes:{x:h,y:d,"text-anchor":"middle"}})}$n.shouldShowZeroLine=function(e,t,r){var n=Wo.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===OL)&&(qse(t,0)||!Mlt(e,t,r,n)||Elt(e,t))};$n.clipEnds=function(e,t){return t.filter(function(r){return qse(e,r.x)})};function qse(e,t){var r=e.l2p(t);return r>1&&r1)for(i=1;i=i.min&&e=Kst:/%L/.test(t)?e>=Yst:/%[SX]/.test(t)?e>=zL:/%M/.test(t)?e>=hM:/%[HI]/.test(t)?e>=wm:/%p/.test(t)?e>=v_:/%[Aadejuwx]/.test(t)?e>=qv:/%[UVW]/.test(t)?e>=Zp:/%[Bbm]/.test(t)?e>=FL:/%[q]/.test(t)?e>=DL:/%[Yy]/.test(t)?e>=RL:!0}});var SB=ye((par,Use)=>{"use strict";Use.exports=function(t,r,n){var i,a;if(n){var o=r==="reversed"||r==="min reversed"||r==="max reversed";i=n[o?1:0],a=n[o?0:1]}var s=t("autorangeoptions.minallowed",a===null?i:void 0),l=t("autorangeoptions.maxallowed",i===null?a:void 0);s===void 0&&t("autorangeoptions.clipmin"),l===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var MB=ye((gar,Vse)=>{"use strict";var Rlt=SB();Vse.exports=function(t,r,n,i){var a=r._template||{},o=r.type||a.type||"-";n("minallowed"),n("maxallowed");var s=n("range");if(!s){var l;!i.noInsiderange&&o!=="log"&&(l=n("insiderange"),l&&(l[0]===null||l[1]===null)&&(r.insiderange=!1,l=void 0),l&&(s=n("range",l)))}var u=r.getAutorangeDflt(s,i),c=n("autorange",u),f;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(c==="reversed"||c===!0)||s[0]!==null&&(c==="min"||c==="max reversed")||s[1]!==null&&(c==="max"||c==="min reversed"))&&(s=void 0,delete r.range,r.autorange=!0,f=!0),f||(u=r.getAutorangeDflt(s,i),c=n("autorange",u)),c&&(Rlt(n,c,s),(o==="linear"||o==="-")&&n("rangemode")),r.cleanRange()}});var Hse=ye((mar,Gse)=>{var Dlt={left:0,top:0};Gse.exports=Flt;function Flt(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var n=e.clientX||0,i=e.clientY||0,a=zlt(t);return r[0]=n-a.left,r[1]=i-a.top,r}function zlt(e){return e===window||e===document||e===document.body?Dlt:e.getBoundingClientRect()}});var VL=ye((yar,jse)=>{"use strict";var qlt=lO();function Olt(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(r){e=!1}return e}jse.exports=qlt&&Olt()});var Xse=ye((_ar,Wse)=>{"use strict";Wse.exports=function(t,r,n,i,a){var o=(t-n)/(i-n),s=o+r/(i-n),l=(o+s)/2;return a==="left"||a==="bottom"?o:a==="center"||a==="middle"?l:a==="right"||a==="top"?s:o<2/3-l?o:s>4/3-l?s:l}});var Kse=ye((xar,Yse)=>{"use strict";var Zse=Pr(),Blt=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Yse.exports=function(t,r,n,i){return n==="left"?t=0:n==="center"?t=1:n==="right"?t=2:t=Zse.constrain(Math.floor(t*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=Zse.constrain(Math.floor(r*3),0,2),Blt[r][t]}});var $se=ye((bar,Jse)=>{"use strict";var Nlt=L3(),Ult=j6(),Vlt=jS().getGraphDiv,Glt=US(),EB=Jse.exports={};EB.wrapped=function(e,t,r){e=Vlt(e),e._fullLayout&&Ult.clear(e._fullLayout._uid+Glt.HOVERID),EB.raw(e,t,r)};EB.raw=function(t,r){var n=t._fullLayout,i=t._hoverdata;r||(r={}),!(r.target&&!t._dragged&&Nlt.triggerHandler(t,"plotly_beforehover",r)===!1)&&(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,r.target&&i&&t.emit("plotly_unhover",{event:r,points:i}))}});var yv=ye((war,rle)=>{"use strict";var Hlt=Hse(),kB=cO(),jlt=VL(),Wlt=Pr().removeElement,Xlt=Rh(),Ub=rle.exports={};Ub.align=Xse();Ub.getCursor=Kse();var ele=$se();Ub.unhover=ele.wrapped;Ub.unhoverRaw=ele.raw;Ub.init=function(t){var r=t.gd,n=1,i=r._context.doubleClickDelay,a=t.element,o,s,l,u,c,f,h,d;r._mouseDownTime||(r._mouseDownTime=0),a.style.pointerEvents="all",a.onmousedown=b,jlt?(a._ontouchstart&&a.removeEventListener("touchstart",a._ontouchstart),a._ontouchstart=b,a.addEventListener("touchstart",b,{passive:!1})):a.ontouchstart=b;function v(M,T,L){return Math.abs(M)i&&(n=Math.max(n-1,1)),r._dragged)t.doneFn&&t.doneFn();else{var T;f.target===h?T=f:(T={target:h,srcElement:h,toElement:h},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(L=>{var x=f[L];!T[L]&&typeof x!="function"&&(T[L]=x)})),t.clickFn&&t.clickFn(n,T),d||h.dispatchEvent(new MouseEvent("click",M))}r._dragging=!1,r._dragged=!1}};function tle(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}Ub.coverSlip=tle;function Qse(e){return Hlt(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Eg=ye((Tar,ile)=>{"use strict";ile.exports=function(t,r){(t.attr("class")||"").split(" ").forEach(function(n){n.indexOf("cursor-")===0&&t.classed(n,!1)}),r&&t.classed("cursor-"+r,!0)}});var ole=ye((Aar,ale)=>{"use strict";var CB=Eg(),gM="data-savedcursor",nle="!!";ale.exports=function(t,r){var n=t.attr(gM);if(r){if(!n){for(var i=(t.attr("class")||"").split(" "),a=0;a{"use strict";var LB=ec(),Zlt=Ih();sle.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:Zlt.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:LB({editType:"legend"}),grouptitlefont:LB({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},titleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},titledoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:LB({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var yM=ye(mM=>{"use strict";mM.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};mM.isVertical=function(t){return t.orientation!=="h"};mM.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1};mM.getId=function(t){return t._id||"legend"}});var RB=ye((Ear,lle)=>{"use strict";var GL=Oa(),Yp=Pr(),Ylt=vl(),Klt=Gl(),Jlt=PB(),$lt=b3(),IB=yM();function Qlt(e,t,r,n,i){var a=t[e]||{},o=Ylt.newContainer(r,e);function s(H,ie){return Yp.coerce(a,o,Jlt,H,ie)}var l=Yp.coerceFont(s,"font",r.font);s("bgcolor",r.paper_bgcolor),s("bordercolor");var u=s("visible");if(!u)return;var c,f=function(H,ie){var ae=c._input,_e=c;return Yp.coerce(ae,_e,Klt,H,ie)},h=r.font||{},d=Yp.coerceFont(s,"grouptitlefont",h,{overrideDflt:{size:Math.round(h.size*1.1)}}),v=0,m=!1,b="normal",p=(r.shapes||[]).filter(function(H){return H.showlegend});function k(H){return GL.traceIs(H,"pie-like")&&H._length!=null&&(Array.isArray(H.legend)||Array.isArray(H.showlegend))}n.filter(k).forEach(function(H){H.visible&&v++;for(var ie=0;ieH.legend.length)for(var _e=H.legend.length;_e(e==="legend"?1:0));if(x===!1&&(r[e]=void 0),!(x===!1&&!a.uirevision)&&(s("uirevision",r.uirevision),x!==!1)){s("borderwidth");var C=s("orientation"),S=s("yref"),g=s("xref"),P=C==="h",E=S==="paper",z=g==="paper",q,V,G,Z="left";P?(q=0,GL.getComponentMethod("rangeslider","isVisible")(t.xaxis)?E?(V=1.1,G="bottom"):(V=1,G="top"):E?(V=-.1,G="top"):(V=0,G="bottom")):(V=1,G="auto",z?q=1.02:(q=1,Z="right")),Yp.coerce(a,o,{x:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:q}},"x"),Yp.coerce(a,o,{y:{valType:"number",editType:"legend",min:E?-2:0,max:E?3:1,dflt:V}},"y"),s("traceorder",b),IB.isGrouped(r[e])&&s("tracegroupgap"),s("entrywidth"),s("entrywidthmode"),s("indentation"),s("itemsizing"),s("itemwidth"),s("itemclick"),s("itemdoubleclick"),s("groupclick"),s("xanchor",Z),s("yanchor",G),s("maxheight"),s("valign"),Yp.noneOrAll(a,o,["x","y"]);var j=s("title.text");if(j){s("title.side",P?"left":"top");var N=Yp.extendFlat({},l,{size:Yp.bigFont(l.size)});Yp.coerceFont(s,"title.font",N);let H=i>1;s("titleclick",H?"toggle":!1),s("titledoubleclick",H?"toggleothers":!1)}}}lle.exports=function(t,r,n){var i,a=n.slice(),o=r.shapes;if(o)for(i=0;i{"use strict";var p_=Oa(),DB=Pr(),eut=DB.pushUnique,tut=yM(),ule=!0;FB.handleItemClick=function(t,r,n,i){var a=r._fullLayout;if(r._dragged||r._editing)return;var o=t.data()[0][0];if(o.groupTitle&&o.noClick)return;var s=n.groupclick;i==="toggle"&&n.itemdoubleclick==="toggleothers"&&ule&&r.data&&r._context.showTips&&(DB.notifier(DB._(r,"Double-click on legend to isolate one trace"),"long",r),ule=!1);var l=s==="togglegroup",u=a.hiddenlabels?a.hiddenlabels.slice():[],c=r._fullData;let f=(a.shapes||[]).filter(at=>at.showlegend||at.legendgroup);var h=c.concat(f),d=o.trace;d._isShape&&(d=d._fullInput);var v=d.legendgroup,m,b,p,k,M,T,L={},x=[],C=[],S=[];function g(at,ct){var ar=x.indexOf(at),Vt=L.visible;return Vt||(Vt=L.visible=[]),x.indexOf(at)===-1&&(x.push(at),ar=x.length-1),Vt[ar]=ct,ar}var P=(a.shapes||[]).map(function(at){return at._input}),E=!1;function z(at,ct){P[at].visible=ct,E=!0}function q(at,ct){if(!(o.groupTitle&&!l)){var ar=at._fullInput||at,Vt=ar._isShape,rr=ar.index;rr===void 0&&(rr=ar._index);var tt=ar.visible===!1?!1:ct;Vt?z(rr,tt):g(rr,tt)}}var V=d.legend,G=d._fullInput,Z=G&&G._isShape;if(!Z&&p_.traceIs(d,"pie-like")){var j=o.label,N=u.indexOf(j);if(i==="toggle")N===-1?u.push(j):u.splice(N,1);else if(i==="toggleothers"){var H=N!==-1,ie=[];for(m=0;mp.showlegend||p.legendgroup),l=a.concat(s);function u(p){return(p.legend||"legend")===o}var c,f;if(n==="toggle")c=!l.some(function(k){return u(k)&&k.visible===!0}),f=!1;else{let p=l.some(function(k){return!u(k)&&k.visible===!0&&k.showlegend!==!1});c=!0,f=!p}let h={visible:[]},d=[],v=(i.shapes||[]).map(function(p){return p._input});for(var m=!1,b=0;b{"use strict";cle.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var dle=ye((Lar,hle)=>{"use strict";var{isArrayOrTypedArray:OB}=Yd(),fle=Oa(),BB=yM();hle.exports=function(t,r,n){var i=r._inHover,a=BB.isGrouped(r),o=BB.isReversed(r),s={},l=[],u=!1,c={},f=0,h=0,d,v;function m(ie,ae,_e){if(r.visible!==!1&&!(n&&ie!==r._id))if(ae===""||!BB.isGrouped(r)){var Ee="~~i"+f;l.push(Ee),s[Ee]=[_e],f++}else l.indexOf(ae)===-1?(l.push(ae),u=!0,s[ae]=[_e]):s[ae].push(_e)}for(d=0;dq&&(E=q)}g[d][0]._groupMinRank=E,g[d][0]._preGroupSort=d}var V=function(ie,ae){return ie[0]._groupMinRank-ae[0]._groupMinRank||ie[0]._preGroupSort-ae[0]._preGroupSort},G=function(ie,ae){var _e=OB(ie.trace.legendrank)?ie.trace.legendrank[ie.i]:ie.trace.legendrank,Ee=OB(ae.trace.legendrank)?ae.trace.legendrank[ae.i]:ae.trace.legendrank;return _e-Ee||ie._preSort-ae._preSort};for(g.forEach(function(ie,ae){ie[0]._preGroupSort=ae}),g.sort(V),d=0;d{"use strict";var HL=Pr();function vle(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}Vb.formatPiePercent=function(t,r){var n=vle((t*100).toPrecision(3));return HL.numSeparate(n,r)+"%"};Vb.formatPieValue=function(t,r){var n=vle(t.toPrecision(10));return HL.numSeparate(n,r)};Vb.getFirstFilled=function(t,r){if(HL.isArrayOrTypedArray(t))for(var n=0;n{"use strict";var rut=So(),iut=ka();ple.exports=function(t,r,n,i){var a=n.marker.pattern;a&&a.shape?rut.pointStyle(t,n,i,r):iut.fill(t,r.color)}});var Y3=ye((Rar,_le)=>{"use strict";var mle=ka(),yle=g_().castOption,nut=gle();_le.exports=function(t,r,n,i){var a=n.marker.line,o=yle(a.color,r.pts)||mle.defaultLine,s=yle(a.width,r.pts)||0;t.call(nut,r,n,i).style("stroke-width",s).call(mle.stroke,o)}});var GB=ye((Dar,Sle)=>{"use strict";var Ov=qa(),NB=Oa(),_v=Pr(),xle=_v.strTranslate,Kp=So(),T0=ka(),UB=pv().extractOpts,jL=Ru(),aut=Y3(),out=g_().castOption,sut=qB(),ble=12,wle=5,Gb=2,lut=10,K3=5;Sle.exports=function(t,r,n){var i=r._fullLayout;n||(n=i.legend);var a=n.itemsizing==="constant",o=n.itemwidth,s=(o+sut.itemGap*2)/2,l=xle(s,0),u=function(C,S,g,P){var E;if(C+1)E=C;else if(S&&S.width>0)E=S.width;else return 0;return a?P:Math.min(E,g)};t.each(function(C){var S=Ov.select(this),g=_v.ensureSingle(S,"g","layers");g.style("opacity",C[0].trace.opacity);var P=n.indentation,E=n.valign,z=C[0].lineHeight,q=C[0].height;if(E==="middle"&&P===0||!z||!q)g.attr("transform",null);else{var V={top:1,bottom:-1}[E],G=V*(.5*(z-q+3))||0,Z=n.indentation;g.attr("transform",xle(Z,G))}var j=g.selectAll("g.legendfill").data([C]);j.enter().append("g").classed("legendfill",!0);var N=g.selectAll("g.legendlines").data([C]);N.enter().append("g").classed("legendlines",!0);var H=g.selectAll("g.legendsymbols").data([C]);H.enter().append("g").classed("legendsymbols",!0),H.selectAll("g.legendpoints").data([C]).enter().append("g").classed("legendpoints",!0)}).each(x).each(h).each(v).each(d).each(b).each(T).each(M).each(c).each(f).each(p).each(k);function c(C){var S=Tle(C),g=S.showFill,P=S.showLine,E=S.showGradientLine,z=S.showGradientFill,q=S.anyFill,V=S.anyLine,G=C[0],Z=G.trace,j,N,H=UB(Z),ie=H.colorscale,ae=H.reversescale,_e=function(be){if(be.size())if(g)Kp.fillGroupStyle(be,r,!0);else{var Be="legendfill-"+Z.uid;Kp.gradient(be,r,Be,VB(ae),ie,"fill")}},Ee=function(be){if(be.size()){var Be="legendline-"+Z.uid;Kp.lineGroupStyle(be),Kp.gradient(be,r,Be,VB(ae),ie,"stroke")}},Ce=jL.hasMarkers(Z)||!q?"M5,0":V?"M5,-2":"M5,-3",ge=Ov.select(this),re=ge.select(".legendfill").selectAll("path").data(g||z?[C]:[]);if(re.enter().append("path").classed("js-fill",!0),re.exit().remove(),re.attr("d",Ce+"h"+o+"v6h-"+o+"z").call(_e),P||E){var Se=u(void 0,Z.line,lut,wle);N=_v.minExtend(Z,{line:{width:Se}}),j=[_v.minExtend(G,{trace:N})]}var ke=ge.select(".legendlines").selectAll("path").data(P||E?[j]:[]);ke.enter().append("path").classed("js-line",!0),ke.exit().remove(),ke.attr("d",Ce+(E?"l"+o+",0.0001":"h"+o)).call(P?Kp.lineGroupStyle:Ee)}function f(C){var S=Tle(C),g=S.anyFill,P=S.anyLine,E=S.showLine,z=S.showMarker,q=C[0],V=q.trace,G=!z&&!P&&!g&&jL.hasText(V),Z,j;function N(re,Se,ke,be){var Be=_v.nestedProperty(V,re).get(),Le=_v.isArrayOrTypedArray(Be)&&Se?Se(Be):Be;if(a&&Le&&be!==void 0&&(Le=be),ke){if(Leke[1])return ke[1]}return Le}function H(re){return q._distinct&&q.index&&re[q.index]?re[q.index]:re[0]}if(z||G||E){var ie={},ae={};if(z){ie.mc=N("marker.color",H),ie.mx=N("marker.symbol",H),ie.mo=N("marker.opacity",_v.mean,[.2,1]),ie.mlc=N("marker.line.color",H),ie.mlw=N("marker.line.width",_v.mean,[0,5],Gb),ie.mld=V._isShape?"solid":N("marker.line.dash",H),ae.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var _e=N("marker.size",_v.mean,[2,16],ble);ie.ms=_e,ae.marker.size=_e}E&&(ae.line={width:N("line.width",H,[0,10],wle)}),G&&(ie.tx="Aa",ie.tp=N("textposition",H),ie.ts=10,ie.tc=N("textfont.color",H),ie.tf=N("textfont.family",H),ie.tw=N("textfont.weight",H),ie.ty=N("textfont.style",H),ie.tv=N("textfont.variant",H),ie.tC=N("textfont.textcase",H),ie.tE=N("textfont.lineposition",H),ie.tS=N("textfont.shadow",H)),Z=[_v.minExtend(q,ie)],j=_v.minExtend(V,ae),j.selectedpoints=null,j.texttemplate=null}var Ee=Ov.select(this).select("g.legendpoints"),Ce=Ee.selectAll("path.scatterpts").data(z?Z:[]);Ce.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",l),Ce.exit().remove(),Ce.call(Kp.pointStyle,j,r),z&&(Z[0].mrc=3);var ge=Ee.selectAll("g.pointtext").data(G?Z:[]);ge.enter().append("g").classed("pointtext",!0).append("text").attr("transform",l),ge.exit().remove(),ge.selectAll("text").call(Kp.textPointStyle,j,r)}function h(C){var S=C[0].trace,g=S.type==="waterfall";if(C[0]._distinct&&g){var P=C[0].trace[C[0].dir].marker;return C[0].mc=P.color,C[0].mlw=P.line.width,C[0].mlc=P.line.color,m(C,this,"waterfall")}var E=[];S.visible&&g&&(E=C[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 z=Ov.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(E);z.enter().append("path").classed("legendwaterfall",!0).attr("transform",l).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(q){var V=Ov.select(this),G=S[q[0]].marker,Z=u(void 0,G.line,K3,Gb);V.attr("d",q[1]).style("stroke-width",Z+"px").call(T0.fill,G.color),Z&&V.call(T0.stroke,G.line.color)})}function d(C){m(C,this)}function v(C){m(C,this,"funnel")}function m(C,S,g){var P=C[0].trace,E=P.marker||{},z=E.line||{},q=E.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",V=g?P.visible&&P.type===g:NB.traceIs(P,"bar"),G=Ov.select(S).select("g.legendpoints").selectAll("path.legend"+g).data(V?[C]:[]);G.enter().append("path").classed("legend"+g,!0).attr("d",q).attr("transform",l),G.exit().remove(),G.each(function(Z){var j=Ov.select(this),N=Z[0],H=u(N.mlw,E.line,K3,Gb);j.style("stroke-width",H+"px");var ie=N.mcc;if(!n._inHover&&"mc"in N){var ae=UB(E),_e=ae.mid;_e===void 0&&(_e=(ae.max+ae.min)/2),ie=Kp.tryColorscale(E,"")(_e)}var Ee=ie||N.mc||E.color,Ce=E.pattern,ge=Kp.getPatternAttr,re=Ce&&(ge(Ce.shape,0,"")||ge(Ce.path,0,""));if(re){var Se=ge(Ce.bgcolor,0,null),ke=ge(Ce.fgcolor,0,null),be=Ce.fgopacity,Be=Ale(Ce.size,8,10),Le=Ale(Ce.solidity,.5,1),me="legend-"+P.uid;j.call(Kp.pattern,"legend",r,me,re,Be,Le,ie,Ce.fillmode,Se,ke,be)}else j.call(T0.fill,Ee);H&&T0.stroke(j,N.mlc||z.color)})}function b(C){var S=C[0].trace,g=Ov.select(this).select("g.legendpoints").selectAll("path.legendbox").data(S.visible&&NB.traceIs(S,"box-violin")?[C]:[]);g.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),g.exit().remove(),g.each(function(){var P=Ov.select(this);if((S.boxpoints==="all"||S.points==="all")&&T0.opacity(S.fillcolor)===0&&T0.opacity((S.line||{}).color)===0){var E=_v.minExtend(S,{marker:{size:a?ble:_v.constrain(S.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});g.call(Kp.pointStyle,E,r)}else{var z=u(void 0,S.line,K3,Gb);P.style("stroke-width",z+"px").call(T0.fill,S.fillcolor),z&&T0.stroke(P,S.line.color)}})}function p(C){var S=C[0].trace,g=Ov.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(S.visible&&S.type==="candlestick"?[C,C]:[]);g.enter().append("path").classed("legendcandle",!0).attr("d",function(P,E){return E?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",l).style("stroke-miterlimit",1),g.exit().remove(),g.each(function(P,E){var z=Ov.select(this),q=S[E?"increasing":"decreasing"],V=u(void 0,q.line,K3,Gb);z.style("stroke-width",V+"px").call(T0.fill,q.fillcolor),V&&T0.stroke(z,q.line.color)})}function k(C){var S=C[0].trace,g=Ov.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(S.visible&&S.type==="ohlc"?[C,C]:[]);g.enter().append("path").classed("legendohlc",!0).attr("d",function(P,E){return E?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",l).style("stroke-miterlimit",1),g.exit().remove(),g.each(function(P,E){var z=Ov.select(this),q=S[E?"increasing":"decreasing"],V=u(void 0,q.line,K3,Gb);z.style("fill","none").call(Kp.dashLine,q.line.dash,V),V&&T0.stroke(z,q.line.color)})}function M(C){L(C,this,"pie")}function T(C){L(C,this,"funnelarea")}function L(C,S,g){var P=C[0],E=P.trace,z=g?E.visible&&E.type===g:NB.traceIs(E,g),q=Ov.select(S).select("g.legendpoints").selectAll("path.legend"+g).data(z?[C]:[]);if(q.enter().append("path").classed("legend"+g,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),q.exit().remove(),q.size()){var V=E.marker||{},G=u(out(V.line.width,P.pts),V.line,K3,Gb),Z="pieLike",j=_v.minExtend(E,{marker:{line:{width:G}}},Z),N=_v.minExtend(P,{trace:j},Z);aut(q,N,j,r)}}function x(C){var S=C[0].trace,g,P=[];if(S.visible)switch(S.type){case"histogram2d":case"heatmap":P=[["M-15,-2V4H15V-2Z"]],g=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":P=[["M-6,-6V6H6V-6Z"]],g=!0;break;case"densitymapbox":case"densitymap":P=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],g="radial";break;case"cone":P=[["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"]],g=!1;break;case"streamtube":P=[["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"]],g=!1;break;case"surface":P=[["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"]],g=!0;break;case"mesh3d":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],g=!1;break;case"volume":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],g=!0;break;case"isosurface":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],g=!1;break}var E=Ov.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(P);E.enter().append("path").classed("legend3dandfriends",!0).attr("transform",l).style("stroke-miterlimit",1),E.exit().remove(),E.each(function(z,q){var V=Ov.select(this),G=UB(S),Z=G.colorscale,j=G.reversescale,N=function(_e){if(_e.size()){var Ee="legendfill-"+S.uid;Kp.gradient(_e,r,Ee,VB(j,g==="radial"),Z,"fill")}},H;if(Z){if(!g){var ae=Z.length;H=q===0?Z[j?ae-1:0][1]:q===1?Z[j?0:ae-1][1]:Z[Math.floor((ae-1)/2)][1]}}else{var ie=S.vertexcolor||S.facecolor||S.color;H=_v.isArrayOrTypedArray(ie)?ie[q]||ie[0]:ie}V.attr("d",z[0]),H?V.call(T0.fill,H):V.call(N)})}};function VB(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function Tle(e){var t=e[0].trace,r=t.contours,n=jL.hasLines(t),i=jL.hasMarkers(t),a=t.visible&&t.fill&&t.fill!=="none",o=!1,s=!1;if(r){var l=r.coloring;l==="lines"?o=!0:n=l==="none"||l==="heatmap"||r.showlines,r.type==="constraint"?a=r._operation!=="=":(l==="fill"||l==="heatmap")&&(s=!0)}return{showMarker:i,showLine:n,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:a||s}}function Ale(e,t,r){return e&&_v.isArrayOrTypedArray(e)?t:e>r?r:e}});var XB=ye((Far,Dle)=>{"use strict";var np=qa(),vh=Pr(),jB=Mc(),Hb=Oa(),ZL=L3(),HB=yv(),ph=So(),_M=ka(),jb=Zl(),Mle=zB().handleItemClick,Ele=zB().handleTitleClick,qh=qB(),WB=Dh(),Ile=WB.LINE_SPACING,$3=WB.FROM_TL,kle=WB.FROM_BR,Cle=dle(),uut=GB(),Q3=yM(),J3=1,cut=/^legend[0-9]*$/;Dle.exports=function(t,r){if(r)Lle(t,r);else{var n=t._fullLayout,i=n._legends,a=n._infolayer.selectAll('[class^="legend"]');a.each(function(){var u=np.select(this),c=u.attr("class"),f=c.split(" ")[0];f.match(cut)&&i.indexOf(f)===-1&&u.remove()});for(var o=0;o1)}var v=n.hiddenlabels||[];if(!s&&(!n.showlegend||!l.length))return o.selectAll("."+i).remove(),n._topdefs.select("#"+a).remove(),jB.autoMargin(e,i);var m=vh.ensureSingle(o,"g",i,function(S){s||S.attr("pointer-events","all")}),b=vh.ensureSingleById(n._topdefs,"clipPath",a,function(S){S.append("rect")}),p=vh.ensureSingle(m,"rect","bg",function(S){S.attr("shape-rendering","crispEdges")});p.call(_M.stroke,r.bordercolor).call(_M.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var k=vh.ensureSingle(m,"g","scrollbox"),M=r.title;r._titleWidth=0,r._titleHeight=0;var T;M.text?(T=vh.ensureSingle(k,"text",i+"titletext"),T.attr("text-anchor","start").call(ph.font,M.font).text(M.text),XL(T,k,e,r,J3),!s&&(r.titleclick||r.titledoubleclick)&&vut(k,e,r,i)):(k.selectAll("."+i+"titletext").remove(),k.selectAll("."+i+"titletoggle").remove());var L=vh.ensureSingle(m,"rect","scrollbar",function(S){S.attr(qh.scrollBarEnterAttrs).call(_M.fill,qh.scrollBarColor)}),x=k.selectAll("g.groups").data(l);x.enter().append("g").attr("class","groups"),x.exit().remove();var C=x.selectAll("g.traces").data(vh.identity);C.enter().append("g").attr("class","traces"),C.exit().remove(),C.style("opacity",function(S){let g=S[0],P=g.trace;if(g.groupTitle){let E=P.legendgroup,z=(n.shapes||[]).filter(function(V){return V.showlegend});return e._fullData.concat(z).some(function(V){return V.legendgroup===E&&(V.legend||"legend")===i&&V.visible===!0})?1:.5}return Hb.traceIs(P,"pie-like")?v.indexOf(S[0].label)!==-1?.5:1:P.visible==="legendonly"?.5:1}).each(function(){np.select(this).call(hut,e,r)}).call(uut,e,r).each(function(S){s||S[0].groupTitle&&r.groupclick==="toggleitem"||np.select(this).call(dut,e,i)}),vh.syncOrAsync([jB.previousPromises,function(){return mut(e,x,C,r,k)},function(){var S=n._size,g=r.borderwidth,P=r.xref==="paper",E=r.yref==="paper";if(M.text){let He=(n.shapes||[]).filter(function(mt){return mt.showlegend}),lt=e._fullData.concat(He).some(function(mt){let Ht=mt.legend||"legend";var at=Array.isArray(Ht)?Ht.includes(i):Ht===i;return at&&mt.visible===!0});T.style("opacity",lt?1:.5)}if(!s){var z,q;P?z=S.l+S.w*r.x-$3[YL(r)]*r._width:z=n.width*r.x-$3[YL(r)]*r._width,E?q=S.t+S.h*(1-r.y)-$3[KL(r)]*r._effHeight:q=n.height*(1-r.y)-$3[KL(r)]*r._effHeight;var V=yut(e,i,z,q);if(V)return;if(n.margin.autoexpand){var G=z,Z=q;z=P?vh.constrain(z,0,n.width-r._width):G,q=E?vh.constrain(q,0,n.height-r._effHeight):Z,z!==G&&vh.log("Constrain "+i+".x to make legend fit inside graph"),q!==Z&&vh.log("Constrain "+i+".y to make legend fit inside graph")}ph.setTranslate(m,z,q)}if(L.on(".drag",null),m.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var j=r._effHeight;s&&(j=r._height),p.attr({width:r._width-g,height:j-g,x:g/2,y:g/2}),ph.setTranslate(k,0,0),b.select("rect").attr({width:r._width-2*g,height:j-2*g,x:g,y:g}),ph.setClipUrl(k,a,e),ph.setRect(L,0,0,0,0),delete r._scrollY}else{var N=Math.max(qh.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),H=r._effHeight-N-2*qh.scrollBarMargin,ie=r._height-r._effHeight,ae=H/ie,_e=Math.min(r._scrollY||0,ie);p.attr({width:r._width-2*g+qh.scrollBarWidth+qh.scrollBarMargin,height:r._effHeight-g,x:g/2,y:g/2}),b.select("rect").attr({width:r._width-2*g+qh.scrollBarWidth+qh.scrollBarMargin,height:r._effHeight-2*g,x:g,y:g+_e}),ph.setClipUrl(k,a,e),Be(_e,N,ae),m.on("wheel",function(){_e=vh.constrain(r._scrollY+np.event.deltaY/ie*H,0,ie),Be(_e,N,ae),_e!==0&&_e!==ie&&np.event.preventDefault()});var Ee,Ce,ge,re=function(He,lt,mt){var Ht=(mt-lt)/ae+He;return vh.constrain(Ht,0,ie)},Se=function(He,lt,mt){var Ht=(lt-mt)/ae+He;return vh.constrain(Ht,0,ie)},ke=np.behavior.drag().on("dragstart",function(){var He=np.event.sourceEvent;He.type==="touchstart"?Ee=He.changedTouches[0].clientY:Ee=He.clientY,ge=_e}).on("drag",function(){var He=np.event.sourceEvent;He.buttons===2||He.ctrlKey||(He.type==="touchmove"?Ce=He.changedTouches[0].clientY:Ce=He.clientY,_e=re(ge,Ee,Ce),Be(_e,N,ae))});L.call(ke);var be=np.behavior.drag().on("dragstart",function(){var He=np.event.sourceEvent;He.type==="touchstart"&&(Ee=He.changedTouches[0].clientY,ge=_e)}).on("drag",function(){var He=np.event.sourceEvent;He.type==="touchmove"&&(Ce=He.changedTouches[0].clientY,_e=Se(ge,Ee,Ce),Be(_e,N,ae))});k.call(be)}function Be(He,lt,mt){r._scrollY=e._fullLayout[i]._scrollY=He,ph.setTranslate(k,0,-He),ph.setRect(L,r._width,qh.scrollBarMargin+He*mt,qh.scrollBarWidth,lt),b.select("rect").attr("y",g+He)}if(e._context.edits.legendPosition){var Le,me,Pe,ce;m.classed("cursor-move",!0),HB.init({element:m.node(),gd:e,prepFn:function(He){if(He.target!==L.node()){var lt=ph.getTranslate(m);Pe=lt.x,ce=lt.y}},moveFn:function(He,lt){if(Pe!==void 0&&ce!==void 0){var mt=Pe+He,Ht=ce+lt;ph.setTranslate(m,mt,Ht),Le=HB.align(mt,r._width,S.l,S.l+S.w,r.xanchor),me=HB.align(Ht+r._height,-r._height,S.t+S.h,S.t,r.yanchor)}},doneFn:function(){if(Le!==void 0&&me!==void 0){var He={};He[i+".x"]=Le,He[i+".y"]=me,Hb.call("_guiRelayout",e,He)}},clickFn:function(He,lt){var mt=o.selectAll("g.traces").filter(function(){var Ht=this.getBoundingClientRect();return lt.clientX>=Ht.left&<.clientX<=Ht.right&<.clientY>=Ht.top&<.clientY<=Ht.bottom});mt.size()>0&&Rle(e,r,mt,He,lt)}})}}],e)}}function WL(e,t,r){var n=e[0],i=n.width,a=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return a==="fraction"?t._maxWidth*o:r+(o||i)}function Rle(e,t,r,n,i){var a=e._fullLayout,o=r.data()[0][0].trace,s=t.itemclick,l=t.itemdoubleclick,u={event:i,node:r.node(),curveNumber:o.index,expandedIndex:o.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:a};o._group&&(u.group=o._group),Hb.traceIs(o,"pie-like")&&(u.label=r.datum()[0].label);var c=ZL.triggerHandler(e,"plotly_legendclick",u);if(n===1){if(c===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&s&&Mle(r,e,t,s)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var f=ZL.triggerHandler(e,"plotly_legenddoubleclick",u);f!==!1&&c!==!1&&l&&Mle(r,e,t,l)}}function hut(e,t,r){var n=Q3.getId(r),i=e.data()[0][0],a=i.trace,o=Hb.traceIs(a,"pie-like"),s=!r._inHover&&t._context.edits.legendText&&!o,l=r._maxNameLength,u,c;i.groupTitle?(u=i.groupTitle.text,c=i.groupTitle.font):(c=r.font,r.entries?u=i.text:(u=o?i.label:a.name,a._meta&&(u=vh.templateString(u,a._meta))));var f=vh.ensureSingle(e,"text",n+"text");f.attr("text-anchor","start").call(ph.font,c).text(s?Ple(u,l):u);var h=r.indentation+r.itemwidth+qh.itemGap*2;jb.positionText(f,h,0),s?f.call(jb.makeEditable,{gd:t,text:u}).call(XL,e,t,r).on("edit",function(d){this.text(Ple(d,l)).call(XL,e,t,r);var v=i.trace._fullInput||{},m={};return m.name=d,v._isShape?Hb.call("_guiRelayout",t,"shapes["+a.index+"].name",m.name):Hb.call("_guiRestyle",t,m,a.index)}):XL(f,e,t,r)}function Ple(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var n=r-e.length;n>0;n--)e+=" ";return e}function dut(e,t,r){var n=t._context.doubleClickDelay,i,a=1,o=vh.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(_M.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(o.on("mousedown",function(){i=new Date().getTime(),i-t._legendMouseDownTimen&&(a=Math.max(a-1,1)),Rle(t,s,e,a,np.event)}}))}function vut(e,t,r,n){if(t._fullData.some(function(u){let c=u.legend||"legend";return(Array.isArray(c)?c.includes(n):c===n)&&Hb.traceIs(u,"pie-like")}))return;let a=t._context.doubleClickDelay;var o,s=1;let l=vh.ensureSingle(e,"rect",n+"titletoggle",function(u){t._context.staticPlot||u.style("cursor","pointer").attr("pointer-events","all"),u.call(_M.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){o=new Date().getTime(),o-t._legendMouseDownTimea&&(s=Math.max(s-1,1));let u={event:np.event,legendId:n,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(s===1&&r.titleclick){if(ZL.triggerHandler(t,"plotly_legendtitleclick",u)===!1)return;r._titleClickTimeout=setTimeout(function(){t._fullLayout&&Ele(t,r,r.titleclick)},a)}else s===2&&(r._titleClickTimeout&&clearTimeout(r._titleClickTimeout),t._legendMouseDownTime=0,ZL.triggerHandler(t,"plotly_legendtitledoubleclick",u)!==!1&&r.titledoubleclick&&Ele(t,r,r.titledoubleclick))}))}function XL(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),jb.convertToTspans(e,r,function(){put(t,r,n,i)})}function put(e,t,r,n){var i=e.data()[0][0],a=i&&i.trace.showlegend;if(Array.isArray(a)&&(a=a[i.i]!==!1),!r._inHover&&i&&!a){e.remove();return}var o=e.select("g[class*=math-group]"),s=o.node(),l=Q3.getId(r);r||(r=t._fullLayout[l]);var u=r.borderwidth,c;n===J3?c=r.title.font:i.groupTitle?c=i.groupTitle.font:c=r.font;var f=c.size*Ile,h,d;if(s){var v=ph.bBox(s);h=v.height,d=v.width,n===J3?ph.setTranslate(o,u,u+h*.75):ph.setTranslate(o,0,h*.25)}else{var m="."+l+(n===J3?"title":"")+"text",b=e.select(m),p=jb.lineCount(b),k=b.node();if(h=f*p,d=k?ph.bBox(k).width:0,n===J3)r.title.side==="left"&&(d+=qh.itemGap*2),jb.positionText(b,u+qh.titlePad,u+f);else{var M=qh.itemGap*2+r.indentation+r.itemwidth;i.groupTitle&&(M=qh.itemGap,d-=r.indentation+r.itemwidth),jb.positionText(b,M,-f*((p-1)/2-.3))}}n===J3?(r._titleWidth=d,r._titleHeight=h):(i.lineHeight=f,i.height=Math.max(h,16)+3,i.width=d)}function gut(e){var t=0,r=0,n=e.title.side;return n&&(n.indexOf("left")!==-1&&(t=e._titleWidth),n.indexOf("top")!==-1&&(r=e._titleHeight)),[t,r]}function mut(e,t,r,n,i){var a=e._fullLayout,o=Q3.getId(n);n||(n=a[o]);var s=a._size,l=Q3.isVertical(n),u=Q3.isGrouped(n),c=n.entrywidthmode==="fraction",f=n.borderwidth,h=2*f,d=qh.itemGap,v=n.indentation+n.itemwidth+d*2,m=2*(f+d),b=KL(n),p=n.y<0||n.y===0&&b==="top",k=n.y>1||n.y===1&&b==="bottom",M=n.tracegroupgap,T={};let{orientation:L,yref:x}=n,{maxheight:C}=n,S=p||k||L!=="v"||x!=="paper";C||(C=S?.5:1);let g=S?a.height:s.h;n._maxHeight=Math.max(C>1?C:C*g,30);var P=0;n._width=0,n._height=0;var E=gut(n);if(l)r.each(function(He){var lt=He[0].height;ph.setTranslate(this,f+E[0],f+E[1]+n._height+lt/2+d),n._height+=lt,n._width=Math.max(n._width,He[0].width)}),P=v+n._width,n._width+=d+v+h,n._height+=m,u&&(t.each(function(He,lt){ph.setTranslate(this,0,lt*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var z=YL(n),q=n.x<0||n.x===0&&z==="right",V=n.x>1||n.x===1&&z==="left",G=k||p,Z=a.width/2;n._maxWidth=Math.max(q?G&&z==="left"?s.l+s.w:Z:V?G&&z==="right"?s.r+s.w:Z:s.w,2*v);var j=0,N=0;r.each(function(He){var lt=WL(He,n,v);j=Math.max(j,lt),N+=lt}),P=null;var H=0;if(u){var ie=0,ae=0,_e=0;t.each(function(){var He=0,lt=0;np.select(this).selectAll("g.traces").each(function(Ht){var at=WL(Ht,n,v),ct=Ht[0].height;ph.setTranslate(this,E[0],E[1]+f+d+ct/2+lt),lt+=ct,He=Math.max(He,at),T[Ht[0].trace.legendgroup]=He});var mt=He+d;ae>0&&mt+f+ae>n._maxWidth?(H=Math.max(H,ae),ae=0,_e+=ie+M,ie=lt):ie=Math.max(ie,lt),ph.setTranslate(this,ae,_e),ae+=mt}),n._width=Math.max(H,ae)+f,n._height=_e+ie+m}else{var Ee=r.size(),Ce=N+h+(Ee-1)*d=n._maxWidth&&(H=Math.max(H,ke),re=0,Se+=ge,n._height+=ge,ge=0),ph.setTranslate(this,E[0]+f+re,E[1]+f+Se+lt/2+d),ke=re+mt+d,re+=Ht,ge=Math.max(ge,lt)}),Ce?(n._width=re+h,n._height=ge+m):(n._width=Math.max(H,ke)+h,n._height+=ge+m)}}n._width=Math.ceil(Math.max(n._width+E[0],n._titleWidth+2*(f+qh.titlePad))),n._height=Math.ceil(Math.max(n._height+E[1],n._titleHeight+2*(f+qh.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var be=e._context.edits,Be=be.legendText||be.legendPosition;r.each(function(He){var lt=np.select(this).select("."+o+"toggle"),mt=He[0].height,Ht=He[0].trace.legendgroup,at=WL(He,n,v);u&&Ht!==""&&(at=T[Ht]);var ct=Be?v:P||at;!l&&!c&&(ct+=d/2),ph.setRect(lt,0,-mt/2,ct,mt)});var Le=i.select("."+o+"titletext");Le.node()&&fut(Le,n,f);var me=i.select("."+o+"titletoggle");if(me.size()&&Le.node()){var Pe=Le.attr("x")||0,ce=qh.titlePad;ph.setRect(me,Pe-ce,f,n._titleWidth+2*ce,n._titleHeight+2*ce)}}function yut(e,t,r,n){var i=e._fullLayout,a=i[t],o=YL(a),s=KL(a),l=a.xref==="paper",u=a.yref==="paper";e._fullLayout._reservedMargin[t]={};var c=a.y<.5?"b":"t",f=a.x<.5?"l":"r",h={r:i.width-r,l:r+a._width,b:i.height-n,t:n+a._effHeight};if(l&&u)return jB.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*$3[o],r:a._width*kle[o],b:a._effHeight*kle[s],t:a._effHeight*$3[s]});l?e._fullLayout._reservedMargin[t][c]=h[c]:u||a.orientation==="v"?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][c]=h[c]}function YL(e){return vh.isRightAnchor(e)?"right":vh.isCenterAnchor(e)?"center":"left"}function KL(e){return vh.isBottomAnchor(e)?"bottom":vh.isMiddleAnchor(e)?"middle":"top"}});var JB=ye(KB=>{"use strict";var Wb=qa(),Iy=Eo(),Fle=fd(),zf=Pr(),_ut=zf.pushUnique,ZB=zf.strTranslate,xut=zf.strRotate,but=L3(),A0=Zl(),wut=ole(),Am=So(),vd=ka(),JL=yv(),Sm=ho(),Tut=Rh().zindexSeparator,tT=Oa(),kg=ip(),Xb=US(),Aut=RB(),Sut=XB(),Gle=Xb.YANGLE,YB=Math.PI*Gle/180,Mut=1/Math.sin(YB),Eut=Math.cos(YB),kut=Math.sin(YB),Qc=Xb.HOVERARROWSIZE,sl=Xb.HOVERTEXTPAD,zle={box:!0,ohlc:!0,violin:!0,candlestick:!0},Cut={scatter:!0,scattergl:!0,splom:!0};function qle(e,t){return e.distance-t.distance}KB.hover=function(t,r,n,i){t=zf.getGraphDiv(t);var a=r.target;zf.throttle(t._fullLayout._uid+Xb.HOVERID,Xb.HOVERMINTIME,function(){Lut(t,r,n,i,a)})};KB.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var i=r.gd,a=Zle(i),o=Yle(i),s=t.map(function(b){var p=b._x0||b.x0||b.x||0,k=b._x1||b.x1||b.x||0,M=b._y0||b.y0||b.y||0,T=b._y1||b.y1||b.y||0,L=b.eventData;if(L){var x=Math.min(p,k),C=Math.max(p,k),S=Math.min(M,T),g=Math.max(M,T),P=b.trace;if(tT.traceIs(P,"gl3d")){var E=i._fullLayout[P.scene]._scene.container,z=E.offsetLeft,q=E.offsetTop;x+=z,C+=z,S+=q,g+=q}L.bbox={x0:x+o,x1:C+o,y0:S+a,y1:g+a},L.xPixel=(p+k)/2,L.yPixel=(M+T)/2,r.inOut_bbox&&r.inOut_bbox.push(L.bbox)}else L=!1;return{color:b.color||vd.defaultLine,x0:b.x0||b.x||0,x1:b.x1||b.x||0,y0:b.y0||b.y||0,y1:b.y1||b.y||0,xLabel:b.xLabel,yLabel:b.yLabel,zLabel:b.zLabel,text:b.text,name:b.name,idealAlign:b.idealAlign,borderColor:b.borderColor,fontFamily:b.fontFamily,fontSize:b.fontSize,fontColor:b.fontColor,fontWeight:b.fontWeight,fontStyle:b.fontStyle,fontVariant:b.fontVariant,nameLength:b.nameLength,textAlign:b.textAlign,trace:b.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:b.hovertemplate||!1,hovertemplateLabels:b.hovertemplateLabels||!1,eventData:L}}),l=!1,u=jle(s,{gd:i,hovermode:"closest",rotateLabels:l,bgColor:r.bgColor||vd.background,container:Wb.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels,f=5,h=0,d=0;c.sort(function(b,p){return b.y0-p.y0}).each(function(b,p){var k=b.y0-b.by/2;k-fC[0]._length||ce<0||ce>S[0]._length)return JL.unhoverRaw(e,t)}if(t.pointerX=Pe+C[0]._offset,t.pointerY=ce+S[0]._offset,"xval"in t?Z=kg.flat(a,t.xval):Z=kg.p2c(C,Pe),"yval"in t?j=kg.flat(a,t.yval):j=kg.p2c(S,ce),!Iy(Z[0])||!Iy(j[0]))return zf.warn("Fx.hover failed",t,e),JL.unhoverRaw(e,t)}s.clickanywhere&&(e._hoverXVals=Z,e._hoverYVals=j,e._hoverXAxes=C,e._hoverYAxes=S);var mt=1/0;function Ht(Vi,Kn){for(H=0;Hke&&(V.splice(0,ke),mt=V[0].distance),f&&q!==0&&V.length===0){Se.distance=q,Se.index=!1;var ir=ae._module.hoverPoints(Se,ge,re,"closest",{hoverLayer:s._hoverlayer});if(ir&&(ir=ir.filter(function(Zi){return Zi.spikeDistance<=q})),ir&&ir.length){var wr,Xr=ir.filter(function(Zi){return Zi.xa.showspikes&&Zi.xa.spikesnap!=="hovered data"});if(Xr.length){var ti=Xr[0];Iy(ti.x0)&&Iy(ti.y0)&&(wr=ct(ti),(!be.vLinePoint||be.vLinePoint.spikeDistance>wr.spikeDistance)&&(be.vLinePoint=wr))}var $r=ir.filter(function(Zi){return Zi.ya.showspikes&&Zi.ya.spikesnap!=="hovered data"});if($r.length){var Ri=$r[0];Iy(Ri.x0)&&Iy(Ri.y0)&&(wr=ct(Ri),(!be.hLinePoint||be.hLinePoint.spikeDistance>wr.spikeDistance)&&(be.hLinePoint=wr))}}}}}Ht();function at(Vi,Kn,Jn){for(var Gt=null,wt=1/0,tr,ir=0;irVi.trace.index===pt.trace.index):V=[pt];var jt=V.length,or=Vle("x",pt,s),mr=Vle("y",pt,s);Ht(or,mr);var Ar=[],ei={},qr=0,jr=function(Vi){var Kn=zle[Vi.trace.type]?Hle(Vi):Vi.trace.index;if(!ei[Kn])qr++,ei[Kn]=qr,Ar.push(Vi);else{var Jn=ei[Kn]-1,Gt=Ar[Jn];Jn>0&&Math.abs(Vi.distance)jt-1;gt--)jr(V[gt]);V=Ar,tt()}var Ge=e._hoverdata,Je=[],We=Zle(e),et=Yle(e);for(let Vi of V){var xt=kg.makeEventData(Vi,Vi.trace,Vi.cd);if(Vi.hovertemplate!==!1){var At=!1;Vi.cd[Vi.index]&&Vi.cd[Vi.index].ht&&(At=Vi.cd[Vi.index].ht),Vi.hovertemplate=At||Vi.trace.hovertemplate||!1}if(Vi.xa&&Vi.ya){var Kt=Vi.x0+Vi.xa._offset,Qt=Vi.x1+Vi.xa._offset,Mr=Vi.y0+Vi.ya._offset,Gr=Vi.y1+Vi.ya._offset,Ir=Math.min(Kt,Qt),Yr=Math.max(Kt,Qt),_i=Math.min(Mr,Gr),Pi=Math.max(Mr,Gr);xt.bbox={x0:Ir+et,x1:Yr+et,y0:_i+We,y1:Pi+We},xt.xPixel=(Kt+Qt)/2,xt.yPixel=(Mr+Gr)/2}Vi.eventData=[xt],Je.push(xt)}e._hoverdata=Je;var ai=h==="y"&&(G.length>1||V.length>1)||h==="closest"&&Be&&V.length>1,mi=vd.combine(s.plot_bgcolor||vd.background,s.paper_bgcolor),un=jle(V,{gd:e,hovermode:h,rotateLabels:ai,bgColor:mi,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),Fn=un.hoverLabels;if(kg.isUnifiedHover(h)||(Iut(Fn,ai,s,un.commonLabelBoundingBox),Xle(Fn,ai,s._invScaleX,s._invScaleY)),i&&i.tagName){var An=tT.getComponentMethod("annotations","hasClickToShow")(e,Je);wut(Wb.select(i),An?"pointer":"")}var Hn=Fut(e,t,Ge);if(!i||n||!Hn&&!s.hoveranywhere)return;Ge&&Hn&&e.emit("plotly_unhover",{event:t,points:Ge}),Qn(e._hoverdata);function Qn(Vi){e.emit("plotly_hover",{event:t,points:Vi,xaxes:C,yaxes:S,xvals:Z,yvals:j})}}function Hle(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}var Put=/([\s\S]*)<\/extra>/;function jle(e,t){var r=t.gd,n=r._fullLayout,i=t.hovermode,a=t.rotateLabels,o=t.bgColor,s=t.container,l=t.outerContainer,u=t.commonLabelOpts||{};if(e.length===0)return[[]];var c=t.fontFamily||Xb.HOVERFONT,f=t.fontSize||Xb.HOVERFONTSIZE,h=t.fontWeight||n.font.weight,d=t.fontStyle||n.font.style,v=t.fontVariant||n.font.variant,m=t.fontTextcase||n.font.textcase,b=t.fontLineposition||n.font.lineposition,p=t.fontShadow||n.font.shadow,k=e[0],M=k.xa,T=k.ya,L=i.charAt(0),x=L+"Label",C=k[x];if(C===void 0&&M.type==="multicategory")for(var S=0;Sn.width-Je&&(We=n.width-Je),Et.attr("d","M"+(jr-We)+",0L"+(jr-We+Qc)+","+Ge+Qc+"H"+Je+"v"+Ge+(sl*2+qr.height)+"H"+-Je+"V"+Ge+Qc+"H"+(jr-We-Qc)+"Z"),jr=We,H.minX=jr-Je,H.maxX=jr+Je,M.side==="top"?(H.minY=gt-(sl*2+qr.height),H.maxY=gt-sl):(H.minY=gt+sl,H.maxY=gt+(sl*2+qr.height))}else{var et,xt,At;T.side==="right"?(et="start",xt=1,At="",jr=M._offset+M._length):(et="end",xt=-1,At="-",jr=M._offset),gt=T._offset+(k.y0+k.y1)/2,pt.attr("text-anchor",et),Et.attr("d","M0,0L"+At+Qc+","+Qc+"V"+(sl+qr.height/2)+"h"+At+(sl*2+qr.width)+"V-"+(sl+qr.height/2)+"H"+At+Qc+"V-"+Qc+"Z"),H.minY=gt-(sl+qr.height/2),H.maxY=gt+(sl+qr.height/2),T.side==="right"?(H.minX=jr+Qc,H.maxX=jr+Qc+(sl*2+qr.width)):(H.minX=jr-Qc-(sl*2+qr.width),H.maxX=jr-Qc);var Kt=qr.height/2,Qt=P-qr.top-Kt,Mr="clip"+n._uid+"commonlabel"+T._id,Gr;if(jrEt.hoverinfo!=="none");if(dt.length===0)return[];var ie=n.hoverlabel,ae=ie.font,_e=dt[0],Ee=((i==="x unified"?_e.xa:_e.ya).unifiedhovertitle||{}).text,Ce=Ee?zf.hovertemplateString({data:i==="x unified"?[{xa:_e.xa,x:_e.xVal}]:[{ya:_e.ya,y:_e.yVal}],fallback:_e.trace.hovertemplatefallback,locale:n._d3locale,template:Ee}):C,ge={showlegend:!0,legend:{title:{text:Ce,font:ae},font:ae,bgcolor:ie.bgcolor,bordercolor:ie.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:n.legend?n.legend.traceorder:void 0,orientation:"v"}},re={font:ae};Aut(ge,re,r._fullData);var Se=re.legend;Se.entries=[];for(var ke=0;ke=0?rt=tt:je+lt=0?rt=je:Ue+lt=0?St=Vt:rr+mt=0?St=rr:Ae+mt=0,(dt.idealAlign==="top"||!_i)&&Pi?(At-=Qt/2,dt.anchor="end"):_i?(At+=Qt/2,dt.anchor="start"):dt.anchor="middle",dt.crossPos=At;else{if(dt.pos=At,_i=xt+Kt/2+Yr<=E,Pi=xt-Kt/2-Yr>=0,(dt.idealAlign==="left"||!_i)&&Pi)xt-=Kt/2,dt.anchor="end";else if(_i)xt+=Kt/2,dt.anchor="start";else{dt.anchor="middle";var ai=Yr/2,mi=xt+ai-E,un=xt-ai;mi>0&&(xt-=mi),un<0&&(xt+=-un)}dt.crossPos=xt}gt.attr("text-anchor",dt.anchor),Je&&Ge.attr("text-anchor",dt.anchor),Et.attr("transform",ZB(xt,At)+(a?xut(Gle):""))}),{hoverLabels:Tt,commonLabelBoundingBox:H}}function Ole(e,t,r,n,i,a){var f,h;var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=zf.templateString(e.name,e.trace._meta)),o=Ule(e.name,e.nameLength));var l=r.charAt(0),u=l==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(s+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(s+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[l+"Label"]===i?s=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(s=e.yLabel):e.yLabel===void 0?s=e.xLabel:s="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(s+=(s?"
":"")+e.text),e.extraText!==void 0&&(s+=(s?"
":"")+e.extraText),a&&s===""&&!e.hovertemplate&&(o===""&&a.remove(),s=o),(h=(f=e.trace)==null?void 0:f.hoverlabel)!=null&&h.split&&(e.hovertemplate="");let{hovertemplate:c=!1}=e;if(c){let d=e.hovertemplateLabels||e;e[l+"Label"]!==i&&(d[l+"other"]=d[l+"Val"],d[l+"otherLabel"]=d[l+"Label"]),s=zf.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:d,locale:n._d3locale,template:c}),s=s.replace(Put,(v,m)=>(o=Ule(m,e.nameLength),""))}return[s,o]}function Iut(e,t,r,n){var i=t?"xa":"ya",a=t?"ya":"xa",o=0,s=1,l=e.size(),u=new Array(l),c=0,f=n.minX,h=n.maxX,d=n.minY,v=n.maxY,m=function(Z){return Z*r._invScaleX},b=function(Z){return Z*r._invScaleY};e.each(function(Z){var j=Z[i],N=Z[a],H=j._id.charAt(0)==="x",ie=j.range;c===0&&ie&&ie[0]>ie[1]!==H&&(s=-1);var ae=0,_e=H?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var Ee=Wle(Z,t),Ce=Z.anchor,ge=Ce==="end"?-1:1,re,Se;if(Ce==="middle")re=Z.crossPos+(H?b(Ee.y-Z.by/2):m(Z.bx/2+Z.tx2width/2)),Se=re+(H?b(Z.by):m(Z.bx));else if(H)re=Z.crossPos+b(Qc+Ee.y)-b(Z.by/2-Qc),Se=re+b(Z.by);else{var ke=m(ge*Qc+Ee.x),be=ke+m(ge*Z.bx);re=Z.crossPos+Math.min(ke,be),Se=Z.crossPos+Math.max(ke,be)}H?d!==void 0&&v!==void 0&&Math.min(Se,v)-Math.max(re,d)>1&&(N.side==="left"?(ae=N._mainLinePosition,_e=r.width):_e=N._mainLinePosition):f!==void 0&&h!==void 0&&Math.min(Se,h)-Math.max(re,f)>1&&(N.side==="top"?(ae=N._mainLinePosition,_e=r.height):_e=N._mainLinePosition)}u[c++]=[{datum:Z,traceIndex:Z.trace.index,dp:0,pos:Z.pos,posref:Z.posref,size:Z.by*(H?Mut:1)/2,pmin:ae,pmax:_e}]}),u.sort(function(Z,j){return Z[0].posref-j[0].posref||s*(j[0].traceIndex-Z[0].traceIndex)});var p,k,M,T,L,x,C;function S(Z){var j=Z[0],N=Z[Z.length-1];if(k=j.pmin-j.pos-j.dp+j.size,M=N.pos+N.dp+N.size-j.pmax,k>.01){for(L=Z.length-1;L>=0;L--)Z[L].dp+=k;p=!1}if(!(M<.01)){if(k<-.01){for(L=Z.length-1;L>=0;L--)Z[L].dp-=M;p=!1}if(p){var H=0;for(T=0;Tj.pmax&&H++;for(T=Z.length-1;T>=0&&!(H<=0);T--)x=Z[T],x.pos>j.pmax-1&&(x.del=!0,H--);for(T=0;T=0;L--)Z[L].dp-=M;for(T=Z.length-1;T>=0&&!(H<=0);T--)x=Z[T],x.pos+x.dp+x.size>j.pmax&&(x.del=!0,H--)}}}for(;!p&&o<=l;){for(o++,p=!0,T=0;T.01){for(L=P.length-1;L>=0;L--)P[L].dp+=k;for(g.push.apply(g,P),u.splice(T+1,1),C=0,L=g.length-1;L>=0;L--)C+=g[L].dp;for(M=C/g.length,L=g.length-1;L>=0;L--)g[L].dp-=M;p=!1}else T++}u.forEach(S)}for(T=u.length-1;T>=0;T--){var q=u[T];for(L=q.length-1;L>=0;L--){var V=q[L],G=V.datum;G.offset=V.dp,G.del=V.del}}}function Wle(e,t){var r=0,n=e.offset;return t&&(n*=-kut,r=e.offset*Eut),{x:r,y:n}}function Rut(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(Qc+sl),n=r+t*(e.txwidth+sl),i=e.anchor==="middle";return i&&(r-=e.tx2width/2,n+=e.txwidth/2+sl),{alignShift:t,textShiftX:r,text2ShiftX:n}}function Xle(e,t,r,n){var i=function(o){return o*r},a=function(o){return o*n};e.each(function(o){var s=Wb.select(this);if(o.del)return s.remove();var l=s.select("text.nums"),u=o.anchor,c=u==="end"?-1:1,f=Rut(o),h=Wle(o,t),d=h.x,v=h.y,m=u==="middle",b="hoverlabel"in o.trace?o.trace.hoverlabel.showarrow:!0,p;m?p="M-"+i(o.bx/2+o.tx2width/2)+","+a(v-o.by/2)+"h"+i(o.bx)+"v"+a(o.by)+"h-"+i(o.bx)+"Z":b?p="M0,0L"+i(c*Qc+d)+","+a(Qc+v)+"v"+a(o.by/2-Qc)+"h"+i(c*o.bx)+"v-"+a(o.by)+"H"+i(c*Qc+d)+"V"+a(v-Qc)+"Z":p="M"+i(c*Qc+d)+","+a(v-o.by/2)+"h"+i(c*o.bx)+"v"+a(o.by)+"h"+i(-c*o.bx)+"Z",s.select("path").attr("d",p);var k=d+f.textShiftX,M=v+o.ty0-o.by/2+sl,T=o.textAlign||"auto";T!=="auto"&&(T==="left"&&u!=="start"?(l.attr("text-anchor","start"),k=m?-o.bx/2-o.tx2width/2+sl:-o.bx-sl):T==="right"&&u!=="end"&&(l.attr("text-anchor","end"),k=m?o.bx/2-o.tx2width/2-sl:o.bx+sl)),l.call(A0.positionText,i(k),a(M)),o.tx2width&&(s.select("text.name").call(A0.positionText,i(f.text2ShiftX+f.alignShift*sl+d),a(v+o.ty0-o.by/2+sl)),s.select("rect").call(Am.setRect,i(f.text2ShiftX+(f.alignShift-1)*o.tx2width/2+d),a(v-o.by/2-1),i(o.tx2width),a(o.by+2)))})}function Dut(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],a=e.cd[r]||{};function o(h){return h||Iy(h)&&h===0}var s=Array.isArray(r)?function(h,d){var v=zf.castOption(i,r,h);return o(v)?v:zf.extractOption({},n,"",d)}:function(h,d){return zf.extractOption(a,n,h,d)};function l(h,d,v){var m=s(d,v);o(m)&&(e[h]=m)}if(l("hoverinfo","hi","hoverinfo"),l("bgcolor","hbg","hoverlabel.bgcolor"),l("borderColor","hbc","hoverlabel.bordercolor"),l("fontFamily","htf","hoverlabel.font.family"),l("fontSize","hts","hoverlabel.font.size"),l("fontColor","htc","hoverlabel.font.color"),l("fontWeight","htw","hoverlabel.font.weight"),l("fontStyle","hty","hoverlabel.font.style"),l("fontVariant","htv","hoverlabel.font.variant"),l("nameLength","hnl","hoverlabel.namelength"),l("textAlign","hta","hoverlabel.align"),e.posref=t==="y"||t==="closest"&&n.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=zf.constrain(e.x0,0,e.xa._length),e.x1=zf.constrain(e.x1,0,e.xa._length),e.y0=zf.constrain(e.y0,0,e.ya._length),e.y1=zf.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Sm.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:Sm.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type==="log"&&e.xerr<=0)){var u=Sm.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+Sm.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,t==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var c=Sm.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+c+" / -"+Sm.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+c,t==="y"&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&f!=="all"&&(f=Array.isArray(f)?f:f.split("+"),f.indexOf("x")===-1&&(e.xLabel=void 0),f.indexOf("y")===-1&&(e.yLabel=void 0),f.indexOf("z")===-1&&(e.zLabel=void 0),f.indexOf("text")===-1&&(e.text=void 0),f.indexOf("name")===-1&&(e.name=void 0)),e}function Ble(e,t,r){var n=r.container,i=r.fullLayout,a=i._size,o=r.event,s=!!t.hLinePoint,l=!!t.vLinePoint,u,c;if(n.selectAll(".spikeline").remove(),!!(l||s)){var f=vd.combine(i.plot_bgcolor,i.paper_bgcolor);if(s){var h=t.hLinePoint,d,v;u=h&&h.xa,c=h&&h.ya;var m=c.spikesnap;m==="cursor"?(d=o.pointerX,v=o.pointerY):(d=u._offset+h.x,v=c._offset+h.y);var b=Fle.readability(h.color,f)<1.5?vd.contrast(f):h.color,p=c.spikemode,k=c.spikethickness,M=c.spikecolor||b,T=Sm.getPxPosition(e,c),L,x;if(p.indexOf("toaxis")!==-1||p.indexOf("across")!==-1){if(p.indexOf("toaxis")!==-1&&(L=T,x=d),p.indexOf("across")!==-1){var C=c._counterDomainMin,S=c._counterDomainMax;c.anchor==="free"&&(C=Math.min(C,c.position),S=Math.max(S,c.position)),L=a.l+C*a.w,x=a.l+S*a.w}n.insert("line",":first-child").attr({x1:L,x2:x,y1:v,y2:v,"stroke-width":k,stroke:M,"stroke-dasharray":Am.dashStyle(c.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:L,x2:x,y1:v,y2:v,"stroke-width":k+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}p.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:T+(c.side!=="right"?k:-k),cy:v,r:k,fill:M}).classed("spikeline",!0)}if(l){var g=t.vLinePoint,P,E;u=g&&g.xa,c=g&&g.ya;var z=u.spikesnap;z==="cursor"?(P=o.pointerX,E=o.pointerY):(P=u._offset+g.x,E=c._offset+g.y);var q=Fle.readability(g.color,f)<1.5?vd.contrast(f):g.color,V=u.spikemode,G=u.spikethickness,Z=u.spikecolor||q,j=Sm.getPxPosition(e,u),N,H;if(V.indexOf("toaxis")!==-1||V.indexOf("across")!==-1){if(V.indexOf("toaxis")!==-1&&(N=j,H=E),V.indexOf("across")!==-1){var ie=u._counterDomainMin,ae=u._counterDomainMax;u.anchor==="free"&&(ie=Math.min(ie,u.position),ae=Math.max(ae,u.position)),N=a.t+(1-ae)*a.h,H=a.t+(1-ie)*a.h}n.insert("line",":first-child").attr({x1:P,x2:P,y1:N,y2:H,"stroke-width":G,stroke:Z,"stroke-dasharray":Am.dashStyle(u.spikedash,G)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:P,x2:P,y1:N,y2:H,"stroke-width":G+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}V.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:P,cy:j-(u.side!=="top"?G:-G),r:G,fill:Z}).classed("spikeline",!0)}}}function Fut(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=e._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers)||i.binNumber!==a.binNumber)return!0}return!1}function Nle(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function Ule(e,t){return A0.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function zut(e,t){for(var r=t.charAt(0),n=[],i=[],a=[],o=0;oe.offsetTop+e.clientTop,Yle=e=>e.offsetLeft+e.clientLeft;function eT(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),i=n.left,a=n.top,o=i+n.width,s=a+n.height,l=zf.apply3DTransform(r._invTransform)(i,a),u=zf.apply3DTransform(r._invTransform)(o,s),c=l[0],f=l[1],h=u[0],d=u[1];return{x:c,y:f,width:h-c,height:d-f,top:Math.min(f,d),left:Math.min(c,h),right:Math.max(c,h),bottom:Math.max(f,d)}}});var xM=ye((qar,Kle)=>{"use strict";var qut=Pr(),Out=ka(),But=ip().isUnifiedHover;Kle.exports=function(t,r,n,i){i=i||{};var a=r.legend;function o(s){i.font[s]||(i.font[s]=a?r.legend.font[s]:r.font[s])}r&&But(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),a?(i.bgcolor||(i.bgcolor=Out.combine(r.legend.bgcolor,r.paper_bgcolor)),i.bordercolor||(i.bordercolor=r.legend.bordercolor)):i.bgcolor||(i.bgcolor=r.paper_bgcolor)),n("hoverlabel.bgcolor",i.bgcolor),n("hoverlabel.bordercolor",i.bordercolor),n("hoverlabel.namelength",i.namelength),n("hoverlabel.showarrow",i.showarrow),qut.coerceFont(n,"hoverlabel.font",i.font),n("hoverlabel.align",i.align)}});var $le=ye((Oar,Jle)=>{"use strict";var Nut=Pr(),Uut=xM(),Vut=W1();Jle.exports=function(t,r){function n(i,a){return Nut.coerce(t,r,Vut,i,a)}Uut(t,r,n)}});var tue=ye((Bar,eue)=>{"use strict";var Qle=Pr(),Gut=g3(),Hut=xM();eue.exports=function(t,r,n,i){function a(s,l){return Qle.coerce(t,r,Gut,s,l)}var o=Qle.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),Hut(t,r,a,o)}});var $B=ye((Nar,rue)=>{"use strict";var jut=Pr(),Wut=W1();rue.exports=function(t,r){function n(i,a){return r[i]!==void 0?r[i]:jut.coerce(t,r,Wut,i,a)}return n("clickmode"),n("hoversubplots"),n("hoveranywhere"),n("clickanywhere"),n("hovermode")}});var aue=ye((Uar,nue)=>{"use strict";var iue=Pr(),Xut=W1(),Zut=$B(),Yut=xM();nue.exports=function(t,r){function n(c,f){return iue.coerce(t,r,Xut,c,f)}var i=Zut(t,r);i&&(n("hoverdistance"),n("spikedistance"),i.indexOf("unified")!==-1&&n("hoversort"));var a=n("dragmode");a==="select"&&n("selectdirection");var o=r._has("mapbox"),s=r._has("map"),l=r._has("geo"),u=r._basePlotModules.length;r.dragmode==="zoom"&&((o||s||l)&&u===1||(o||s)&&l&&u===2)&&(r.dragmode="pan"),Yut(t,r,n),iue.coerceFont(n,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var lue=ye((Var,sue)=>{"use strict";var QB=Pr(),oue=Oa();sue.exports=function(t){var r=t.calcdata,n=t._fullLayout;function i(u){return function(c){return QB.coerceHoverinfo({hoverinfo:c},{_module:u._module},n)}}for(var a=0;a{"use strict";var Jut=Oa(),$ut=JB().hover;uue.exports=function(t,r,n){var i=Jut.getComponentMethod("annotations","onClick")(t,t._hoverdata),a=t._fullLayout;n!==void 0&&$ut(t,r,n,!0);function o(){var l,u,c,f;var s={points:t._hoverdata,event:r};(l=s.xaxes)!=null||(s.xaxes=t._hoverXAxes),(u=s.yaxes)!=null||(s.yaxes=t._hoverYAxes),(c=s.xvals)!=null||(s.xvals=t._hoverXVals),(f=s.yvals)!=null||(s.yvals=t._hoverYVals),t.emit("plotly_click",s)}(t._hoverdata||a.clickanywhere)&&r&&r.target&&(t._hoverdata||(t._hoverdata=[]),i&&i.then?i.then(o):o(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var ef=ye((Har,due)=>{"use strict";var Qut=qa(),$L=Pr(),ect=yv(),bM=ip(),fue=W1(),hue=JB();due.exports={moduleType:"component",name:"fx",constants:US(),schema:{layout:fue},attributes:g3(),layoutAttributes:fue,supplyLayoutGlobalDefaults:$le(),supplyDefaults:tue(),supplyLayoutDefaults:aue(),calc:lue(),getDistanceFunction:bM.getDistanceFunction,getClosest:bM.getClosest,inbox:bM.inbox,quadrature:bM.quadrature,appendArrayPointValue:bM.appendArrayPointValue,castHoverOption:rct,castHoverinfo:ict,hover:hue.hover,unhover:ect.unhover,loneHover:hue.loneHover,loneUnhover:tct,click:cue()};function tct(e){var t=$L.isD3Selection(e)?e:Qut.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function rct(e,t,r){return $L.castOption(e,t,"hoverlabel."+r)}function ict(e,t,r){function n(i){return $L.coerceHoverinfo({hoverinfo:i},{_module:e._module},t)}return $L.castOption(e,r,"hoverinfo",n)}});var Cg=ye(Ry=>{"use strict";Ry.selectMode=function(e){return e==="lasso"||e==="select"};Ry.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Ry.openMode=function(e){return e==="drawline"||e==="drawopenpath"};Ry.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Ry.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};Ry.selectingOrDrawing=function(e){return Ry.freeMode(e)||Ry.rectMode(e)}});var wM=ye((War,vue)=>{"use strict";vue.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(n){n.regl&&n.regl.clear({color:!0,depth:!0})})}});var QL=ye((Xar,pue)=>{"use strict";pue.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:[""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}});var tP=ye((Zar,gue)=>{"use strict";var eP=32;gue.exports={CIRCLE_SIDES:eP,i000:0,i090:eP/4,i180:eP/2,i270:eP/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var rP=ye((Yar,yue)=>{"use strict";var nct=Pr().strTranslate;function mue(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function act(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function oct(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return mue(e,r[t])}}function sct(e){return nct(e.xaxis._offset,e.yaxis._offset)}yue.exports={p2r:mue,r2p:act,axValue:oct,getTransform:sct}});var m_=ye(Dy=>{"use strict";var lct=aM(),bue=tP(),rT=bue.CIRCLE_SIDES,eN=bue.SQRT2,wue=rP(),_ue=wue.p2r,xue=wue.r2p,uct=[0,3,4,5,6,1,2],cct=[0,3,4,1,2];Dy.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var Tue=df(),kue=Cg(),fct=kue.drawMode,hct=kue.openMode,iT=tP(),Aue=iT.i000,Sue=iT.i090,Mue=iT.i180,Eue=iT.i270,dct=iT.cos45,vct=iT.sin45,Cue=rP(),nP=Cue.p2r,y_=Cue.r2p,pct=o_(),gct=pct.clearOutline,aP=m_(),mct=aP.readPaths,yct=aP.writePaths,_ct=aP.ellipseOver,xct=aP.fixDatesForPaths;function bct(e,t){if(e.length){var r=e[0][0];if(r){var n=t.gd,i=t.isActiveShape,a=t.dragmode,o=(n.layout||{}).shapes||[];if(!fct(a)&&i!==void 0){var s=n._fullLayout._activeShapeIndex;if(s{"use strict";var wct=Cg(),Tct=wct.selectMode,Act=o_(),Sct=Act.clearOutline,tN=m_(),Mct=tN.readPaths,Ect=tN.writePaths,kct=tN.fixDatesForPaths;Iue.exports=function(t,r){if(t.length){var n=t[0][0];if(n){var i=n.getAttribute("d"),a=r.gd,o=a._fullLayout.newselection,s=r.plotinfo,l=s.xaxis,u=s.yaxis,c=r.isActiveSelection,f=r.dragmode,h=(a.layout||{}).selections||[];if(!Tct(f)&&c!==void 0){var d=a._fullLayout._activeSelectionIndex;if(d{"use strict";Rue.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:3},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}});var x_=ye(Dd=>{"use strict";var Em=AM(),Due=Pr(),__=ho();Dd.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};Dd.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};Dd.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};Dd.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};Dd.extractPathCoords=function(e,t,r){var n=[],i=e.match(Em.segmentRE);return i.forEach(function(a){var o=t[a.charAt(0)].drawn;if(o!==void 0){var s=a.slice(1).match(Em.paramRE);if(!(!s||s.length{let s=o.charAt(0),l=i[s].drawn!==void 0;return a+(l?1:0)},0)};Dd.getDataToPixel=function(e,t,r,n,i){var a=e._fullLayout._size,o;if(t)if(i==="domain")o=function(l){return t._length*(n?1-l:l)+t._offset};else{var s=Dd.shapePositionToRange(t);o=function(l){var u=Mm(t,r);return t._offset+t.r2p(s(l,!0))+u},t.type==="date"&&(o=Dd.decodeDate(o))}else n?o=function(l){return a.t+a.h*(1-l)}:o=function(l){return a.l+a.w*l};return o};Dd.getPixelToData=function(e,t,r,n){var i=e._fullLayout._size,a;if(t)if(n==="domain")a=function(s){var l=(s-t._offset)/t._length;return r?1-l:l};else{var o=Dd.rangeToShapePosition(t);a=function(s){return o(t.p2r(s-t._offset))}}else r?a=function(s){return 1-(s-i.t)/i.h}:a=function(s){return(s-i.l)/i.w};return a};Dd.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,n=Math.round(e);return r?n+.5:n};Dd.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref],i=!!n;return i?n._hadPlotinfo=!0:(n={},r.xref&&r.xref!=="paper"&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&r.yref!=="paper"&&(n.yaxis=e._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}};Dd.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref],i=!!n;return i?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}};Dd.getPathString=function(e,t){let r=t.type,n=__.getRefType(t.xref),i=__.getRefType(t.yref),a=e._fullLayout._size;var o,s,l,u,c,f,h,d,v,m,b,p;function k(P,E,z,q){var V;if(P)if(E==="domain")q?V=function(G){return P._offset+P._length*(1-G)}:V=function(G){return P._offset+P._length*G};else{let G=Dd.shapePositionToRange(P);V=function(Z){return P._offset+P.r2p(G(Z,!0))},z==="path"&&P.type==="date"&&(V=Dd.decodeDate(V))}else q?V=function(G){return a.t+a.h*(1-G)}:V=function(G){return a.l+a.w*G};return V}if(n==="array"?(h=[],o=t.xref.map(function(P){return __.getFromId(e,P)}),h=t.xref.map(function(P,E){return k(o[E],__.getRefType(P),r,!1)})):(o=__.getFromId(e,t.xref),h=k(o,n,r,!1)),i==="array"?(d=[],s=t.yref.map(function(P){return __.getFromId(e,P)}),d=t.yref.map(function(P,E){return k(s[E],__.getRefType(P),r,!0)})):(s=__.getFromId(e,t.yref),d=k(s,i,r,!0)),r==="path")return Cct(t,h,d);if(n==="array")l=Mm(o[0],t.x0shift),u=Mm(o[1],t.x1shift),v=h[0](t.x0)+l,m=h[1](t.x1)+u;else if(l=Mm(o,t.x0shift),u=Mm(o,t.x1shift),t.xsizemode==="pixel"){let P=h(t.xanchor);v=P+t.x0+l,m=P+t.x1+u}else v=h(t.x0)+l,m=h(t.x1)+u;if(i==="array")c=Mm(s[0],t.y0shift),f=Mm(s[1],t.y1shift),b=d[0](t.y0)+c,p=d[1](t.y1)+f;else if(c=Mm(s,t.y0shift),f=Mm(s,t.y1shift),t.ysizemode==="pixel"){let P=d(t.yanchor);b=P-t.y0+c,p=P-t.y1+f}else b=d(t.y0)+c,p=d(t.y1)+f;if(r==="line")return"M"+v+","+b+"L"+m+","+p;if(r==="rect")return"M"+v+","+b+"H"+m+"V"+p+"H"+v+"Z";var M=(v+m)/2,T=(b+p)/2,L=Math.abs(M-v),x=Math.abs(T-b),C="A"+L+","+x,S=M+L+","+T,g=M+","+(T-x);return"M"+S+C+" 0 1,1 "+g+C+" 0 0,1 "+S+"Z"};function Cct(e,t,r){let n=e.path,i=e.xsizemode,a=e.ysizemode,o=e.xanchor,s=e.yanchor,l=Array.isArray(e.xref),u=Array.isArray(e.yref);var c=0,f=0;return n.replace(Em.segmentRE,function(h){var d=0,v=h.charAt(0),m=Em.paramIsX[v],b=Em.paramIsY[v],p=Em.numParams[v];let k=m.drawn!==void 0,M=b.drawn!==void 0,T=l?t[c]:t,L=u?r[f]:r;var x=h.slice(1).replace(Em.paramRE,function(C){return m[d]?i==="pixel"?C=T(o)+Number(C):C=T(C):b[d]&&(a==="pixel"?C=L(s)-Number(C):C=L(C)),d++,d>p&&(C="X"),C});return d>p&&(x=x.replace(/[\s,]*X.*/,""),Due.log("Ignoring extra params in segment "+h)),k&&c++,M&&f++,v+x})}Dd.getPixelShift=Mm;function Mm(e,t){t=t||0;var r=0;return t&&e&&(e.type==="category"||e.type==="multicategory")&&(r=(e.r2p(1)-e.r2p(0))*t),r}});var iN=ye((tor,que)=>{"use strict";var Lct=Pr(),km=ho(),Fue=Zl(),zue=So(),Pct=m_().readPaths,Zb=x_(),Ict=Zb.getPathString,SM=F6(),Rct=Dh().FROM_TL;que.exports=function(t,r,n,i){if(i.selectAll(".shape-label").remove(),!!(n.label.text||n.label.texttemplate)){var a;if(n.label.texttemplate){var o={};if(n.type!=="path"){var s=km.getFromId(t,n.xref),l=km.getFromId(t,n.yref);let ae=Array.isArray(n.xref),_e=Array.isArray(n.yref);for(var u in SM){var c=typeof SM[u]=="function",f=!ae||SM.simpleXVariables.includes(u),h=!_e||SM.simpleYVariables.includes(u);if(c&&f&&h){var d=SM[u](n,s,l);d!==void 0&&(o[u]=d)}}}a=Lct.texttemplateStringForShapes({data:[o],fallback:n.label.texttemplatefallback,locale:t._fullLayout._d3locale,template:n.label.texttemplate})}else a=n.label.text;var v={"data-index":r},m=n.label.font,b={"data-notex":1},p=i.append("g").attr(v).classed("shape-label",!0),k=p.append("text").attr(b).classed("shape-label-text",!0).text(a),M,T,L,x;if(n.path){var C=Ict(t,n),S=Pct(C,t);M=1/0,L=1/0,T=-1/0,x=-1/0;for(var g=0;gZb.getDataToPixel(t,He,ce,!1,lt)(Pe),me=(Pe,ce,He,lt)=>Zb.getDataToPixel(t,He,ce,!0,lt)(Pe);if(n.xsizemode==="pixel"){let Pe=Le(n.xanchor,void 0,Ee,Se),ce=Zb.getPixelShift(Ee,n.x0shift),He=Zb.getPixelShift(Ee,n.x1shift);M=Pe+n.x0+ce,T=Pe+n.x1+He}else M=Le(n.x0,n.x0shift,Ee,Se),T=Le(n.x1,n.x1shift,Ce,ke);if(n.ysizemode==="pixel"){let Pe=me(n.yanchor,void 0,ge,be),ce=Zb.getPixelShift(ge,n.y0shift),He=Zb.getPixelShift(ge,n.y1shift);L=Pe-n.y0+ce,x=Pe-n.y1+He}else L=me(n.y0,n.y0shift,ge,be),x=me(n.y1,n.y1shift,re,Be)}var G=n.label.textangle;G==="auto"&&(n.type==="line"?G=Dct(M,L,T,x):G=0),k.call(function(ae){return ae.call(zue.font,m).attr({}),Fue.convertToTspans(ae,t),ae});var Z=zue.bBox(k.node()),j=Fct(M,L,T,x,n,G,Z),N=j.textx,H=j.texty,ie=j.xanchor;k.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[ie],y:H,x:N,transform:"rotate("+G+","+N+","+H+")"}).call(Fue.positionText,N,H)}};function Dct(e,t,r,n){var i,a;return a=Math.abs(r-e),r>=e?i=t-n:i=n-t,-180/Math.PI*Math.atan2(i,a)}function Fct(e,t,r,n,i,a,o){var s=i.label.textposition,l=i.label.textangle,u=i.label.padding,c=i.type,f=Math.PI/180*a,h=Math.sin(f),d=Math.cos(f),v=i.label.xanchor,m=i.label.yanchor,b,p,k,M;if(c==="line"){s==="start"?(b=e,p=t):s==="end"?(b=r,p=n):(b=(e+r)/2,p=(t+n)/2),v==="auto"&&(s==="start"?l==="auto"?r>e?v="left":re?v="right":re?v="right":re?v="left":r{"use strict";var zct=Pr(),qct=zct.strTranslate,Oue=yv(),Uue=Cg(),Oct=Uue.drawMode,Vue=Uue.selectMode,Gue=Oa(),Bue=ka(),lP=tP(),Bct=lP.i000,Nct=lP.i090,Uct=lP.i180,Vct=lP.i270,Gct=o_(),Hue=Gct.clearOutlineControllers,aN=m_(),sP=aN.pointsOnRectangle,nN=aN.pointsOnEllipse,Hct=aN.writePaths,jct=oP().newShapes,Wct=oP().createShapeObj,Xct=rN(),Zct=iN();jue.exports=function e(t,r,n,i){i||(i=0);var a=n.gd;function o(){e(t,r,n,i++),(nN(t[0])||n.hasText)&&s({redrawing:!0})}function s(j){var N={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,N=jct(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,N=Xct(r,n),a._fullLayout._reselect=!0),Object.keys(N).length&&Gue.call((j||{}).redrawing?"relayout":"_guiRelayout",a,N)}var l=a._fullLayout,u=l._zoomlayer,c=n.dragmode,f=Oct(c),h=Vue(c);(f||h)&&(a._fullLayout._outlining=!0),Hue(a),r.attr("d",Hct(t));var d,v,m,b,p;if(!i&&(n.isActiveShape||n.isActiveSelection)){p=Yct([],t);var k=u.append("g").attr("class","outline-controllers");P(k),Z()}if(f&&n.hasText){var M=u.select(".label-temp"),T=Wct(r,n,n.dragmode);Zct(a,"label-temp",T,M)}function L(j){m=+j.srcElement.getAttribute("data-i"),b=+j.srcElement.getAttribute("data-j"),d[m][b].moveFn=x}function x(j,N){if(t.length){var H=p[m][b][1],ie=p[m][b][2],ae=t[m],_e=ae.length;if(sP(ae)){var Ee=j,Ce=N;if(n.isActiveSelection){var ge=Nue(ae,b);ge[1]===ae[b][1]?Ce=0:Ee=0}for(var re=0;re<_e;re++)if(re!==b){var Se=ae[re];Se[1]===ae[b][1]&&(Se[1]=H+Ee),Se[2]===ae[b][2]&&(Se[2]=ie+Ce)}if(ae[b][1]=H+Ee,ae[b][2]=ie+Ce,!sP(ae))for(var ke=0;ke<_e;ke++)for(var be=0;be1&&!(j.length===2&&j[1][0]==="Z")&&(b===0&&(j[0][0]="M"),t[m]=j,o(),s())}}function g(j,N){if(j===2){m=+N.srcElement.getAttribute("data-i"),b=+N.srcElement.getAttribute("data-j");var H=t[m];!sP(H)&&!nN(H)&&S()}}function P(j){d=[];for(var N=0;N{"use strict";var Jct=qa(),Jue=Oa(),sN=Pr(),Yb=ho(),$ct=m_().readPaths,Qct=uP(),fP=iN(),$ue=o_().clearOutlineControllers,oN=ka(),hP=So(),eft=vl().arrayEditor,Wue=yv(),Xue=ef(),Zue=Eg(),Kb=AM(),Ep=x_(),lN=Ep.getPathString;tce.exports={draw:uN,drawOne:Que,eraseActiveShape:aft,drawLabel:fP};function uN(e){var t=e._fullLayout;t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove();for(var r in t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;i{if(!e._dragging&&e._fullLayout.hoveranywhere){let o=i(a);o&&Xue.hover(e,o,r.id)}}),n.addEventListener("click",a=>{if(!e._dragged&&e._fullLayout.clickanywhere){let o=i(a);o&&Xue.click(e,o,r.id)}})}function ece(e,t,r){let n=r.xref,i=r.yref;if(Array.isArray(n)||Array.isArray(i)){let a="clip"+t._fullLayout._uid+"shape"+r._index,o=rft(t,n,i);sN.ensureSingleById(t._fullLayout._clips,"clipPath",a,function(s){s.append("rect")}).select("rect").attr(o),hP.setClipUrl(e,a,t)}else{let a=(n+i).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");hP.setClipUrl(e,a?"clip"+t._fullLayout._uid+a:null,t)}}function rft(e,t,r){let n=e._fullLayout._size;function i(s,l){let u=(Array.isArray(s)?s:[s]).map(h=>Yb.getFromId(e,h)).filter(Boolean);if(!u.length)return l?[n.t,n.t+n.h]:[n.l,n.l+n.w];let c=u.map(function(h){return h._offset}),f=u.map(function(h){return h._offset+h._length});return[Math.min(...c),Math.max(...f)]}let a=i(t,!1),o=i(r,!0);return{x:a[0],y:o[0],width:a[1]-a[0],height:o[1]-o[0]}}function ift(e,t,r,n,i,a){var o=10,s=10,l=r.xsizemode==="pixel",u=r.ysizemode==="pixel",c=r.type==="line",f=r.type==="path",h=a.modifyItem,d,v,m,b,p,k,M,T,L,x,C,S,g,P,E,z=Jct.select(t.node().parentNode),q=Yb.getFromId(e,r.xref),V=Yb.getRefType(r.xref),G=Yb.getFromId(e,r.yref),Z=Yb.getRefType(r.yref),j=r.x0shift,N=r.x1shift,H=r.y0shift,ie=r.y1shift,ae=function(at,ct){var ar=Ep.getDataToPixel(e,q,ct,!1,V);return ar(at)},_e=function(at,ct){var ar=Ep.getDataToPixel(e,G,ct,!0,Z);return ar(at)},Ee=Ep.getPixelToData(e,q,!1,V),Ce=Ep.getPixelToData(e,G,!0,Z),ge=ke(),re={element:ge.node(),gd:e,prepFn:Le,doneFn:me,clickFn:Pe},Se;Wue.init(re),ge.node().onmousemove=Be;function ke(){return c?be():t}function be(){var at=10,ct=Math.max(r.line.width,at),ar=i.append("g").attr("data-index",n).attr("drag-helper",!0);ar.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":ct,"stroke-opacity":"0"});var Vt={"fill-opacity":"0"},rr=Math.max(ct/2,at);return ar.append("circle").attr({"data-line-point":"start-point",cx:l?ae(r.xanchor)+r.x0:ae(r.x0,j),cy:u?_e(r.yanchor)-r.y0:_e(r.y0,H),r:rr}).style(Vt).classed("cursor-grab",!0),ar.append("circle").attr({"data-line-point":"end-point",cx:l?ae(r.xanchor)+r.x1:ae(r.x1,N),cy:u?_e(r.yanchor)-r.y1:_e(r.y1,ie),r:rr}).style(Vt).classed("cursor-grab",!0),ar}function Be(at){if(cP(e)){Se=null;return}if(c)at.target.tagName==="path"?Se="move":Se=at.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ct=re.element.getBoundingClientRect(),ar=ct.right-ct.left,Vt=ct.bottom-ct.top,rr=at.clientX-ct.left,tt=at.clientY-ct.top,je=!f&&ar>o&&Vt>s&&!at.shiftKey?Wue.getCursor(rr/ar,1-tt/Vt):"move";Zue(t,je),Se=je.split("-")[0]}}function Le(at){cP(e)||(l&&(p=ae(r.xanchor)),u&&(k=_e(r.yanchor)),r.type==="path"?E=r.path:(d=l?r.x0:ae(r.x0),v=u?r.y0:_e(r.y0),m=l?r.x1:ae(r.x1),b=u?r.y1:_e(r.y1)),db?(M=v,C="y0",T=b,S="y1"):(M=b,C="y1",T=v,S="y0"),Be(at),lt(i,r),Ht(t,r,e),re.moveFn=Se==="move"?ce:He,re.altKey=at.altKey)}function me(){cP(e)||(Zue(t),mt(i),ece(t,e,r),Jue.call("_guiRelayout",e,a.getUpdateObj()))}function Pe(){cP(e)||mt(i)}function ce(at,ct){if(r.type==="path"){var ar=function(tt){return tt},Vt=ar,rr=ar;l?h("xanchor",r.xanchor=Ee(p+at)):(Vt=function(je){return Ee(ae(je)+at)},q&&q.type==="date"&&(Vt=Ep.encodeDate(Vt))),u?h("yanchor",r.yanchor=Ce(k+ct)):(rr=function(je){return Ce(_e(je)+ct)},G&&G.type==="date"&&(rr=Ep.encodeDate(rr))),h("path",r.path=Yue(E,Vt,rr))}else l?h("xanchor",r.xanchor=Ee(p+at)):(h("x0",r.x0=Ee(d+at)),h("x1",r.x1=Ee(m+at))),u?h("yanchor",r.yanchor=Ce(k+ct)):(h("y0",r.y0=Ce(v+ct)),h("y1",r.y1=Ce(b+ct)));t.attr("d",lN(e,r)),lt(i,r),fP(e,n,r,z)}function He(at,ct){if(f){var ar=function(Ar){return Ar},Vt=ar,rr=ar;l?h("xanchor",r.xanchor=Ee(p+at)):(Vt=function(ei){return Ee(ae(ei)+at)},q&&q.type==="date"&&(Vt=Ep.encodeDate(Vt))),u?h("yanchor",r.yanchor=Ce(k+ct)):(rr=function(ei){return Ce(_e(ei)+ct)},G&&G.type==="date"&&(rr=Ep.encodeDate(rr))),h("path",r.path=Yue(E,Vt,rr))}else if(c){if(Se==="resize-over-start-point"){var tt=d+at,je=u?v-ct:v+ct;h("x0",r.x0=l?tt:Ee(tt)),h("y0",r.y0=u?je:Ce(je))}else if(Se==="resize-over-end-point"){var Ue=m+at,Ae=u?b-ct:b+ct;h("x1",r.x1=l?Ue:Ee(Ue)),h("y1",r.y1=u?Ae:Ce(Ae))}}else{var rt=function(Ar){return Se.indexOf(Ar)!==-1},St=rt("n"),Tt=rt("s"),dt=rt("w"),Et=rt("e"),pt=St?M+ct:M,jt=Tt?T+ct:T,or=dt?L+at:L,mr=Et?x+at:x;u&&(St&&(pt=M-ct),Tt&&(jt=T-ct)),(!u&&jt-pt>s||u&&pt-jt>s)&&(h(C,r[C]=u?pt:Ce(pt)),h(S,r[S]=u?jt:Ce(jt))),mr-or>o&&(h(g,r[g]=l?or:Ee(or)),h(P,r[P]=l?mr:Ee(mr)))}t.attr("d",lN(e,r)),lt(i,r),fP(e,n,r,z)}function lt(at,ct){(l||u)&&ar();function ar(){var Vt=ct.type!=="path",rr=at.selectAll(".visual-cue").data([0]),tt=1;rr.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":tt}).classed("visual-cue",!0);var je=ae(l?ct.xanchor:sN.midRange(Vt?[ct.x0,ct.x1]:Ep.extractPathCoords(ct.path,Kb.paramIsX))),Ue=_e(u?ct.yanchor:sN.midRange(Vt?[ct.y0,ct.y1]:Ep.extractPathCoords(ct.path,Kb.paramIsY)));if(je=Ep.roundPositionForSharpStrokeRendering(je,tt),Ue=Ep.roundPositionForSharpStrokeRendering(Ue,tt),l&&u){var Ae="M"+(je-1-tt)+","+(Ue-1-tt)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";rr.attr("d",Ae)}else if(l){var rt="M"+(je-1-tt)+","+(Ue-9-tt)+"v18 h2 v-18 Z";rr.attr("d",rt)}else{var St="M"+(je-9-tt)+","+(Ue-1-tt)+"h18 v2 h-18 Z";rr.attr("d",St)}}}function mt(at){at.selectAll(".visual-cue").remove()}function Ht(at,ct,ar){var Vt=ct.xref,rr=ct.yref,tt=Yb.getFromId(ar,Vt),je=Yb.getFromId(ar,rr),Ue="";Vt!=="paper"&&!tt.autorange&&(Ue+=Vt),rr!=="paper"&&!je.autorange&&(Ue+=rr),hP.setClipUrl(at,Ue?"clip"+ar._fullLayout._uid+Ue:null,ar)}}function Yue(e,t,r){return e.replace(Kb.segmentRE,function(n){var i=0,a=n.charAt(0),o=Kb.paramIsX[a],s=Kb.paramIsY[a],l=Kb.numParams[a],u=n.slice(1).replace(Kb.paramRE,function(c){return i>=l||(o[i]?c=t(c):s[i]&&(c=r(c)),i++),c});return a+u})}function nft(e,t){if(dP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){Kue(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=Kue,uN(e)}}}function Kue(e){if(dP(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&($ue(e),delete e._fullLayout._activeShapeIndex,uN(e))}}function aft(e){if(dP(e)){$ue(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var S0=Oa(),rce=Mc(),ice=df(),Pl=QL(),oft=vP().eraseActiveShape,pP=Pr(),tl=pP._,Il=cce.exports={};Il.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?tl(e,"Download plot as a PNG"):tl(e,"Download plot")},icon:Pl.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};pP.notifier(tl(e,"Taking snapshot - this may take a few seconds"),"long",e),["filename","width","height","scale"].forEach(function(n){n in t&&(r[n]=t[n])}),S0.call("downloadImage",e,r).then(function(n){pP.notifier(tl(e,"Snapshot succeeded")+" - "+n,"long",e)}).catch(function(){pP.notifier(tl(e,"Sorry, there was a problem downloading your snapshot!"),"long",e)})}};Il.sendDataToCloud={name:"sendDataToCloud",title:function(e){return tl(e,"Edit in Chart Studio")},icon:Pl.disk,click:function(e){rce.sendDataToCloud(e)}};Il.editInChartStudio={name:"editInChartStudio",title:function(e){return tl(e,"Edit in Chart Studio")},icon:Pl.pencil,click:function(e){rce.sendDataToCloud(e)}};Il.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return tl(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Pl.zoombox,click:Bv};Il.pan2d={name:"pan2d",_cat:"pan",title:function(e){return tl(e,"Pan")},attr:"dragmode",val:"pan",icon:Pl.pan,click:Bv};Il.select2d={name:"select2d",_cat:"select",title:function(e){return tl(e,"Box Select")},attr:"dragmode",val:"select",icon:Pl.selectbox,click:Bv};Il.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return tl(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Pl.lasso,click:Bv};Il.drawclosedpath={name:"drawclosedpath",title:function(e){return tl(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Pl.drawclosedpath,click:Bv};Il.drawopenpath={name:"drawopenpath",title:function(e){return tl(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Pl.drawopenpath,click:Bv};Il.drawline={name:"drawline",title:function(e){return tl(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Pl.drawline,click:Bv};Il.drawrect={name:"drawrect",title:function(e){return tl(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Pl.drawrect,click:Bv};Il.drawcircle={name:"drawcircle",title:function(e){return tl(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Pl.drawcircle,click:Bv};Il.eraseshape={name:"eraseshape",title:function(e){return tl(e,"Erase active shape")},icon:Pl.eraseshape,click:oft};Il.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return tl(e,"Zoom in")},attr:"zoom",val:"in",icon:Pl.zoom_plus,click:Bv};Il.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return tl(e,"Zoom out")},attr:"zoom",val:"out",icon:Pl.zoom_minus,click:Bv};Il.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return tl(e,"Autoscale")},attr:"zoom",val:"auto",icon:Pl.autoscale,click:Bv};Il.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return tl(e,"Reset axes")},attr:"zoom",val:"reset",icon:Pl.home,click:Bv};Il.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return tl(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Pl.tooltip_basic,gravity:"ne",click:Bv};Il.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return tl(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Pl.tooltip_compare,gravity:"ne",click:Bv};function Bv(e,t){var r=t.currentTarget,n=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,a=e._fullLayout,o={},s=ice.list(e,null,!0),l=a._cartesianSpikesEnabled,u,c;if(n==="zoom"){var f=i==="in"?.5:2,h=(1+f)/2,d=(1-f)/2,v,m;for(c=0;c{"use strict";var fce=hN(),uft=Object.keys(fce),hce=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],dce=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(hce),aT=[],cft=function(e){if(dce.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();aT.indexOf(t)===-1&&aT.push(t),aT.indexOf(r)===-1&&aT.push(r)}};uft.forEach(function(e){cft(fce[e])});aT.sort();vce.exports={DRAW_MODES:hce,backButtons:dce,foreButtons:aT}});var vN=ye((sor,pce)=>{"use strict";var oor=dN();pce.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"}}});var mce=ye((lor,gce)=>{"use strict";var fft=Pr(),MM=ka(),hft=vl(),dft=vN();gce.exports=function(t,r){var n=t.modebar||{},i=hft.newContainer(r,"modebar");function a(s,l){return fft.coerce(n,i,dft,s,l)}a("orientation"),a("bgcolor",MM.addOpacity(r.paper_bgcolor,.5));var o=MM.contrast(MM.rgb(r.modebar.bgcolor));a("color",MM.addOpacity(o,.3)),a("activecolor",MM.addOpacity(o,.7)),a("uirevision",r.uirevision),a("add"),a("remove")}});var bce=ye((uor,xce)=>{"use strict";var pN=qa(),vft=Eo(),mP=Pr(),yce=QL(),pft=m6().version,gft=new DOMParser;function _ce(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Cm=_ce.prototype;Cm.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i="modebar-"+n._uid;this.element.setAttribute("id",i),this.element.setAttribute("role","toolbar"),this._uid=i,this.element.className="modebar modebar--custom",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),n.modebar.orientation==="v"&&(this.element.className+=" vertical",t=t.reverse());var a=n.modebar,o="#"+i+" .modebar-group";document.querySelectorAll(o).forEach(function(f){f.style.backgroundColor=a.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||l||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton(),mP.setStyleOnHover("#"+i+" .modebar-btn",".active",".icon path","fill: "+a.activecolor,"fill: "+a.color,this.element)};Cm.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var n=t.createGroup();r.forEach(function(i){var a=i.name;if(!a)throw new Error("must provide button 'name' in button config");if(t.buttonsNames.indexOf(a)!==-1)throw new Error("button name '"+a+"' is taken");t.buttonsNames.push(a);var o=t.createButton(i);t.buttonElements.push(o),n.appendChild(o)}),t.element.appendChild(n)})};Cm.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};Cm.createButton=function(e){var t=this,r=document.createElement("button");r.setAttribute("type","button"),r.setAttribute("rel","tooltip"),r.className="modebar-btn";var n=e.title;n===void 0?n=e.name:typeof n=="function"&&(n=n(this.graphInfo)),(n||n===0)&&(r.setAttribute("data-title",n),r.setAttribute("aria-label",n)),e.attr!==void 0&&r.setAttribute("data-attr",e.attr);var i=e.val;i!==void 0&&(typeof i=="function"&&(i=i(this.graphInfo)),r.setAttribute("data-val",i));var a=e.click;if(typeof a!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(s){e.click(t.graphInfo,s),t.updateActiveButton(s.currentTarget)}),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&pN.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||yce.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};Cm.createIcon=function(e){var t=vft(e.height)?Number(e.height):e.ascent-e.descent,r="http://www.w3.org/2000/svg",n;if(e.path){n=document.createElementNS(r,"svg"),n.setAttribute("viewBox",[0,0,e.width,t].join(" ")),n.setAttribute("class","icon");var i=document.createElementNS(r,"path");i.setAttribute("d",e.path),e.transform?i.setAttribute("transform",e.transform):e.ascent!==void 0&&i.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),n.appendChild(i)}if(e.svg){var a=gft.parseFromString(e.svg,"application/xml");n=a.childNodes[0]}return n.setAttribute("height","1em"),n.setAttribute("width","1em"),n};Cm.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(n){var i=n.getAttribute("data-val")||!0,a=n.getAttribute("data-attr"),o=n.getAttribute("data-toggle")==="true",s=pN.select(n),l=function(f,h){var d=t.modebar,v=f.querySelector(".icon path");v&&(h||f.matches(":hover")?v.style.fill=d.activecolor:v.style.fill=d.color)};if(o){if(a===r){var u=!s.classed("active");s.classed("active",u),l(n,u)}}else{var c=a===null?a:mP.nestedProperty(t,a).get();s.classed("active",c===i),l(n,c===i)}})};Cm.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r{"use strict";var _ft=df(),wce=Ru(),gN=Oa(),xft=ip().isUnifiedHover,bft=bce(),yP=hN(),wft=dN().DRAW_MODES,Tft=Pr().extendDeep;Tce.exports=function(t){var r=t._fullLayout,n=t._context,i=r._modeBar;if(!n.displayModeBar&&!n.watermark){i&&(i.destroy(),delete r._modeBar);return}if(!Array.isArray(n.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(n.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var a=n.modeBarButtons,o;Array.isArray(a)&&a.length?o=Cft(a):!n.displayModeBar&&n.watermark?o=[]:o=Aft(t),i?i.update(t,o):r._modeBar=bft(t,o)};function Aft(e){var t=e._fullLayout,r=e._fullData,n=e._context;function i(N,H){if(typeof H=="string"){if(H.toLowerCase()===N.toLowerCase())return!0}else{var ie=H.name,ae=H._cat||H.name;if(ie===N||ae===N.toLowerCase())return!0}return!1}var a=t.modebar.add;typeof a=="string"&&(a=[a]);var o=t.modebar.remove;typeof o=="string"&&(o=[o]);var s=n.modeBarButtonsToAdd.concat(a.filter(function(N){for(var H=0;H1?(P=["toggleHover"],E=["resetViews"]):f?(g=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],E=["resetGeo"]):c?(P=["hoverClosest3d"],E=["resetCameraDefault3d","resetCameraLastSave3d"]):m?(g=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],E=["resetViewMapbox"]):b?(g=["zoomInMap","zoomOutMap"],P=["toggleHover"],E=["resetViewMap"]):h?P=["hoverClosestPie"]:M?(P=["hoverClosestCartesian","hoverCompareCartesian"],E=["resetViewSankey"]):P=["toggleHover"],u&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(Eft(r)||L)&&(P=[]),u&&!T&&(g=["zoomIn2d","zoomOut2d","autoScale2d"],E[0]!=="resetViews"&&(E=["resetScale2d"])),c?z=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!T||v?z=["zoom2d","pan2d"]:m||b||f?z=["pan2d"]:p&&(z=["zoom2d"]),Mft(r)&&z.push("select2d","lasso2d");var q=[],V=function(N){q.indexOf(N)===-1&&P.indexOf(N)!==-1&&q.push(N)};if(Array.isArray(s)){for(var G=[],Z=0;Z{"use strict";Sce.exports={moduleType:"component",name:"modebar",layoutAttributes:vN(),supplyLayoutDefaults:mce(),manage:Ace()}});var yN=ye((dor,Mce)=>{"use strict";var Lft=Dh().FROM_BL;Mce.exports=function(t,r,n){n===void 0&&(n=Lft[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*n;t.range=t._input.range=[t.l2r(a+(i[0]-a)*r),t.l2r(a+(i[1]-a)*r)],t.setScale()}});var $b=ye(EM=>{"use strict";var Jb=Pr(),_N=Mg(),Lg=df().id2name,Pft=Rd(),Ece=yN(),Ift=xm(),Rft=fs().ALMOST_EQUAL,Dft=Dh().FROM_BL;EM.handleDefaults=function(e,t,r){var n=r.axIds,i=r.axHasImage,a=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,l,u,c,f,h,d,v;for(s=0;sa?r.slice(a):n.slice(i))+o}function zft(e,t){for(var r=t._size,n=r.h/r.w,i={},a=Object.keys(e),o=0;oRft*v&&!k)){for(a=0;az&&ieP&&(P=ie);var _e=(P-g)/(2*E);f/=_e,g=l.l2r(g),P=l.l2r(P),l.range=l._input.range=x{"use strict";var xP=qa(),Nv=Oa(),Jp=Mc(),M0=Pr(),wN=Zl(),TN=wM(),kM=ka(),oT=So(),Pce=qb(),zce=mN(),CM=ho(),Fy=Dh(),qce=$b(),qft=qce.enforce,Oft=qce.clean,Ice=Mg().doAutoRange,Oce="start",Bft="middle",Bce="end",Nft=Rh().zindexSeparator;pd.layoutStyles=function(e){return M0.syncOrAsync([Jp.doAutoMargin,Vft],e)};function Uft(e,t,r){for(var n=0;n=e[1]||i[1]<=e[0])&&a[0]t[0])return!0}return!1}function Vft(e){var t=e._fullLayout,r=t._size,n=r.p,i=CM.list(e,"",!0),a,o,s,l,u,c;if(t._paperdiv.style({width:e._context.responsive&&t.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":t.width+"px",height:e._context.responsive&&t.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":t.height+"px"}).selectAll(".main-svg").call(oT.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),pd.drawMainTitle(e),zce.manage(e),!t._has("cartesian"))return Jp.previousPromises(e);function f(Le,me,Pe){var ce=Le._lw/2;if(Le._id.charAt(0)==="x"){if(me){if(Pe==="top")return me._offset-n-ce}else return r.t+r.h*(1-(Le.position||0))+ce%1;return me._offset+me._length+n+ce}if(me){if(Pe==="right")return me._offset+me._length+n+ce}else return r.l+r.w*(Le.position||0)+ce%1;return me._offset-n-ce}for(a=0;a0){Wft(e,a,u,l),s.attr({x:o,y:a,"text-anchor":n,dy:Fce(t.yanchor)}).call(wN.positionText,o,a);var c=(t.text.match(wN.BR_TAG_ALL)||[]).length;if(c){var f=Fy.LINE_SPACING*c+Fy.MID_SHIFT;t.y===0&&(f=-f),s.selectAll(".line").each(function(){var b=+this.getAttribute("dy").slice(0,-2)-f+"em";this.setAttribute("dy",b)})}var h=xP.select(e).selectAll(".gtitle-subtitle");if(h.node()){var d=s.node().getBBox(),v=d.y+d.height,m=v+Pce.SUBTITLE_PADDING_EM*t.subtitle.font.size;h.attr({x:o,y:m,"text-anchor":n,dy:Fce(t.yanchor)}).call(wN.positionText,o,m)}}}};function Gft(e,t,r,n,i){var a=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=M0.isTopAnchor(t)?n:n-i,s=r==="b"?a-o:o;return M0.isTopAnchor(t)&&r==="t"||M0.isBottomAnchor(t)&&r==="b"?!1:s.5?"t":"b",o=e._fullLayout.margin[a],s=0;return t.yref==="paper"?s=r+t.pad.t+t.pad.b:t.yref==="container"&&(s=Hft(a,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function Wft(e,t,r,n){var i="title.automargin",a=e._fullLayout.title,o=a.y>.5?"t":"b",s={x:a.x,y:a.y,t:0,b:0},l={};a.yref==="paper"&&Gft(e,a,o,t,n)?s[o]=r:a.yref==="container"&&(l[o]=r,e._fullLayout._reservedMargin[i]=l),Jp.allowAutoMargin(e,i),Jp.autoMargin(e,i,s)}function Xft(e,t){var r=e.title,n=e._size,i=0;switch(t===Oce?i=r.pad.l:t===Bce&&(i=-r.pad.r),r.xref){case"paper":return n.l+n.w*r.x+i;case"container":default:return e.width*r.x+i}}function Zft(e,t){var r=e.title,n=e._size,i=0;if(t==="0em"||!t?i=-r.pad.b:t===Fy.CAP_SHIFT+"em"&&(i=r.pad.t),r.y==="auto")return n.t/2;switch(r.yref){case"paper":return n.t+n.h-n.h*r.y+i;case"container":default:return e.height-e.height*r.y+i}}function Fce(e){return e==="top"?Fy.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":Fy.MID_SHIFT+"em"}function Yft(e){var t=e.title,r=Bft;return M0.isRightAnchor(t)?r=Bce:M0.isLeftAnchor(t)&&(r=Oce),r}function Kft(e){var t=e.title,r="0em";return M0.isTopAnchor(t)?r=Fy.CAP_SHIFT+"em":M0.isMiddleAnchor(t)&&(r=Fy.MID_SHIFT+"em"),r}pd.doTraceStyle=function(e){var t=e.calcdata,r=[],n;for(n=0;n{"use strict";var Jft=m_().readPaths,$ft=uP(),Nce=o_().clearOutlineControllers,AN=ka(),Uce=So(),Qft=vl().arrayEditor,Vce=x_(),eht=Vce.getPathString;Hce.exports={draw:bP,drawOne:Gce,activateLastSelection:iht};function bP(e){var t=e._fullLayout;Nce(e),t._selectionLayer.selectAll("path").remove();for(var r in t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i=0;b--){var p=o.append("path").attr(l).style("opacity",b?.1:u).call(AN.stroke,f).call(AN.fill,c).call(Uce.dashLine,b?"solid":d,b?4+h:h);if(tht(p,e,n),v){var k=Qft(e.layout,"selections",n);p.style({cursor:"move"});var M={element:p.node(),plotinfo:i,gd:e,editHelpers:k,isActiveSelection:!0},T=Jft(s,e);$ft(T,p,M)}else p.style("pointer-events",b?"all":"none");m[b]=p}var L=m[0],x=m[1];x.node().addEventListener("click",function(){return rht(e,L)})}}function tht(e,t,r){var n=r.xref+r.yref;Uce.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function rht(e,t){if(wP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){SN(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=SN,bP(e)}}}function iht(e){if(wP(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=SN,bP(e)}}function SN(e){if(wP(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(Nce(e),delete e._fullLayout._activeSelectionIndex,bP(e))}}});var Wce=ye((mor,jce)=>{function nht(){var e,t=0,r=!1;function n(i,a){return e.list.push({type:i,data:a?JSON.parse(JSON.stringify(a)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(i,a){return n("check",{seg1:i,seg2:a})},segmentChop:function(i,a){return n("div_seg",{seg:i,pt:a}),n("chop",{seg:i,pt:a})},statusRemove:function(i){return n("pop_seg",{seg:i})},segmentUpdate:function(i){return n("seg_update",{seg:i})},segmentNew:function(i,a){return n("new_seg",{seg:i,primary:a})},segmentRemove:function(i){return n("rem_seg",{seg:i})},tempStatus:function(i,a,o){return n("temp_status",{seg:i,above:a,below:o})},rewind:function(i){return n("rewind",{seg:i})},status:function(i,a,o){return n("status",{seg:i,above:a,below:o})},vert:function(i){return i===r?e:(r=i,n("vert",{x:i}))},log:function(i){return typeof i!="string"&&(i=JSON.stringify(i,!1," ")),n("log",{txt:i})},reset:function(){return n("reset")},selected:function(i){return n("selected",{segs:i})},chainStart:function(i){return n("chain_start",{seg:i})},chainRemoveHead:function(i,a){return n("chain_rem_head",{index:i,pt:a})},chainRemoveTail:function(i,a){return n("chain_rem_tail",{index:i,pt:a})},chainNew:function(i,a){return n("chain_new",{pt1:i,pt2:a})},chainMatch:function(i){return n("chain_match",{index:i})},chainClose:function(i){return n("chain_close",{index:i})},chainAddHead:function(i,a){return n("chain_add_head",{index:i,pt:a})},chainAddTail:function(i,a){return n("chain_add_tail",{index:i,pt:a})},chainConnect:function(i,a){return n("chain_con",{index1:i,index2:a})},chainReverse:function(i){return n("chain_rev",{index:i})},chainJoin:function(i,a){return n("chain_join",{index1:i,index2:a})},done:function(){return n("done")}},e}jce.exports=nht});var Zce=ye((yor,Xce)=>{function aht(e){typeof e!="number"&&(e=1e-10);var t={epsilon:function(r){return typeof r=="number"&&(e=r),e},pointAboveOrOnLine:function(r,n,i){var a=n[0],o=n[1],s=i[0],l=i[1],u=r[0],c=r[1];return(s-a)*(c-o)-(l-o)*(u-a)>=-e},pointBetween:function(r,n,i){var a=r[1]-n[1],o=i[0]-n[0],s=r[0]-n[0],l=i[1]-n[1],u=s*o+a*l;if(u-e)},pointsSameX:function(r,n){return Math.abs(r[0]-n[0])e!=s-a>e&&(o-c)*(a-f)/(s-f)+c-i>e&&(l=!l),o=c,s=f}return l}};return t}Xce.exports=aht});var Kce=ye((_or,Yce)=>{var oht={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(t===null||t===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,i=e.root.next;i!==null;){if(r(i)){t.prev=i.prev,t.next=i,i.prev.next=t,i.prev=t;return}n=i,i=i.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;n!==null&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(i){return i.prev=r,i.next=n,r.next=i,n!==null&&(n.prev=i),i}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};Yce.exports=oht});var $ce=ye((xor,Jce)=>{var PM=Kce();function sht(e,t,r){function n(v,m){return{id:r?r.segmentId():-1,start:v,end:m,myFill:{above:null,below:null},otherFill:null}}function i(v,m,b){return{id:r?r.segmentId():-1,start:v,end:m,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=PM.create();function o(v,m,b,p,k,M){var T=t.pointsCompare(m,k);return T!==0?T:t.pointsSame(b,M)?0:v!==p?v?1:-1:t.pointAboveOrOnLine(b,p?k:M,p?M:k)?1:-1}function s(v,m){a.insertBefore(v,function(b){var p=o(v.isStart,v.pt,m,b.isStart,b.pt,b.other.pt);return p<0})}function l(v,m){var b=PM.node({isStart:!0,pt:v.start,seg:v,primary:m,other:null,status:null});return s(b,v.end),b}function u(v,m,b){var p=PM.node({isStart:!1,pt:m.end,seg:m,primary:b,other:v,status:null});v.other=p,s(p,v.pt)}function c(v,m){var b=l(v,m);return u(b,v,m),b}function f(v,m){r&&r.segmentChop(v.seg,m),v.other.remove(),v.seg.end=m,v.other.pt=m,s(v.other,v.pt)}function h(v,m){var b=i(m,v.seg.end,v.seg);return f(v,m),c(b,v.primary)}function d(v,m){var b=PM.create();function p(G,Z){var j=G.seg.start,N=G.seg.end,H=Z.seg.start,ie=Z.seg.end;return t.pointsCollinear(j,H,ie)?t.pointsCollinear(N,H,ie)||t.pointAboveOrOnLine(N,H,ie)?1:-1:t.pointAboveOrOnLine(j,H,ie)?1:-1}function k(G){return b.findTransition(function(Z){var j=p(G,Z.ev);return j>0})}function M(G,Z){var j=G.seg,N=Z.seg,H=j.start,ie=j.end,ae=N.start,_e=N.end;r&&r.checkIntersection(j,N);var Ee=t.linesIntersect(H,ie,ae,_e);if(Ee===!1){if(!t.pointsCollinear(H,ie,ae)||t.pointsSame(H,_e)||t.pointsSame(ie,ae))return!1;var Ce=t.pointsSame(H,ae),ge=t.pointsSame(ie,_e);if(Ce&&ge)return Z;var re=!Ce&&t.pointBetween(H,ae,_e),Se=!ge&&t.pointBetween(ie,ae,_e);if(Ce)return Se?h(Z,ie):h(G,_e),Z;re&&(ge||(Se?h(Z,ie):h(G,_e)),h(Z,H))}else Ee.alongA===0&&(Ee.alongB===-1?h(G,ae):Ee.alongB===0?h(G,Ee.pt):Ee.alongB===1&&h(G,_e)),Ee.alongB===0&&(Ee.alongA===-1?h(Z,H):Ee.alongA===0?h(Z,Ee.pt):Ee.alongA===1&&h(Z,ie));return!1}for(var T=[];!a.isEmpty();){var L=a.getHead();if(r&&r.vert(L.pt[0]),L.isStart){let G=function(){if(C){var Z=M(L,C);if(Z)return Z}return S?M(L,S):!1};var V=G;r&&r.segmentNew(L.seg,L.primary);var x=k(L),C=x.before?x.before.ev:null,S=x.after?x.after.ev:null;r&&r.tempStatus(L.seg,C?C.seg:!1,S?S.seg:!1);var g=G();if(g){if(e){var P;L.seg.myFill.below===null?P=!0:P=L.seg.myFill.above!==L.seg.myFill.below,P&&(g.seg.myFill.above=!g.seg.myFill.above)}else g.seg.otherFill=L.seg.myFill;r&&r.segmentUpdate(g.seg),L.other.remove(),L.remove()}if(a.getHead()!==L){r&&r.rewind(L.seg);continue}if(e){var P;L.seg.myFill.below===null?P=!0:P=L.seg.myFill.above!==L.seg.myFill.below,S?L.seg.myFill.below=S.seg.myFill.above:L.seg.myFill.below=v,P?L.seg.myFill.above=!L.seg.myFill.below:L.seg.myFill.above=L.seg.myFill.below}else if(L.seg.otherFill===null){var E;S?L.primary===S.primary?E=S.seg.otherFill.above:E=S.seg.myFill.above:E=L.primary?m:v,L.seg.otherFill={above:E,below:E}}r&&r.status(L.seg,C?C.seg:!1,S?S.seg:!1),L.other.status=x.insert(PM.node({ev:L}))}else{var z=L.status;if(z===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(z.prev)&&b.exists(z.next)&&M(z.prev.ev,z.next.ev),r&&r.statusRemove(z.ev.seg),z.remove(),!L.primary){var q=L.seg.myFill;L.seg.myFill=L.seg.otherFill,L.seg.otherFill=q}T.push(L.seg)}a.getHead().remove()}return r&&r.done(),T}return e?{addRegion:function(v){for(var m,b=v[v.length-1],p=0;p{function lht(e,t,r){var n=[],i=[];return e.forEach(function(a){var o=a.start,s=a.end;if(t.pointsSame(o,s)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}r&&r.chainStart(a);var l={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},c=l;function f(V,G,Z){return c.index=V,c.matches_head=G,c.matches_pt1=Z,c===l?(c=u,!1):(c=null,!0)}for(var h=0;h{function IM(e,t,r){var n=[];return e.forEach(function(i){var a=(i.myFill.above?8:0)+(i.myFill.below?4:0)+(i.otherFill&&i.otherFill.above?2:0)+(i.otherFill&&i.otherFill.below?1:0);t[a]!==0&&n.push({id:r?r.segmentId():-1,start:i.start,end:i.end,myFill:{above:t[a]===1,below:t[a]===2},otherFill:null})}),r&&r.selected(n),n}var uht={union:function(e,t){return IM(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return IM(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return IM(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return IM(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return IM(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};tfe.exports=uht});var nfe=ye((Tor,ife)=>{var cht={toPolygon:function(e,t){function r(a){if(a.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var c=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[c]})}for(var s=o(a[0]),l=1;l{var fht=Wce(),hht=Zce(),afe=$ce(),dht=efe(),RM=rfe(),ofe=nfe(),E0=!1,DM=hht(),kp;kp={buildLog:function(e){return e===!0?E0=fht():e===!1&&(E0=!1),E0===!1?!1:E0.list},epsilon:function(e){return DM.epsilon(e)},segments:function(e){var t=afe(!0,DM,E0);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=afe(!1,DM,E0);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:RM.union(e.combined,E0),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:RM.intersect(e.combined,E0),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:RM.difference(e.combined,E0),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:RM.differenceRev(e.combined,E0),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:RM.xor(e.combined,E0),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:dht(e.segments,DM,E0),inverted:e.inverted}},polygonFromGeoJSON:function(e){return ofe.toPolygon(kp,e)},polygonToGeoJSON:function(e){return ofe.fromPolygon(kp,DM,e)},union:function(e,t){return FM(e,t,kp.selectUnion)},intersect:function(e,t){return FM(e,t,kp.selectIntersect)},difference:function(e,t){return FM(e,t,kp.selectDifference)},differenceRev:function(e,t){return FM(e,t,kp.selectDifferenceRev)},xor:function(e,t){return FM(e,t,kp.selectXor)}};function FM(e,t,r){var n=kp.segments(e),i=kp.segments(t),a=kp.combine(n,i),o=r(a);return kp.polygon(o)}typeof window=="object"&&(window.PolyBool=kp);sfe.exports=kp});var cfe=ye((Sor,ufe)=>{ufe.exports=function(t,r,n,i){var a=t[0],o=t[1],s=!1;n===void 0&&(n=0),i===void 0&&(i=r.length);for(var l=i-n,u=0,c=l-1;uo!=v>o&&a<(d-f)*(o-h)/(v-h)+f;m&&(s=!s)}return s}});var zM=ye((Mor,ffe)=>{"use strict";var EN=I6().dot,TP=fs().BADNUM,AP=ffe.exports={};AP.tester=function(t){var r=t.slice(),n=r[0][0],i=n,a=r[0][1],o=a,s;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),s=1;si||p===TP||po||m&&u(v))}function f(v,m){var b=v[0],p=v[1];if(b===TP||bi||p===TP||po)return!1;var k=r.length,M=r[0][0],T=r[0][1],L=0,x,C,S,g,P;for(x=1;xMath.max(C,M)||p>Math.max(S,T)))if(ps||Math.abs(EN(f,u))>i)return!0;return!1};AP.filter=function(t,r){var n=[t[0]],i=0,a=0;function o(l){t.push(l);var u=n.length,c=i;n.splice(a+1);for(var f=c+1;f1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:n}}});var dfe=ye((Eor,hfe)=>{"use strict";hfe.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var Ffe=ye((kor,Dfe)=>{"use strict";var vfe=lfe(),vht=cfe(),BM=Oa(),pht=So().dashStyle,qM=ka(),ght=ef(),mht=ip().makeEventData,HM=Cg(),yht=HM.freeMode,_ht=HM.rectMode,NM=HM.drawMode,PN=HM.openMode,IN=HM.selectMode,pfe=x_(),gfe=AM(),bfe=uP(),wfe=o_().clearOutline,Tfe=m_(),kN=Tfe.handleEllipse,xht=Tfe.readPaths,bht=oP().newShapes,wht=rN(),Tht=MN().activateLastSelection,MP=Pr(),Aht=MP.sorterAsc,Afe=zM(),OM=j6(),k0=df().getFromId,Sht=wM(),Mht=LM().redrawReglTraces,EP=dfe(),Lm=EP.MINSELECT,Eht=Afe.filter,RN=Afe.tester,DN=rP(),mfe=DN.p2r,kht=DN.axValue,Cht=DN.getTransform;function FN(e){return e.subplot!==void 0}function Lht(e,t,r,n,i){var a=!FN(n),o=yht(i),s=_ht(i),l=PN(i),u=NM(i),c=IN(i),f=i==="drawline",h=i==="drawcircle",d=f||h,v=n.gd,m=v._fullLayout,b=c&&m.newselection.mode==="immediate"&&a,p=m._zoomlayer,k=n.element.getBoundingClientRect(),M=n.plotinfo,T=Cht(M),L=t-k.left,x=r-k.top;m._calcInverseTransform(v);var C=MP.apply3DTransform(m._invTransform)(L,x);L=C[0],x=C[1];var S=m._invScaleX,g=m._invScaleY,P=L,E=x,z="M"+L+","+x,q=n.xaxes[0],V=n.yaxes[0],G=q._length,Z=V._length,j=e.altKey&&!(NM(i)&&l),N,H,ie,ae,_e,Ee,Ce;Mfe(e,v,n),o&&(N=Eht([[L,x]],EP.BENDPX));var ge=p.selectAll("path.select-outline-"+M.id).data([1]),re=u?m.newshape:m.newselection;u&&(n.hasText=re.label.text||re.label.texttemplate);var Se=u&&!l?re.fillcolor:"rgba(0,0,0,0)",ke=re.line.color||(a?qM.contrast(v._fullLayout.plot_bgcolor):"#7f7f7f");ge.enter().append("path").attr("class","select-outline select-outline-"+M.id).style({opacity:u?re.opacity/2:1,"stroke-dasharray":pht(re.line.dash,re.line.width),"stroke-width":re.line.width+"px","shape-rendering":"crispEdges"}).call(qM.stroke,ke).call(qM.fill,Se).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",T).attr("d",z+"Z");var be=p.append("path").attr("class","zoombox-corners").style({fill:qM.background,stroke:qM.defaultLine,"stroke-width":1}).attr("transform",T).attr("d","M0,0Z");if(u&&n.hasText){var Be=p.select(".label-temp");Be.empty()&&(Be=p.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Le=m._uid+EP.SELECTID,me=[],Pe=kP(v,n.xaxes,n.yaxes,n.subplot);b&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(a){var He=q._id,lt=V._id;Pfe(v,He,lt,Pe);for(var mt=(v.layout||{}).selections||[],Ht=[],at=!1,ct=0;ct=0){v._fullLayout._deactivateShape(v);return}if(!u){var mt=m.clickmode;OM.done(Le).then(function(){if(OM.clear(Le),He===2){for(ge.remove(),_e=0;_e-1&&Sfe(lt,v,n.xaxes,n.yaxes,n.subplot,n,ge),mt==="event"&&GM(v,void 0);ght.click(v,lt,M.id)}).catch(MP.error)}},n.doneFn=function(){be.remove(),OM.done(Le).then(function(){OM.clear(Le),!b&&ae&&n.selectionDefs&&(ae.subtract=j,n.selectionDefs.push(ae),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,ie)),(b||u)&&UM(n,b),n.doneFnCompleted&&n.doneFnCompleted(me),c&&GM(v,Ce)}).catch(MP.error)}}function Sfe(e,t,r,n,i,a,o){var s=t._hoverdata,l=t._fullLayout,u=l.clickmode,c=u.indexOf("event")>-1,f=[],h,d,v,m,b,p,k,M,T,L;if(Fht(s)){Mfe(e,t,a),h=kP(t,r,n,i);var x=zht(s,h),C=x.pointNumbers.length>0;if(C?qht(h,x):Oht(h)&&(k=_fe(x))){for(o&&o.remove(),L=0;L=0}function Dht(e){return e._fullLayout._activeSelectionIndex>=0}function UM(e,t){var r=e.dragmode,n=e.plotinfo,i=e.gd;Rht(i)&&i._fullLayout._deactivateShape(i),Dht(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout,o=a._zoomlayer,s=NM(r),l=IN(r);if(s||l){var u=o.selectAll(".select-outline-"+n.id);if(u&&i._fullLayout._outlining){var c;s&&(c=bht(u,e)),c&&BM.call("_guiRelayout",i,{shapes:c});var f;l&&!FN(e)&&(f=wht(u,e)),f&&(i._fullLayout._noEmitSelectedAtStart=!0,BM.call("_guiRelayout",i,{selections:f}).then(function(){t&&Tht(i)})),i._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function yfe(e){return e._id}function kP(e,t,r,n){if(!e.calcdata)return[];var i=[],a=t.map(yfe),o=r.map(yfe),s,l,u;for(u=0;u0,a=i?n[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(a)>-1:!1}function qht(e,t){var r=[],n,i,a,o;for(o=0;o0&&r.push(n);if(r.length===1&&(a=r[0]===t.searchInfo,a&&(i=t.searchInfo.cd[0].trace,i.selectedpoints.length===t.pointNumbers.length))){for(o=0;o1||(t+=n.selectedpoints.length,t>1)))return!1;return t===1}function VM(e,t,r){var n;for(n=0;n-1&&t;if(!o&&t){var He=xfe(e,!0);if(He.length){var lt=He[0].xref,mt=He[0].yref;if(lt&&mt){var Ht=Ife(He),at=Rfe([k0(e,lt,"x"),k0(e,mt,"y")]);at(me,Ht)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ce&&GM(e,me),h._reselect=!1}if(!o&&h._deselect){var ct=h._deselect;s=ct.xref,l=ct.yref,Uht(s,l,c)||Pfe(e,s,l,n),ce&&(me.points.length?GM(e,me):ON(e)),h._deselect=!1}return{eventData:me,selectionTesters:r}}function Nht(e){var t=e.calcdata;if(t)for(var r=0;r{"use strict";zfe.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}]});var jM=ye((Lor,qfe)=>{"use strict";qfe.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"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.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}});var Qb=ye((Ior,Nfe)=>{"use strict";var Ofe=BN(),Bfe=ec(),CP=Rh(),Wht=vl().templatedArray,Por=jM();Nfe.exports=Wht("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:Bfe({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:Ofe.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:Ofe.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",CP.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",CP.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",CP.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",CP.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:Bfe({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Pm=ye((Ror,Ufe)=>{"use strict";Ufe.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var Pg=ye((Dor,Vfe)=>{"use strict";Vfe.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var pf=ye((For,Kfe)=>{"use strict";var Gfe=vf().axisHoverFormat,{hovertemplateAttrs:Xht,texttemplateAttrs:Zht,templatefallbackAttrs:Hfe}=Ll(),jfe=Tu(),Yht=ec(),Wfe=Pd().dash,Kht=Pd().pattern,Jht=So(),$ht=Pm(),WM=Ao().extendFlat,Qht=Pg();function Xfe(e){return{valType:"any",dflt:0,editType:"calc"}}function Zfe(e){return{valType:"any",editType:"calc"}}function Yfe(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Kfe.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:Xfe("x"),yperiod:Xfe("y"),xperiod0:Zfe("x0"),yperiod0:Zfe("y0"),xperiodalignment:Yfe("x"),yperiodalignment:Yfe("y"),xhoverformat:Gfe("x"),yhoverformat:Gfe("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:Zht(),texttemplatefallback:Hfe({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:Xht({},{keys:$ht.eventDataKeys}),hovertemplatefallback:Hfe(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:WM({},Wfe,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:Qht(!0),fillgradient:WM({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:Kht,marker:WM({symbol:{valType:"enumerated",values:Jht.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:WM({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:WM({},Wfe,{arrayOk:!0}),editType:"calc"},jfe("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},jfe("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:Yht({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var NN=ye((qor,Qfe)=>{"use strict";var Jfe=Qb(),$fe=pf().line,edt=Pd().dash,LP=Ao().extendFlat,tdt=mc().overrideAll,rdt=vl().templatedArray,zor=jM();Qfe.exports=tdt(rdt("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:LP({},Jfe.xref,{}),yref:LP({},Jfe.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:$fe.color,width:LP({},$fe.width,{min:1,dflt:1}),dash:LP({},edt,{dflt:"dot"})}}),"arraydraw","from-root")});var ihe=ye((Oor,rhe)=>{"use strict";var ehe=Pr(),PP=ho(),idt=Kd(),ndt=NN(),the=x_();rhe.exports=function(t,r){idt(t,r,{name:"selections",handleItemDefaults:adt});for(var n=r.selections,i=0;i{"use strict";nhe.exports=function(t,r,n){n("newselection.mode");var i=n("newselection.line.width");i&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}});var XM=ye((Nor,lhe)=>{"use strict";var odt=Oa(),ohe=Pr(),she=df();lhe.exports=function(t){return function(n,i){var a=n[t];if(Array.isArray(a))for(var o=odt.subplotsRegistry.cartesian,s=o.idRegex,l=i._subplots,u=l.xaxis,c=l.yaxis,f=l.cartesian,h=i._has("cartesian"),d=0;d{"use strict";var uhe=MN(),ZM=Ffe();che.exports={moduleType:"component",name:"selections",layoutAttributes:NN(),supplyLayoutDefaults:ihe(),supplyDrawNewSelectionDefaults:ahe(),includeBasePlot:XM()("selections"),draw:uhe.draw,drawOne:uhe.drawOne,reselect:ZM.reselect,prepSelect:ZM.prepSelect,clearOutline:ZM.clearOutline,clearSelectionsCache:ZM.clearSelectionsCache,selectOnClick:ZM.selectOnClick}});var XN=ye((Vor,Lhe)=>{"use strict";var jN=qa(),C0=Pr(),fhe=C0.numberFormat,sdt=fd(),ldt=VL(),IP=Oa(),xhe=C0.strTranslate,udt=Zl(),hhe=ka(),w_=So(),cdt=ef(),dhe=ho(),fdt=Eg(),hdt=yv(),bhe=Cg(),RP=bhe.selectingOrDrawing,ddt=bhe.freeMode,vdt=Dh().FROM_TL,pdt=wM(),gdt=LM().redrawReglTraces,mdt=Mc(),VN=df().getFromId,ydt=qf().prepSelect,_dt=qf().clearOutline,xdt=qf().selectOnClick,UN=yN(),WN=Rh(),vhe=WN.MINDRAG,ap=WN.MINZOOM,phe=!0;function bdt(e,t,r,n,i,a,o,s){var l=e._fullLayout._zoomlayer,u=o+s==="nsew",c=(o+s).length===1,f,h,d,v,m,b,p,k,M,T,L,x,C,S,g,P,E,z,q,V,G,Z,j;r+=t.yaxis._shift;function N(){if(f=t.xaxis,h=t.yaxis,M=f._length,T=h._length,p=f._offset,k=h._offset,d={},d[f._id]=f,v={},v[h._id]=h,o&&s)for(var Et=t.overlays,pt=0;pt=0){jt._fullLayout._deactivateShape(jt);return}var or=jt._fullLayout.clickmode;if(HN(jt),Et===2&&!c&&Ue(),u)or.indexOf("select")>-1&&xdt(pt,jt,m,b,t.id,ae),or.indexOf("event")>-1&&cdt.click(jt,pt,t.id);else if(Et===1&&c){var mr=o?h:f,Ar=o==="s"||s==="w"?0:1,ei=mr._name+".range["+Ar+"]",qr=wdt(mr,Ar),jr="left",gt="middle";if(mr.fixedrange)return;o?(gt=o==="n"?"top":"bottom",mr.side==="right"&&(jr="right")):s==="e"&&(jr="right"),jt._context.showAxisRangeEntryBoxes&&jN.select(ie).call(udt.makeEditable,{gd:jt,immediate:!0,background:jt._fullLayout.paper_bgcolor,text:String(qr),fill:mr.tickfont?mr.tickfont.color:"#444",horizontalAlign:jr,verticalAlign:gt}).on("edit",function(Ge){var Je=mr.d2r(Ge);Je!==void 0&&IP.call("_guiRelayout",jt,ei,Je)})}}hdt.init(ae);var Ce,ge,re,Se,ke,be,Be,Le,me,Pe;function ce(Et,pt,jt){var or=ie.getBoundingClientRect();Ce=pt-or.left,ge=jt-or.top,e._fullLayout._calcInverseTransform(e);var mr=C0.apply3DTransform(e._fullLayout._invTransform)(Ce,ge);Ce=mr[0],ge=mr[1],re={l:Ce,r:Ce,w:0,t:ge,b:ge,h:0},Se=e._hmpixcount?e._hmlumcount/e._hmpixcount:sdt(e._fullLayout.plot_bgcolor).getLuminance(),ke="M0,0H"+M+"V"+T+"H0V0",be=!1,Be="xy",Pe=!1,Le=Ahe(l,Se,p,k,ke),me=She(l,p,k)}function He(Et,pt){if(e._transitioningWithDuration)return!1;var jt=Math.max(0,Math.min(M,Z*Et+Ce)),or=Math.max(0,Math.min(T,j*pt+ge)),mr=Math.abs(jt-Ce),Ar=Math.abs(or-ge);re.l=Math.min(Ce,jt),re.r=Math.max(Ce,jt),re.t=Math.min(ge,or),re.b=Math.max(ge,or);function ei(){Be="",re.r=re.l,re.t=re.b,me.attr("d","M0,0Z")}if(L.isSubplotConstrained)mr>ap||Ar>ap?(Be="xy",mr/M>Ar/T?(Ar=mr*T/M,ge>or?re.t=ge-Ar:re.b=ge+Ar):(mr=Ar*M/T,Ce>jt?re.l=Ce-mr:re.r=Ce+mr),me.attr("d",DP(re))):ei();else if(x.isSubplotConstrained)if(mr>ap||Ar>ap){Be="xy";var qr=Math.min(re.l/M,(T-re.b)/T),jr=Math.max(re.r/M,(T-re.t)/T);re.l=qr*M,re.r=jr*M,re.b=(1-qr)*T,re.t=(1-jr)*T,me.attr("d",DP(re))}else ei();else!S||Ar0){var Ge;if(x.isSubplotConstrained||!C&&S.length===1){for(Ge=0;Ge1&&(ei.maxallowed!==void 0&&P===(ei.range[0]1&&(qr.maxallowed!==void 0&&E===(qr.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function Adt(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function Ahe(e,t,r,n,i){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",xhe(r,n)).attr("d",i+"Z")}function She(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:hhe.background,stroke:hhe.defaultLine,"stroke-width":1,opacity:0}).attr("transform",xhe(t,r)).attr("d","M0,0Z")}function Mhe(e,t,r,n,i,a){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),Ehe(e,t,i,a)}function Ehe(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function HN(e){jN.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function khe(e){phe&&e.data&&e._context.showTips&&(C0.notifier(C0._(e,"Double-click to zoom back out"),"long",e),phe=!1)}function Sdt(e,t){return"M"+(e.l-.5)+","+(t-ap-.5)+"h-3v"+(2*ap+1)+"h3ZM"+(e.r+.5)+","+(t-ap-.5)+"h3v"+(2*ap+1)+"h-3Z"}function Mdt(e,t){return"M"+(t-ap-.5)+","+(e.t-.5)+"v-3h"+(2*ap+1)+"v3ZM"+(t-ap-.5)+","+(e.b+.5)+"v3h"+(2*ap+1)+"v-3Z"}function DP(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,ap)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function yhe(e,t,r,n,i){for(var a=!1,o={},s={},l,u,c,f,h=(i||{}).xaHash,d=(i||{}).yaHash,v=0;v{"use strict";var Edt=qa(),FP=ef(),kdt=yv(),Cdt=Eg(),Ig=XN().makeDragBox,gd=Rh().DRAGGERSIZE;zP.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){Edt.select(t).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var n=Object.keys(r._plots||{}).sort(function(a,o){if((r._plots[a].mainplot&&!0)===(r._plots[o].mainplot&&!0)){var s=a.split("y"),l=o.split("y");return s[0]===l[0]?Number(s[1]||1)-Number(l[1]||1):Number(s[0]||1)-Number(l[0]||1)}return r._plots[a].mainplot?1:-1});n.forEach(function(a){var o=r._plots[a],s=o.xaxis,l=o.yaxis;if(!o.mainplot){var u=Ig(t,o,s._offset,l._offset,s._length,l._length,"ns","ew");u.onmousemove=function(h){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===a&&t._fullLayout._plots[a]&&FP.hover(t,h,a)},FP.hover(t,h,a),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=a},u.onmouseout=function(h){t._dragging||(t._fullLayout._hoversubplot=null,kdt.unhover(t,h))},t._context.showAxisDragHandles&&(Ig(t,o,s._offset-gd,l._offset-gd,gd,gd,"n","w"),Ig(t,o,s._offset+s._length,l._offset-gd,gd,gd,"n","e"),Ig(t,o,s._offset-gd,l._offset+l._length,gd,gd,"s","w"),Ig(t,o,s._offset+s._length,l._offset+l._length,gd,gd,"s","e"))}if(t._context.showAxisDragHandles){if(a===s._mainSubplot){var c=s._mainLinePosition;s.side==="top"&&(c-=gd),Ig(t,o,s._offset+s._length*.1,c,s._length*.8,gd,"","ew"),Ig(t,o,s._offset,c,s._length*.1,gd,"","w"),Ig(t,o,s._offset+s._length*.9,c,s._length*.1,gd,"","e")}if(a===l._mainSubplot){var f=l._mainLinePosition;l.side!=="right"&&(f-=gd),Ig(t,o,f,l._offset+l._length*.1,gd,l._length*.8,"ns",""),Ig(t,o,f,l._offset+l._length*.9,gd,l._length*.1,"s",""),Ig(t,o,f,l._offset,gd,l._length*.1,"n","")}}});var i=r._hoverlayer.node();i.onmousemove=function(a){a.target=t._fullLayout._lasthover,FP.hover(t,a,r._hoversubplot)},i.onclick=function(a){a.target=t._fullLayout._lasthover,FP.click(t,a)},i.onmousedown=function(a){t._fullLayout._lasthover.onmousedown(a)},zP.updateFx(t)}};zP.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";Cdt(t._draggers,r)}});var Rhe=ye((Hor,Ihe)=>{"use strict";var Phe=Oa();Ihe.exports=function(t){for(var r=Phe.layoutArrayContainers,n=Phe.layoutArrayRegexes,i=t.split("[")[0],a,o,s=0;s{"use strict";var Ldt=Ay(),YN=P6(),YM=K1(),Pdt=V6().sorterAsc,KN=Oa();KM.containerArrayMatch=Rhe();var Idt=KM.isAddVal=function(t){return t==="add"||Ldt(t)},Dhe=KM.isRemoveVal=function(t){return t===null||t==="remove"};KM.applyContainerArrayChanges=function(t,r,n,i,a){var o=r.astr,s=KN.getComponentMethod(o,"supplyLayoutDefaults"),l=KN.getComponentMethod(o,"draw"),u=KN.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||s===YN||l===YN,f=t.layout,h=t._fullLayout;if(n[""]){Object.keys(n).length>1&&YM.warn("Full array edits are incompatible with other edits",o);var d=n[""][""];if(Dhe(d))r.set(null);else if(Array.isArray(d))r.set(d);else return YM.warn("Unrecognized full array edit value",o,d),!0;return c?!1:(s(f,h),l(t),!0)}var v=Object.keys(n).map(Number).sort(Pdt),m=r.get(),b=m||[],p=a(h,o).get(),k=[],M=-1,T=b.length,L,x,C,S,g,P,E,z;for(L=0;Lb.length-(E?0:1)){YM.warn("index out of range",o,C);continue}if(P!==void 0)g.length>1&&YM.warn("Insertion & removal are incompatible with edits to the same index.",o,C),Dhe(P)?k.push(C):E?(P==="add"&&(P={}),b.splice(C,0,P),p&&p.splice(C,0,{})):YM.warn("Unrecognized full object edit value",o,C,P),M===-1&&(M=C);else for(x=0;x=0;L--)b.splice(k[L],1),p&&p.splice(k[L],1);if(b.length?m||r.set(b):r.set(null),c)return!1;if(s(f,h),u!==YN){var q;if(M===-1)q=v;else{for(T=Math.max(b.length,T),q=[],L=0;L=M));L++)q.push(C);for(L=M;L{"use strict";var Bhe=Eo(),Nhe=Oa(),Uv=Pr(),JM=Mc(),Uhe=df(),Vhe=ka(),$M=Uhe.cleanId,Rdt=Uhe.getFromTrace,JN=Nhe.traceIs,Ddt=["x","y","z"];L0.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&Uv.log("Clearing previous rejected promises from queue."),e._promises=[]};L0.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var n=(JM.subplotsRegistry.cartesian||{}).attrRegex,i=(JM.subplotsRegistry.polar||{}).attrRegex,a=(JM.subplotsRegistry.ternary||{}).attrRegex,o=(JM.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(e);for(t=0;t3?(b.x=1.02,b.xanchor="left"):b.x<-2&&(b.x=-.02,b.xanchor="right"),b.y>3?(b.y=1.02,b.yanchor="bottom"):b.y<-2&&(b.y=-.02,b.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),Vhe.clean(e),e.template&&e.template.layout&&L0.cleanLayout(e.template.layout),e};function sT(e,t,r=!1){var n=e[t],i=t.charAt(0);r&&Array.isArray(n)||n&&n!=="paper"&&(e[t]=$M(n,i,!0))}L0.cleanData=function(e){for(var t=0;t0)return e.slice(0,t)}L0.hasParent=function(e,t){for(var r=Ohe(t);r;){if(r in e)return!0;r=Ohe(r)}return!1};L0.clearAxisTypes=function(e,t,r){for(var n=0;n{let r=(...n)=>n.every(i=>Uv.isPlainObject(i))||n.every(i=>Array.isArray(i));if([e,t].every(n=>Array.isArray(n))){if(e.length!==t.length)return!1;for(let n=0;nUv.isPlainObject(n))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){if(n.startsWith("_"))continue;let i=e[n],a=t[n];if(i!==a&&!(r(i,a)?$N(i,a):!1))return!1}return!0}return!1};L0.collectionsAreEqual=$N});var YP=ye(_l=>{"use strict";var NP=qa(),qdt=Eo(),Odt=cO(),Sa=Pr(),Ec=Sa.nestedProperty,tU=L3(),op=Mne(),P0=Oa(),XP=R3(),Qo=Mc(),Vv=ho(),Bdt=MB(),Ndt=Rd(),QN=So(),Udt=ka(),Vdt=ZN().initInteractions,Gdt=Wp(),Hdt=qf().clearOutline,Zhe=xb().dfltConfig,OP=Fhe(),gh=Ghe(),Au=LM(),T_=mc(),jdt=Rh().AX_NAME_PATTERN,eU=0,Hhe=5;function Wdt(e,t,r,n){var i;if(e=Sa.getGraphDiv(e),tU.init(e),Sa.isPlainObject(t)){var a=t;t=a.data,r=a.layout,n=a.config,i=a.frames}var o=tU.triggerHandler(e,"plotly_beforeplot",[t,r,n]);if(o===!1)return Promise.reject();!t&&!r&&!Sa.isPlotDiv(e)&&Sa.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function s(){if(i)return _l.addFrames(e,i)}Khe(e,n),r||(r={}),NP.select(e).classed("js-plotly-plot",!0),QN.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(gh.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=gh.cleanLayout(r)),Qo.supplyDefaults(e);var u=e._fullLayout,c=u._has("cartesian");u._replotting=!0,(l||u._shouldCreateBgLayer)&&(pvt(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),QN.initGradients(e),QN.initPatterns(e),l&&Vv.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&Qo.doCalcdata(e);for(var h=0;h=e.data.length||i<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(i,n+1)>-1||i>=0&&t.indexOf(-e.data.length+i)>-1||i<0&&t.indexOf(e.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function Jhe(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),VP(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&VP(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function Jdt(e,t,r){var n,i;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&c=0&&c0&&typeof S.parts[E]!="string";)E--;var z=S.parts[E],q=S.parts[E-1]+"."+z,V=S.parts.slice(0,E).join("."),G=Ec(e.layout,V).get(),Z=Ec(n,V).get(),j=S.get();if(g!==void 0){p[C]=g,k[C]=z==="reverse"?g:zy(j);var N=XP.getLayoutValObject(n,S.parts);if(N&&N.impliedEdits&&g!==null)for(var H in N.impliedEdits)M(Sa.relativeAttr(C,H),N.impliedEdits[H]);if(["width","height"].indexOf(C)!==-1)if(g){M("autosize",null);var ie=C==="height"?"width":"height";M(ie,n[ie])}else n[C]=e._initialAutoSize[C];else if(C==="autosize")M("width",g?null:n.width),M("height",g?null:n.height);else if(q.match(ode))x(q),Ec(n,V+"._inputRange").set(null);else if(q.match(sde)){x(q),Ec(n,V+"._inputRange").set(null);var ae=Ec(n,V).get();ae._inputDomain&&(ae._input.domain=ae._inputDomain.slice())}else q.match(tvt)&&Ec(n,V+"._inputDomain").set(null);if(z==="type"){L=G;var _e=Z.type==="linear"&&g==="log",Ee=Z.type==="log"&&g==="linear";if(_e||Ee){if(!L||!L.range)M(V+".autorange",!0);else if(Z.autorange)_e&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var Ce=L.range[0],ge=L.range[1];_e?(Ce<=0&&ge<=0&&M(V+".autorange",!0),Ce<=0?Ce=ge/1e6:ge<=0&&(ge=Ce/1e6),M(V+".range[0]",Math.log(Ce)/Math.LN10),M(V+".range[1]",Math.log(ge)/Math.LN10)):(M(V+".range[0]",Math.pow(10,Ce)),M(V+".range[1]",Math.pow(10,ge)))}Array.isArray(n._subplots.polar)&&n._subplots.polar.length&&n[S.parts[0]]&&S.parts[1]==="radialaxis"&&delete n[S.parts[0]]._subplot.viewInitial["radialaxis.range"],P0.getComponentMethod("annotations","convertCoords")(e,Z,g,M),P0.getComponentMethod("images","convertCoords")(e,Z,g,M)}else M(V+".autorange",!0),M(V+".range",null);Ec(n,V+"._inputRange").set(null)}else if(z.match(jdt)){var re=Ec(n,C).get(),Se=(g||{}).type;(!Se||Se==="-")&&(Se="linear"),P0.getComponentMethod("annotations","convertCoords")(e,re,Se,M),P0.getComponentMethod("images","convertCoords")(e,re,Se,M)}var ke=OP.containerArrayMatch(C);if(ke){c=ke.array,f=ke.index;var be=ke.property,Be=N||{editType:"calc"};f!==""&&be===""&&(OP.isAddVal(g)?k[C]=null:OP.isRemoveVal(g)?k[C]=(Ec(r,c).get()||[])[f]:Sa.warn("unrecognized full object value",t)),T_.update(b,Be),u[c]||(u[c]={});var Le=u[c][f];Le||(Le=u[c][f]={}),Le[be]=g,delete t[C]}else z==="reverse"?(G.range?G.range.reverse():(M(V+".autorange",!0),G.range=[1,0]),Z.autorange?b.calc=!0:b.plot=!0):(C==="dragmode"&&(g===!1&&j!==!1||g!==!1&&j===!1)||n._has("scatter-like")&&n._has("regl")&&C==="dragmode"&&(g==="lasso"||g==="select")&&!(j==="lasso"||j==="select")?b.plot=!0:N?T_.update(b,N):b.calc=!0,S.set(g))}}for(c in u){var me=OP.applyContainerArrayChanges(e,a(r,c),u[c],b,a);me||(b.plot=!0)}for(var Pe in T){L=Vv.getFromId(e,Pe);var ce=L&&L._constraintGroup;if(ce){b.calc=!0;for(var He in ce)T[He]||(Vv.getFromId(e,He)._constraintShrinkable=!0)}}(ude(e)||t.height||t.width)&&(b.plot=!0);var lt=n.shapes;for(f=0;f1;)if(n.pop(),r=Ec(t,n.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function nvt(e,t){for(var r=0;r[V,e._ev.listeners(V)]);a=_l.newPlot(e,t,r,n).then(()=>{for(let[V,G]of q)G.forEach(Z=>e.on(V,Z));return _l.react(e,t,r,n)})}else{e.data=t||[],gh.cleanData(e.data),e.layout=r||{},gh.cleanLayout(e.layout),ovt(e.data,e.layout,s,l),Qo.supplyDefaults(e,{skipUpdateCalc:!0});var f=e._fullData,h=e._fullLayout,d=h.datarevision===void 0,v=h.transition,m=uvt(e,l,h,d,v),b=m.newDataRevision,p=lvt(e,s,f,d,v,b);if(ude(e)&&(m.layoutReplot=!0),p.calc||m.calc){e.calcdata=void 0;for(var k=Object.getOwnPropertyNames(h),M=0;M(c||e.emit("plotly_react",{config:n,data:t,layout:r}),e))}function lvt(e,t,r,n,i,a){var o=t.length===r.length;if(!i&&!o)return{fullReplot:!0,calc:!0};var s=T_.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var l,u;function c(d){var v=XP.getTraceValObject(u,d);return!u._module.animatable&&v.anim&&(v.anim=!1),v}var f={getValObject:c,flags:s,immutable:n,transition:i,newDataRevision:a,gd:e},h={};for(l=0;l=i.length?i[0]:i[u]:i}function s(u){return Array.isArray(a)?u>=a.length?a[0]:a[u]:a}function l(u,c){var f=0;return function(){if(u&&++f===c)return u()}}return new Promise(function(u,c){function f(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var z=n._frameQueue.pop();z.onInterrupt&&z.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(z){if(z.length!==0){for(var q=0;qn._timeToNext&&v()};z()}var b=0;function p(z){return Array.isArray(i)?b>=i.length?z.transitionOpts=i[b]:z.transitionOpts=i[0]:z.transitionOpts=i,b++,z}var k,M,T=[],L=t==null,x=Array.isArray(t),C=!L&&!x&&Sa.isPlainObject(t);if(C)T.push({type:"object",data:p(Sa.extendFlat({},t))});else if(L||["string","number"].indexOf(typeof t)!==-1)for(k=0;k0&&PP)&&E.push(M);T=E}}T.length>0?h(T):(e.emit("plotly_animated"),u())})}function fvt(e,t,r){if(e=Sa.getGraphDiv(e),t==null)return Promise.resolve();if(!Sa.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,i,a,o,s=e._transitionData._frames,l=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var u=s.length+t.length*2,c=[],f={};for(n=t.length-1;n>=0;n--)if(Sa.isPlainObject(t[n])){var h=t[n].name,d=(l[h]||f[h]||{}).name,v=t[n].name,m=l[d]||f[d];d&&v&&typeof v=="number"&&m&&eUS.index?-1:C.index=0;n--){if(i=c[n].frame,typeof i.name=="number"&&Sa.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;l[i.name="frame "+e._transitionData._counter++];);if(l[i.name]){for(a=0;a=0;r--)n=t[r],a.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:i[n]});var s=Qo.modifyFrames,l=Qo.modifyFrames,u=[e,o],c=[e,a];return op&&op.add(e,s,u,l,c),Qo.modifyFrames(e,a)}function dvt(e){e=Sa.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return Qo.cleanPlot([],{},r,t),Qo.purge(e),tU.purge(e),t._container&&t._container.remove(),delete e._context,e}function vvt(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!Sa.equalDomRects(r,t._lastBBox)){var n=t._invTransform=Sa.inverseTransformMatrix(Sa.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),t._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),t._lastBBox=r}}function pvt(e){var t=NP.select(e),r=e._fullLayout;if(r._calcInverseTransform=vvt,r._calcInverseTransform(e),r._container=t.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var n={};NP.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),r._uid=Sa.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(Gdt.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var i=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=i.append("g").classed("imagelayer",!0),r._shapeLowerLayer=i.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var a=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=a.append("g").classed("imagelayer",!0),r._shapeUpperLayer=a.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}_l.animate=cvt;_l.addFrames=fvt;_l.deleteFrames=hvt;_l.addTraces=rde;_l.deleteTraces=ide;_l.extendTraces=ede;_l.moveTraces=rU;_l.prependTraces=tde;_l.newPlot=Kdt;_l._doPlot=Wdt;_l.purge=dvt;_l.react=svt;_l.redraw=Ydt;_l.relayout=QM;_l.restyle=GP;_l.setPlotConfig=Xdt;_l.update=jP;_l._guiRelayout=iU(QM);_l._guiRestyle=iU(GP);_l._guiUpdate=iU(jP);_l._storeDirectGUIEdit=evt});var qy=ye(Im=>{"use strict";var gvt=Oa();Im.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Im.getRedrawFunc=function(e){return function(){gvt.getComponentMethod("colorbar","draw")(e)}};Im.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Im.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var cde=window.URL||window.webkitURL;Im.createObjectURL=function(e){return cde.createObjectURL(e)};Im.revokeObjectURL=function(e){return cde.revokeObjectURL(e)};Im.createBlob=function(e,t){if(t==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(t==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=mvt(window.atob(e));return new window.Blob([r],{type:"image/"+t})};Im.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function mvt(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i{"use strict";var aU=qa(),Yor=Pr(),yvt=So(),_vt=ka(),Kor=Wp(),nU=/"/g,t4="TOBESTRIPPED",xvt=new RegExp('("'+t4+")|("+t4+'")',"g");function bvt(e){var t=aU.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,function(n){return n==="<"?"<":n==="&rt;"?">":n.indexOf("<")!==-1||n.indexOf(">")!==-1?"":t.html(n).text()});return t.remove(),r}function wvt(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}fde.exports=function(t,r,n){var i=t._fullLayout,a=i._paper,o=i._toppaper,s=i.width,l=i.height,u;a.insert("rect",":first-child").call(yvt.setRect,0,0,s,l).call(_vt.fill,i.paper_bgcolor);var c=i._basePlotModules||[];for(u=0;u{"use strict";var Tvt=Pr(),Avt=Sb().EventEmitter,r4=qy();function Svt(e){var t=e.emitter||new Avt,r=new Promise(function(n,i){var a=window.Image,o=e.svg,s=e.format||"png",l=e.canvas,u=e.scale||1,c=e.width||300,f=e.height||150,h=u*c,d=u*f,v=l.getContext("2d",{willReadFrequently:!0}),m=new a,b,p;s==="svg"||Tvt.isSafari()?p=r4.encodeSVG(o):(b=r4.createBlob(o,"svg"),p=r4.createObjectURL(b)),l.width=h,l.height=d,m.onload=function(){var k;switch(b=null,r4.revokeObjectURL(p),s!=="svg"&&v.drawImage(m,0,0,h,d),s){case"jpeg":k=l.toDataURL("image/jpeg");break;case"png":k=l.toDataURL("image/png");break;case"webp":k=l.toDataURL("image/webp");break;case"svg":k=p;break;default:var M="Image format is not jpeg, png, svg or webp.";if(i(new Error(M)),!e.promise)return t.emit("error",M)}n(k),e.promise||t.emit("success",k)},m.onerror=function(k){if(b=null,r4.revokeObjectURL(p),i(k),!e.promise)return t.emit("error",k)},m.src=p});return e.promise?r:t}hde.exports=Svt});var sU=ye((Qor,pde)=>{"use strict";var dde=Eo(),vde=YP(),Mvt=Mc(),Rm=Pr(),i4=qy(),Evt=KP(),kvt=JP(),Cvt=m6().version,oU={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function Lvt(e,t){t=t||{};var r,n,i,a;Rm.isPlainObject(e)?(r=e.data||[],n=e.layout||{},i=e.config||{},a={}):(e=Rm.getGraphDiv(e),r=Rm.extendDeep([],e.data),n=Rm.extendDeep({},e.layout),i=e._context,a=e._fullLayout||{});function o(x){return!(x in t)||Rm.validate(t[x],oU[x])}if(!o("width")&&t.width!==null||!o("height")&&t.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+Rm.join2(oU.format.values,", "," or ")+".");var s={};function l(x,C){return Rm.coerce(t,s,oU,x,C)}var u=l("format"),c=l("width"),f=l("height"),h=l("scale"),d=l("setBackground"),v=l("imageDataOnly"),m=document.createElement("div");m.style.position="absolute",m.style.left="-5000px",document.body.appendChild(m);var b=Rm.extendFlat({},n);c?b.width=c:t.width===null&&dde(a.width)&&(b.width=a.width),f?b.height=f:t.height===null&&dde(a.height)&&(b.height=a.height);var p=Rm.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),k=i4.getRedrawFunc(m);function M(){return new Promise(function(x){setTimeout(x,i4.getDelay(m._fullLayout))})}function T(){return new Promise(function(x,C){var S=Evt(m,u,h),g=m._fullLayout.width,P=m._fullLayout.height;function E(){vde.purge(m),document.body.removeChild(m)}if(u==="full-json"){var z=Mvt.graphJson(m,!1,"keepdata","object",!0,!0);return z.version=Cvt,z=JSON.stringify(z),E(),x(v?z:i4.encodeJSON(z))}if(E(),u==="svg")return x(v?S:i4.encodeSVG(S));var q=document.createElement("canvas");q.id=Rm.randstr(),kvt({format:u,width:g,height:P,scale:h,canvas:q,svg:S,promise:!0}).then(x).catch(C)})}function L(x){return v?x.replace(i4.IMAGE_URL_PREFIX,""):x}return new Promise(function(x,C){vde.newPlot(m,r,b,p).then(k).then(M).then(T).then(function(S){x(L(S))}).catch(function(S){C(S)})})}pde.exports=Lvt});var yde=ye((esr,mde)=>{"use strict";var I0=Pr(),Pvt=Mc(),Ivt=R3(),Rvt=xb().dfltConfig,Rg=I0.isPlainObject,t2=Array.isArray,lU=I0.isArrayOrTypedArray;mde.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=Ivt.get(),i=[],a={_context:I0.extendFlat({},Rvt)},o,s;t2(t)?(a.data=I0.extendDeep([],t),o=t):(a.data=[],o=[],i.push(md("array","data"))),Rg(r)?(a.layout=I0.extendDeep({},r),s=r):(a.layout={},s={},arguments.length>1&&i.push(md("object","layout"))),Pvt.supplyDefaults(a);for(var l=a._fullData,u=o.length,c=0;cf.length&&n.push(md("unused",i,u.concat(f.length)));var p=f.length,k=Array.isArray(b);k&&(p=Math.min(p,b.length));var M,T,L,x,C;if(h.dimensions===2)for(T=0;Tf[T].length&&n.push(md("unused",i,u.concat(T,f[T].length)));var S=f[T].length;for(M=0;M<(k?Math.min(S,b[T].length):S);M++)L=k?b[T][M]:b,x=c[T][M],C=f[T][M],I0.validate(x,L)?C!==x&&C!==+x&&n.push(md("dynamic",i,u.concat(T,M),x,C)):n.push(md("value",i,u.concat(T,M),x))}else n.push(md("array",i,u.concat(T),c[T]));else for(T=0;T{"use strict";var Nvt=Pr(),QP=qy();function Uvt(e,t,r){var n=document.createElement("a"),i="download"in n,a=new Promise(function(o,s){var l,u;if(i)return l=QP.createBlob(e,r),u=QP.createObjectURL(l),n.href=u,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),QP.revokeObjectURL(u),l=null,o(t);if(Nvt.isSafari()){var c=r==="svg"?",":";base64,";return QP.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return a}_de.exports=Uvt});var uU=ye((isr,wde)=>{"use strict";var bde=Pr(),Vvt=sU(),Gvt=xde(),rsr=qy();function Hvt(e,t){var r;return bde.isPlainObject(e)||(r=bde.getGraphDiv(e)),t=t||{},t.format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(n,i){r&&r._snapshotInProgress&&i(new Error("Snapshotting already in progress.")),r&&(r._snapshotInProgress=!0);var a=Vvt(e,t),o=t.filename||e.fn||"newplot";o+="."+t.format.replace("-","."),a.then(function(s){return r&&(r._snapshotInProgress=!1),Gvt(s,o,t.format)}).then(function(s){n(s)}).catch(function(s){r&&(r._snapshotInProgress=!1),i(s)})})}wde.exports=Hvt});var Ede=ye(cU=>{"use strict";var Cp=Pr(),Lp=Cp.isPlainObject,Tde=R3(),Ade=Mc(),jvt=Gl(),Sde=vl(),Mde=xb().dfltConfig;cU.makeTemplate=function(e){e=Cp.isPlainObject(e)?e:Cp.getGraphDiv(e),e=Cp.extendDeep({_context:Mde},{data:e.data,layout:e.layout}),Ade.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var n={data:{},layout:{}};t.forEach(function(d){var v={};n4(d,v,Xvt.bind(null,d));var m=Cp.coerce(d,{},jvt,"type"),b=n.data[m];b||(b=n.data[m]=[]),b.push(v)}),n4(r,n.layout,Wvt.bind(null,r)),delete n.layout.template;var i=r.template;if(Lp(i)){var a=i.layout,o,s,l,u,c,f;Lp(a)&&eI(a,n.layout);var h=i.data;if(Lp(h)){for(s in n.data)if(l=h[s],Array.isArray(l)){for(c=n.data[s],f=c.length,u=l.length,o=0;op?o.push({code:"unused",traceType:d,templateCount:b,dataCount:p}):p>b&&o.push({code:"reused",traceType:d,templateCount:b,dataCount:p})}}function k(M,T){for(var L in M)if(L.charAt(0)!=="_"){var x=M[L],C=R0(M,L,T);Lp(x)?(Array.isArray(M)&&x._template===!1&&x.templateitemname&&o.push({code:"missing",path:C,templateitemname:x.templateitemname}),k(x,C)):Array.isArray(x)&&Zvt(x)&&k(x,C)}}if(k({data:l,layout:s},""),o.length)return o.map(Yvt)};function Zvt(e){for(var t=0;t{"use strict";var rd=YP();tf._doPlot=rd._doPlot;tf.newPlot=rd.newPlot;tf.restyle=rd.restyle;tf.relayout=rd.relayout;tf.redraw=rd.redraw;tf.update=rd.update;tf._guiRestyle=rd._guiRestyle;tf._guiRelayout=rd._guiRelayout;tf._guiUpdate=rd._guiUpdate;tf._storeDirectGUIEdit=rd._storeDirectGUIEdit;tf.react=rd.react;tf.extendTraces=rd.extendTraces;tf.prependTraces=rd.prependTraces;tf.addTraces=rd.addTraces;tf.deleteTraces=rd.deleteTraces;tf.moveTraces=rd.moveTraces;tf.purge=rd.purge;tf.addFrames=rd.addFrames;tf.deleteFrames=rd.deleteFrames;tf.animate=rd.animate;tf.setPlotConfig=rd.setPlotConfig;var Kvt=jS().getGraphDiv,Jvt=vP().eraseActiveShape;tf.deleteActiveShape=function(e){return Jvt(Kvt(e))};tf.toImage=sU();tf.validate=yde();tf.downloadImage=uU();var kde=Ede();tf.makeTemplate=kde.makeTemplate;tf.validateTemplate=kde.validateTemplate});var lT=ye((osr,Lde)=>{"use strict";var fU=Pr(),$vt=Oa();Lde.exports=function(t,r,n,i){var a=i("x"),o=i("y"),s,l=$vt.getComponentMethod("calendars","handleTraceDefaults");if(l(t,r,["x","y"],n),a){var u=fU.minRowLength(a);o?s=Math.min(u,fU.minRowLength(o)):(s=u,i("y0"),i("dy"))}else{if(!o)return 0;s=fU.minRowLength(o),i("x0"),i("dx")}return r._length=s,s}});var Dg=ye((ssr,Rde)=>{"use strict";var Pde=Pr().dateTick0,Qvt=fs(),ept=Qvt.ONEWEEK;function Ide(e,t){return e%ept===0?Pde(t,1):Pde(t,0)}Rde.exports=function(t,r,n,i,a){if(a||(a={x:!0,y:!0}),a.x){var o=i("xperiod");o&&(i("xperiod0",Ide(o,r.xcalendar)),i("xperiodalignment"))}if(a.y){var s=i("yperiod");s&&(i("yperiod0",Ide(s,r.ycalendar)),i("yperiodalignment"))}}});var zde=ye((lsr,Fde)=>{"use strict";var Dde=["orientation","groupnorm","stackgaps"];Fde.exports=function(t,r,n,i){var a=n._scatterStackOpts,o=i("stackgroup");if(o){var s=r.xaxis+r.yaxis,l=a[s];l||(l=a[s]={});var u=l[o],c=!1;u?u.traces.push(r):(u=l[o]={traceIndices:[],traces:[r]},c=!0);for(var f={orientation:r.x&&!r.y?"h":"v"},h=0;h{"use strict";var qde=ka(),Ode=pv().hasColorscale,Bde=td(),tpt=Ru();Nde.exports=function(t,r,n,i,a,o={}){var s=tpt.isBubble(t),l=(t.line||{}).color,u;if(l&&(n=l),a("marker.symbol"),a("marker.opacity",s?.7:1),a("marker.size"),o.noAngle||(a("marker.angle"),o.noAngleRef||a("marker.angleref"),o.noStandOff||a("marker.standoff")),a("marker.color",n),Ode(t,"marker")&&Bde(t,r,i,a,{prefix:"marker.",cLetter:"c"}),o.noSelect||(a("selected.marker.color"),a("unselected.marker.color"),a("selected.marker.size"),a("unselected.marker.size")),o.noLine||(l&&!Array.isArray(l)&&r.marker.color!==l?u=l:s?u=qde.background:u=qde.defaultLine,a("marker.line.color",u),Ode(t,"marker.line")&&Bde(t,r,i,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width",s?1:0),o.noLineDash||a("marker.line.dash")),s&&(a("marker.sizeref"),a("marker.sizemin"),a("marker.sizemode")),o.gradient){var c=a("marker.gradient.type");c!=="none"&&a("marker.gradient.color")}}});var D0=ye((csr,Ude)=>{"use strict";var rpt=Pr().isArrayOrTypedArray,ipt=pv().hasColorscale,npt=td();Ude.exports=function(t,r,n,i,a,o){o||(o={});var s=(t.marker||{}).color;if(s&&s._inputArray&&(s=s._inputArray),a("line.color",n),ipt(t,"line"))npt(t,r,i,a,{prefix:"line.",cLetter:"c"});else{var l=(rpt(s)?!1:s)||n;a("line.color",l)}a("line.width"),o.noDash||a("line.dash"),o.backoff&&a("line.backoff")}});var uT=ye((fsr,Vde)=>{"use strict";Vde.exports=function(t,r,n){var i=n("line.shape");i==="spline"&&n("line.smoothing")}});var F0=ye((hsr,Gde)=>{"use strict";var apt=Pr();Gde.exports=function(e,t,r,n,i){i=i||{},n("textposition"),apt.coerceFont(n,"textfont",i.font||r.font,i),i.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var Fg=ye((dsr,jde)=>{"use strict";var rI=ka(),Hde=Pr().isArrayOrTypedArray;function opt(e){for(var t=rI.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var Wde=Pr(),spt=Oa(),lpt=pf(),upt=Pm(),cT=Ru(),cpt=lT(),fpt=Dg(),hpt=zde(),dpt=$p(),vpt=D0(),Xde=uT(),ppt=F0(),gpt=Fg(),mpt=Pr().coercePattern;Zde.exports=function(t,r,n,i){function a(d,v){return Wde.coerce(t,r,lpt,d,v)}var o=cpt(t,r,i,a);if(o||(r.visible=!1),!!r.visible){fpt(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("zorder");var s=hpt(t,r,i,a);i.scattermode==="group"&&r.orientation===void 0&&a("orientation","v");var l=!s&&o{"use strict";var ypt=$b().getAxisGroup;Kde.exports=function(t,r,n,i,a){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],l=ypt(n,s)+o,u=n._alignmentOpts||{},c=i("alignmentgroup"),f=u[l];f||(f=u[l]={});var h=f[c];h?h.traces.push(r):h=f[c]={traces:[r],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var d=i("offsetgroup")||"",v=h.offsetGroups,m=v[d];r._offsetIndex=0,(a!=="group"||d)&&(m||(m=v[d]={offsetIndex:Object.keys(v).length}),r._offsetIndex=m.offsetIndex)}});var hU=ye((gsr,Jde)=>{"use strict";var _pt=Pr(),xpt=r2(),bpt=pf();Jde.exports=function(t,r){var n,i,a,o=r.scattermode;function s(h){return _pt.coerce(i._input,i,bpt,h)}if(r.scattermode==="group")for(a=0;a=0;c--){var f=t[c];if(f.type==="scatter"&&f.xaxis===l.xaxis&&f.yaxis===l.yaxis){f.opacity=void 0;break}}}}}});var Qde=ye((msr,$de)=>{"use strict";var wpt=Pr(),Tpt=rL();$de.exports=function(e,t){function r(i,a){return wpt.coerce(e,t,Tpt,i,a)}var n=t.barmode==="group";t.scattermode==="group"&&r("scattergap",n?t.bargap:.2)}});var zg=ye((ysr,tve)=>{"use strict";var Apt=Eo(),eve=Pr(),Spt=eve.dateTime2ms,iI=eve.incrementMonth,Mpt=fs(),Ept=Mpt.ONEAVGMONTH;tve.exports=function(t,r,n,i){if(r.type!=="date")return{vals:i};var a=t[n+"periodalignment"];if(!a)return{vals:i};var o=t[n+"period"],s;if(Apt(o)){if(o=+o,o<=0)return{vals:i}}else if(typeof o=="string"&&o.charAt(0)==="M"){var l=+o.substring(1);if(l>0&&Math.round(l)===l)s=l;else return{vals:i}}for(var u=r.calendar,c=a==="start",f=a==="end",h=t[n+"period0"],d=Spt(h,u)||0,v=[],m=[],b=[],p=i.length,k=0;kM;)x=iI(x,-s,u);for(;x<=M;)x=iI(x,s,u);L=iI(x,-s,u)}else{for(T=Math.round((M-d)/o),x=d+T*o;x>M;)x-=o;for(;x<=M;)x+=o;L=x-o}v[k]=c?L:f?x:(L+x)/2,m[k]=L,b[k]=x}return{vals:v,starts:m,ends:b}}});var z0=ye((_sr,ive)=>{"use strict";var dU=pv().hasColorscale,vU=gv(),rve=Ru();ive.exports=function(t,r){rve.hasLines(r)&&dU(r,"line")&&vU(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),rve.hasMarkers(r)&&(dU(r,"marker")&&vU(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),dU(r,"marker.line")&&vU(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var Dm=ye((xsr,nve)=>{"use strict";var Of=Pr();nve.exports=function(t,r){for(var n=0;n{"use strict";var ave=Pr();ove.exports=function(t,r){ave.isArrayOrTypedArray(r.selectedpoints)&&ave.tagSelected(t,r)}});var O0=ye((wsr,dve)=>{"use strict";var sve=Eo(),gU=Pr(),a4=ho(),lve=zg(),pU=fs().BADNUM,mU=Ru(),kpt=z0(),Cpt=Dm(),Lpt=q0();function Ppt(e,t){var r=e._fullLayout,n=t._xA=a4.getFromId(e,t.xaxis||"x","x"),i=t._yA=a4.getFromId(e,t.yaxis||"y","y"),a=n.makeCalcdata(t,"x"),o=i.makeCalcdata(t,"y"),s=lve(t,n,"x",a),l=lve(t,i,"y",o),u=s.vals,c=l.vals,f=t._length,h=new Array(f),d=t.ids,v=yU(t,r,n,i),m=!1,b,p,k,M,T,L;fve(r,t);var x="x",C="y",S;if(v)gU.pushUnique(v.traceIndices,t.index),b=v.orientation==="v",b?(C="s",S="x"):(x="s",S="y"),T=v.stackgaps==="interpolate";else{var g=cve(t,f);uve(e,t,n,i,u,c,g)}var P=!!t.xperiodalignment,E=!!t.yperiodalignment;for(p=0;pp&&h[M].gap;)M--;for(L=h[M].s,k=h.length-1;k>M;k--)h[k].s=L;for(;p{"use strict";vve.exports=nI;var Ipt=Pr().distinctVals;function nI(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,n=t.posAxis._id.charAt(0),i=[],a=0;a{"use strict";gve.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var i2=ye((Ssr,xve)=>{"use strict";var B0=Eo(),{isArrayOrTypedArray:Oy}=Pr(),{BADNUM:fT}=fs(),Rpt=Oa(),o4=ho(),{getAxisGroup:Dpt}=$b(),aI=pve(),{TEXTPAD:Fpt}=A_(),{LINE_SPACING:zpt}=Dh(),{BR_TAG_ALL:qpt}=Zl();function Opt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;ul+o||!B0(s))}for(var c=0;cn(a))):n(e.text);let i=e.outsidetextfont.size*zpt*r+Fpt;return{ppadplus:t.some(a=>a.s<0)?i:0,ppadminus:t.some(a=>a.s>=0)?i:0}}return{ppadplus:void 0,ppadminus:void 0}}function Zpt(e,t,r,n){for(var i=hT(n),a=0;a{"use strict";var bve=O0(),wve=i2().setGroupPositions;function Kpt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;ug[c]&&c{"use strict";var $pt=So(),kve=fs(),s4=kve.BADNUM,Cve=kve.LOG_CLIP,Sve=Cve+.5,Mve=Cve-.5,oI=Pr(),Qpt=oI.segmentsIntersect,Eve=oI.constrain,SU=Pm();Lve.exports=function(t,r){var n=r.trace||{},i=r.xaxis,a=r.yaxis,o=i.type==="log",s=a.type==="log",l=i._length,u=a._length,c=r.backoff,f=n.marker,h=r.connectGaps,d=r.baseTolerance,v=r.shape,m=v==="linear",b=n.fill&&n.fill!=="none",p=[],k=SU.minTolerance,M=t.length,T=new Array(M),L=0,x,C,S,g,P,E,z,q,V,G,Z,j,N,H,ie,ae;function _e(gt){var Ge=t[gt];if(!Ge)return!1;var Je=r.linearized?i.l2p(Ge.x):i.c2p(Ge.x),We=r.linearized?a.l2p(Ge.y):a.c2p(Ge.y);if(Je===s4){if(o&&(Je=i.c2p(Ge.x,!0)),Je===s4)return!1;s&&We===s4&&(Je*=Math.abs(i._m*u*(i._m>0?Sve:Mve)/(a._m*l*(a._m>0?Sve:Mve)))),Je*=1e3}if(We===s4){if(s&&(We=a.c2p(Ge.y,!0)),We===s4)return!1;We*=1e3}return[Je,We]}function Ee(gt,Ge,Je,We){var et=Je-gt,xt=We-Ge,At=.5-gt,Kt=.5-Ge,Qt=et*et+xt*xt,Mr=et*At+xt*Kt;if(Mr>0&&Mr1||Math.abs(At.y-Je[0][1])>1)&&(At=[At.x,At.y],We&&Se(At,gt)Be||gt[1]me)return[Eve(gt[0],be,Be),Eve(gt[1],Le,me)]}function Vt(gt,Ge){if(gt[0]===Ge[0]&&(gt[0]===be||gt[0]===Be)||gt[1]===Ge[1]&&(gt[1]===Le||gt[1]===me))return!0}function rr(gt,Ge){var Je=[],We=ar(gt),et=ar(Ge);return We&&et&&Vt(We,et)||(We&&Je.push(We),et&&Je.push(et)),Je}function tt(gt,Ge,Je){return function(We,et){var xt=ar(We),At=ar(et),Kt=[];if(xt&&At&&Vt(xt,At))return Kt;xt&&Kt.push(xt),At&&Kt.push(At);var Qt=2*oI.constrain((We[gt]+et[gt])/2,Ge,Je)-((xt||We)[gt]+(At||et)[gt]);if(Qt){var Mr;xt&&At?Mr=Qt>0==xt[gt]>At[gt]?xt:At:Mr=xt||At,Mr[gt]+=Qt}return Kt}}var je;v==="linear"||v==="spline"?je=ct:v==="hv"||v==="vh"?je=rr:v==="hvh"?je=tt(0,be,Be):v==="vhv"&&(je=tt(1,Le,me));function Ue(gt,Ge){var Je=Ge[0]-gt[0],We=(Ge[1]-gt[1])/Je,et=(gt[1]*Ge[0]-Ge[1]*gt[0])/Je;return et>0?[We>0?be:Be,me]:[We>0?Be:be,Le]}function Ae(gt){var Ge=gt[0],Je=gt[1],We=Ge===T[L-1][0],et=Je===T[L-1][1];if(!(We&&et))if(L>1){var xt=Ge===T[L-2][0],At=Je===T[L-2][1];We&&(Ge===be||Ge===Be)&&xt?At?L--:T[L-1]=gt:et&&(Je===Le||Je===me)&&At?xt?L--:T[L-1]=gt:T[L++]=gt}else T[L++]=gt}function rt(gt){T[L-1][0]!==gt[0]&&T[L-1][1]!==gt[1]&&Ae([lt,mt]),Ae(gt),Ht=null,lt=mt=0}var St=oI.isArrayOrTypedArray(f);function Tt(gt){if(gt&&c&&(gt.i=x,gt.d=t,gt.trace=n,gt.marker=St?f[gt.i]:f,gt.backoff=c),Ce=gt[0]/l,ge=gt[1]/u,ce=gt[0]Be?Be:0,He=gt[1]me?me:0,ce||He){if(!L)T[L++]=[ce||gt[0],He||gt[1]];else if(Ht){var Ge=je(Ht,gt);Ge.length>1&&(rt(Ge[0]),T[L++]=Ge[1])}else at=je(T[L-1],gt)[0],T[L++]=at;var Je=T[L-1];ce&&He&&(Je[0]!==ce||Je[1]!==He)?(Ht&&(lt!==ce&&mt!==He?Ae(lt&&mt?Ue(Ht,gt):[lt||ce,mt||He]):lt&&mt&&Ae([lt,mt])),Ae([ce,He])):lt-ce&&mt-He&&Ae([ce||lt,He||mt]),Ht=gt,lt=ce,mt=He}else Ht&&rt(je(Ht,gt)[0]),T[L++]=gt}for(x=0;xre(E,dt))break;S=E,N=V[0]*q[0]+V[1]*q[1],N>Z?(Z=N,g=E,z=!1):N=t.length||!E)break;Tt(E),C=E}}Ht&&Ae([lt||Ht[0],mt||Ht[1]]),p.push(T.slice(0,L))}var Et=v.slice(v.length-1);if(c&&Et!=="h"&&Et!=="v"){for(var pt=!1,jt=-1,or=[],mr=0;mr{"use strict";var Pve={tonextx:1,tonexty:1,tonext:1};Ive.exports=function(t,r,n){var i,a,o,s,l,u={},c=!1,f=-1,h=0,d=-1;for(a=0;a=0?l=d:(l=d=h,h++),l{"use strict";var qg=qa(),e0t=Oa(),l4=Pr(),dT=l4.ensureSingle,Dve=l4.identity,Kf=So(),vT=Ru(),t0t=MU(),r0t=EU(),sI=zM().tester;Fve.exports=function(t,r,n,i,a,o){var s,l,u=!a,c=!!a&&a.duration>0,f=r0t(t,r,n);if(s=i.selectAll("g.trace").data(f,function(d){return d[0].trace.uid}),s.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),s.order(),i0t(t,s,r),c){o&&(l=o());var h=qg.transition().duration(a.duration).ease(a.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});h.each(function(){i.selectAll("g.trace").each(function(d,v){Rve(t,v,r,d,f,this,a)})})}else s.each(function(d,v){Rve(t,v,r,d,f,this,a)});u&&s.exit().remove(),i.selectAll("path:not([d])").remove()};function i0t(e,t,r){t.each(function(n){var i=dT(qg.select(this),"g","fills");Kf.setClipUrl(i,r.layerClipId,e);var a=n[0].trace;a._ownFill=null,a._nextFill=null;var o=[];a._ownfill&&o.push("_ownFill"),a._nexttrace&&o.push("_nextFill");var s=i.selectAll("g").data(o,Dve);s.enter().append("g"),s.exit().remove(),s.order().each(function(l){a[l]=dT(qg.select(this),"path","js-fill")})})}function Rve(e,t,r,n,i,a,o){var s=e._context.staticPlot,l;n0t(e,t,r,n,i);var u=!!o&&o.duration>0;function c(tt){return u?tt.transition():tt}var f=r.xaxis,h=r.yaxis,d=n[0].trace,v=d.line,m=qg.select(a),b=dT(m,"g","errorbars"),p=dT(m,"g","lines"),k=dT(m,"g","points"),M=dT(m,"g","text");if(e0t.getComponentMethod("errorbars","plot")(e,b,r,o),d.visible!==!0)return;c(m).style("opacity",d.opacity);var T,L,x=d.fill.charAt(d.fill.length-1);x!=="x"&&x!=="y"&&(x="");var C,S;x==="y"?(C=1,S=h.c2p(0,!0)):x==="x"&&(C=0,S=f.c2p(0,!0)),n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=m;var g="",P=[],E=d._prevtrace,z=null,q=null;E&&(g=E._prevRevpath||"",L=E._nextFill,P=E._ownPolygons,z=E._fillsegments,q=E._fillElement);var V,G,Z="",j="",N,H,ie,ae,_e,Ee,Ce=[];d._polygons=[];var ge=[],re=[],Se=l4.noop;if(T=d._ownFill,vT.hasLines(d)||d.fill!=="none"){L&&L.datum(n),["hv","vh","hvh","vhv"].indexOf(v.shape)!==-1?(N=Kf.steps(v.shape),H=Kf.steps(v.shape.split("").reverse().join(""))):v.shape==="spline"?N=H=function(tt){var je=tt[tt.length-1];return tt.length>1&&tt[0][0]===je[0]&&tt[0][1]===je[1]?Kf.smoothclosed(tt.slice(1),v.smoothing):Kf.smoothopen(tt,v.smoothing)}:N=H=function(tt){return"M"+tt.join("L")},ie=function(tt){return H(tt.reverse())},re=t0t(n,{xaxis:f,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(v.width||1,3)/4,shape:v.shape,backoff:v.backoff,simplify:v.simplify,fill:d.fill}),ge=new Array(re.length);var ke=0;for(l=0;l=s[0]&&m.x<=s[1]&&m.y>=l[0]&&m.y<=l[1]}),h=Math.ceil(f.length/c),d=0;i.forEach(function(m,b){var p=m[0].trace;vT.hasMarkers(p)&&p.marker.maxdisplayed>0&&b{"use strict";zve.exports={container:"marker",min:"cmin",max:"cmax"}});var uI=ye((Psr,qve)=>{"use strict";var lI=ho();qve.exports=function(t,r,n){var i={},a={_fullLayout:n},o=lI.getFromTrace(a,r,"x"),s=lI.getFromTrace(a,r,"y"),l=t.orig_x;l===void 0&&(l=t.x);var u=t.orig_y;return u===void 0&&(u=t.y),i.xLabel=lI.tickText(o,o.c2l(l),!0).text,i.yLabel=lI.tickText(s,s.c2l(u),!0).text,i}});var sp=ye((Isr,Ove)=>{"use strict";var kU=qa(),gT=So(),a0t=Oa();function o0t(e){var t=kU.select(e).selectAll("g.trace.scatter");t.style("opacity",function(r){return r[0].trace.opacity}),t.selectAll("g.points").each(function(r){var n=kU.select(this),i=r.trace||r[0].trace;CU(n,i,e)}),t.selectAll("g.text").each(function(r){var n=kU.select(this),i=r.trace||r[0].trace;LU(n,i,e)}),t.selectAll("g.trace path.js-line").call(gT.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(gT.fillGroupStyle,e,!1),a0t.getComponentMethod("errorbars","style")(t)}function CU(e,t,r){gT.pointStyle(e.selectAll("path.point"),t,r)}function LU(e,t,r){gT.textPointStyle(e.selectAll("text"),t,r)}function s0t(e,t,r){var n=t[0].trace;n.selectedpoints?(gT.selectedPointStyle(r.selectAll("path.point"),n),gT.selectedTextStyle(r.selectAll("text"),n)):(CU(r,n,e),LU(r,n,e))}Ove.exports={style:o0t,stylePoints:CU,styleText:LU,styleOnSelect:s0t}});var yT=ye((Rsr,Bve)=>{"use strict";var mT=ka(),l0t=Ru();Bve.exports=function(t,r){var n,i;if(t.mode==="lines")return n=t.line.color,n&&mT.opacity(n)?n:t.fillcolor;if(t.mode==="none")return t.fill?t.fillcolor:"";var a=r.mcc||(t.marker||{}).color,o=r.mlcc||((t.marker||{}).line||{}).color;return i=a&&mT.opacity(a)?a:o&&mT.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",i?mT.opacity(i)<.3?mT.addOpacity(i,.3):i:(n=(t.line||{}).color,n&&mT.opacity(n)&&l0t.hasLines(t)&&t.line.width?n:t.fillcolor)}});var _T=ye((Dsr,Uve)=>{"use strict";var cI=Pr(),Nve=ef(),u0t=Oa(),c0t=yT(),PU=ka(),f0t=cI.fillText;Uve.exports=function(t,r,n,i){var a=t.cd,o=a[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=[u,c],h=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,v=!!o.xperiodalignment,m=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var b=function(j){if(v){var N=s.c2p(j.xStart),H=s.c2p(j.xEnd);return u>=Math.min(N,H)&&u<=Math.max(N,H)?0:1/0}var ie=Math.max(3,j.mrc||0),ae=1-1/ie,_e=Math.abs(s.c2p(j.x)-u);return _e=Math.min(N,H)&&c<=Math.max(N,H)?0:1/0}var ie=Math.max(3,j.mrc||0),ae=1-1/ie,_e=Math.abs(l.c2p(j.y)-c);return _eCe!=me>=Ce&&(be=Se[re-1][0],Be=Se[re][0],me-Le&&(ke=be+(Be-be)*(Ce-Le)/(me-Le),ie=Math.min(ie,ke),ae=Math.max(ae,ke)));return ie=Math.max(ie,0),ae=Math.min(ae,s._length),{x0:ie,x1:ae,y0:Ce,y1:Ce}}if(h.indexOf("fills")!==-1&&o._fillElement){var V=z(o._fillElement)&&!z(o._fillExclusionElement);if(V){var G=q(o._polygons);G===null&&(G={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var Z=PU.defaultLine;return PU.opacity(o.fillcolor)?Z=o.fillcolor:PU.opacity((o.line||{}).color)&&(Z=o.line.color),cI.extendFlat(t,{distance:t.maxHoverDistance,x0:G.x0,x1:G.x1,y0:G.y0,y1:G.y1,color:Z,hovertemplate:!1}),delete t.index,o.text&&!cI.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var xT=ye((Fsr,Gve)=>{"use strict";var Vve=Ru();Gve.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h=!Vve.hasMarkers(s)&&!Vve.hasText(s);if(h)return[];if(r===!1)for(l=0;l{"use strict";Hve.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var RU=ye((qsr,Zve)=>{"use strict";var u4=Oa().traceIs,IU=H3();Zve.exports=function(t,r,n,i){n("autotypenumbers",i.autotypenumbersDflt);var a=n("type",(i.splomStash||{}).type);a==="-"&&(h0t(r,i.data),r.type==="-"?r.type="linear":t.type=r.type)};function h0t(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i;r.indexOf("scene")!==-1&&(r=n);var a=d0t(t,r,n);if(a){if(a.type==="histogram"&&n==={v:"y",h:"x"}[a.orientation||"v"]){e.type="linear";return}var o=n+"calendar",s=a[o],l={noMultiCategory:!u4(a,"cartesian")||u4(a,"noMultiCategory")};if(a.type==="box"&&a._hasPreCompStats&&n==={h:"x",v:"y"}[a.orientation||"v"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,Xve(a,n)){var u=Wve(a),c=[];for(i=0;i0&&(i["_"+r+"axes"]||{})[t])return i;if((i[r+"axis"]||r)===t){if(Xve(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}function Wve(e){return{v:"x",h:"y"}[e.orientation||"v"]}function Xve(e,t){var r=Wve(e),n=u4(e,"box-violin"),i=u4(e._fullInput||{},"candlestick");return n&&!i&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var fI=ye((Osr,Yve)=>{"use strict";var v0t=Yd().isTypedArraySpec;function p0t(e,t){var r=t.dataAttr||e._id.charAt(0),n={},i,a,o;if(t.axData)i=t.axData;else for(i=[],a=0;a0||v0t(a),s;o&&(s="array");var l=n("categoryorder",s),u;l==="array"&&(u=n("categoryarray")),!o&&l==="array"&&(l=r.categoryorder="trace"),l==="trace"?r._initialCategories=[]:l==="array"?r._initialCategories=u.slice():(u=p0t(r,i).sort(),l==="category ascending"?r._initialCategories=u:l==="category descending"&&(r._initialCategories=u.reverse()))}}});var c4=ye((Bsr,Jve)=>{"use strict";var Kve=fd().mix,g0t=Ih(),m0t=Pr();Jve.exports=function(t,r,n,i){i=i||{};var a=i.dfltColor;function o(S,g){return m0t.coerce2(t,r,i.attributes,S,g)}var s=o("linecolor",a),l=o("linewidth"),u=n("showline",i.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=Kve(a,i.bgColor,i.blend||g0t.lightFraction).toRgbString(),f=o("gridcolor",c),h=o("gridwidth"),d=o("griddash"),v=n("showgrid",i.showGrid||!!f||!!h||!!d);if(v||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),i.hasMinor){var m=Kve(r.gridcolor,i.bgColor,67).toRgbString(),b=o("minor.gridcolor",m),p=o("minor.gridwidth",r.gridwidth||1),k=o("minor.griddash",r.griddash||"solid"),M=n("minor.showgrid",!!b||!!p||!!k);M||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){var T=o("zerolinelayer"),L=o("zerolinecolor",a),x=o("zerolinewidth"),C=n("zeroline",i.showGrid||!!L||!!x);C||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}});var h4=ye((Nsr,ipe)=>{"use strict";var $ve=Eo(),y0t=Oa(),f4=Pr(),_0t=vl(),x0t=Kd(),DU=Rd(),Qve=Pb(),epe=q3(),b0t=s_(),w0t=l_(),T0t=fI(),A0t=c4(),S0t=MB(),tpe=xm(),hI=Rh().WEEKDAY_PATTERN,M0t=Rh().HOUR_PATTERN;ipe.exports=function(t,r,n,i,a){var o=i.letter,s=i.font||{},l=i.splomStash||{},u=n("visible",!i.visibleDflt),c=r._template||{},f=r.type||c.type||"-",h;if(f==="date"){var d=y0t.getComponentMethod("calendars","handleDefaults");d(t,r,"calendar",i.calendar),i.noTicklabelmode||(h=n("ticklabelmode"))}!i.noTicklabelindex&&(f==="date"||f==="linear")&&n("ticklabelindex");var v="";(!i.noTicklabelposition||f==="multicategory")&&(v=f4.coerce(t,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:h==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),i.noTicklabeloverflow||n("ticklabeloverflow",v.indexOf("inside")!==-1?"hide past domain":f==="category"||f==="multicategory"?"allow":"hide past div"),tpe(r,a),S0t(t,r,n,i),T0t(t,r,n,i),i.noHover||(f!=="category"&&n("hoverformat"),i.noUnifiedhovertitle||n("unifiedhovertitle.text"));var m=n("color"),b=m!==DU.color.dflt?m:s.color,p=l.label||a._dfltTitle[o];if(w0t(t,r,n,f,i),!u)return r;n("title.text",p),f4.coerceFont(n,"title.font",s,{overrideDflt:{size:f4.bigFont(s.size),color:b}}),Qve(t,r,n,f);var k=i.hasMinor;if(k&&(_0t.newContainer(r,"minor"),Qve(t,r,n,f,{isMinor:!0})),b0t(t,r,n,f,i),epe(t,r,n,i),k){var M=i.isMinor;i.isMinor=!0,epe(t,r,n,i),i.isMinor=M}A0t(t,r,n,{dfltColor:m,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:k,attributes:DU}),k&&r.ticklabelindex==null&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&n("mirror");var T=f==="multicategory";if(!i.noTickson&&(f==="category"||T)&&(r.ticks||r.showgrid)&&(T?(n("tickson","boundaries"),delete r.ticklabelposition):n("tickson")),T){var L=n("showdividers");L&&(n("dividercolor"),n("dividerwidth"))}if(f==="date")if(x0t(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:E0t}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var x=0;x=2){var o="",s,l;if(a.length===2){for(s=0;s<2;s++)if(l=rpe(a[s]),l){o=hI;break}}var u=n("pattern",o);if(u===hI)for(s=0;s<2;s++)l=rpe(a[s]),l&&(t.bounds[s]=a[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=a[s],u){case hI:if(!$ve(l)){t.enabled=!1;return}if(l=+l,l!==Math.floor(l)||l<0||l>=7){t.enabled=!1;return}t.bounds[s]=a[s]=l;break;case M0t:if(!$ve(l)){t.enabled=!1;return}if(l=+l,l<0||l>24){t.enabled=!1;return}t.bounds[s]=a[s]=l;break}if(r.autorange===!1){var c=r.range;if(c[0]c[1]){t.enabled=!1;return}}else if(a[0]>c[0]&&a[1]{"use strict";var C0t=Eo(),dI=Pr();npe.exports=function(t,r,n,i){var a=i.counterAxes||[],o=i.overlayableAxes||[],s=i.letter,l=i.grid,u=i.overlayingDomain,c,f,h,d,v,m;l&&(f=l._domains[s][l._axisMap[r._id]],c=l._anchors[r._id],f&&(h=l[s+"side"].split(" ")[0],d=l.domain[s][h==="right"||h==="top"?1:0])),f=f||[0,1],c=c||(C0t(t.position)?"free":a[0]||"free"),h=h||(s==="x"?"bottom":"left"),d=d||0,v=0,m=!1;var b=dI.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(a),dflt:c}},"anchor"),p=dI.coerce(t,r,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(b==="free"){if(s==="y"){var k=n("autoshift");k&&(d=p==="left"?u[0]:u[1],m=r.automargin?r.automargin:!0,v=p==="left"?-3:3),n("shift",v)}n("position",d)}n("automargin",m);var M=!1;if(o.length&&(M=dI.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!M){var T=n("domain",f);T[0]>T[1]-1/4096&&(r.domain=f),dI.noneOrAll(t.domain,r.domain,f),r.tickmode==="sync"&&(r.tickmode="auto")}return n("layer"),r}});var dpe=ye((Vsr,hpe)=>{"use strict";var n2=Pr(),ape=ka(),L0t=ip().isUnifiedHover,P0t=$B(),ope=vl(),I0t=b3(),spe=Rd(),R0t=RU(),lpe=h4(),D0t=$b(),upe=vI(),zU=df(),Fm=zU.id2name,cpe=zU.name2id,F0t=Rh().AX_ID_PATTERN,fpe=Oa(),pI=fpe.traceIs,FU=fpe.getComponentMethod;function gI(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}hpe.exports=function(t,r,n){var i=r.autotypenumbers,a={},o={},s={},l={},u={},c={},f={},h={},d={},v={},m,b;for(m=0;m{"use strict";var z0t=qa(),vpe=Oa(),mI=Pr(),Qp=So(),yI=ho();ppe.exports=function(t,r,n,i){var a=t._fullLayout;if(r.length===0){yI.redrawComponents(t);return}function o(b){var p=b.xaxis,k=b.yaxis;a._defs.select("#"+b.clipId+"> rect").call(Qp.setTranslate,0,0).call(Qp.setScale,1,1),b.plot.call(Qp.setTranslate,p._offset,k._offset).call(Qp.setScale,1,1);var M=b.plot.selectAll(".scatterlayer .trace");M.selectAll(".point").call(Qp.setPointGroupScale,1,1),M.selectAll(".textpoint").call(Qp.setTextPointsScale,1,1),M.call(Qp.hideOutsideRangePoints,b)}function s(b,p){var k=b.plotinfo,M=k.xaxis,T=k.yaxis,L=M._length,x=T._length,C=!!b.xr1,S=!!b.yr1,g=[];if(C){var P=mI.simpleMap(b.xr0,M.r2l),E=mI.simpleMap(b.xr1,M.r2l),z=P[1]-P[0],q=E[1]-E[0];g[0]=(P[0]*(1-p)+p*E[0]-P[0])/(P[1]-P[0])*L,g[2]=L*(1-p+p*q/z),M.range[0]=M.l2r(P[0]*(1-p)+p*E[0]),M.range[1]=M.l2r(P[1]*(1-p)+p*E[1])}else g[0]=0,g[2]=L;if(S){var V=mI.simpleMap(b.yr0,T.r2l),G=mI.simpleMap(b.yr1,T.r2l),Z=V[1]-V[0],j=G[1]-G[0];g[1]=(V[1]*(1-p)+p*G[1]-V[1])/(V[0]-V[1])*x,g[3]=x*(1-p+p*j/Z),T.range[0]=M.l2r(V[0]*(1-p)+p*G[0]),T.range[1]=T.l2r(V[1]*(1-p)+p*G[1])}else g[1]=0,g[3]=x;yI.drawOne(t,M,{skipTitle:!0}),yI.drawOne(t,T,{skipTitle:!0}),yI.redrawComponents(t,[M._id,T._id]);var N=C?L/g[2]:1,H=S?x/g[3]:1,ie=C?g[0]:0,ae=S?g[1]:0,_e=C?g[0]/g[2]*L:0,Ee=S?g[1]/g[3]*x:0,Ce=M._offset-_e,ge=T._offset-Ee;k.clipRect.call(Qp.setTranslate,ie,ae).call(Qp.setScale,1/N,1/H),k.plot.call(Qp.setTranslate,Ce,ge).call(Qp.setScale,N,H),Qp.setPointGroupScale(k.zoomScalePts,1/N,1/H),Qp.setTextPointsScale(k.zoomScaleTxt,1/N,1/H)}var l;i&&(l=i());function u(){for(var b={},p=0;pn.duration?(u(),d=window.cancelAnimationFrame(m)):d=window.requestAnimationFrame(m)}return f=Date.now(),d=window.requestAnimationFrame(m),Promise.resolve()}});var mh=ye(xv=>{"use strict";var xI=qa(),mpe=Oa(),a2=Pr(),q0t=Mc(),O0t=So(),ype=Id().getModuleCalcData,S_=df(),Og=Rh(),B0t=Wp(),iu=a2.ensureSingle;function _I(e,t,r){return a2.ensureSingle(e,t,r,function(n){n.datum(r)})}var o2=Og.zindexSeparator;xv.name="cartesian";xv.attr=["xaxis","yaxis"];xv.idRoot=["x","y"];xv.idRegex=Og.idRegex;xv.attrRegex=Og.attrRegex;xv.attributes=jve();xv.layoutAttributes=Rd();xv.supplyLayoutDefaults=dpe();xv.transitionAxes=gpe();xv.finalizeSubplots=function(e,t){var r=t._subplots,n=r.xaxis,i=r.yaxis,a=r.cartesian,o=a,s={},l={},u,c,f;for(u=0;u0){var d=h.id;if(d.indexOf(o2)!==-1)continue;d+=o2+(u+1),h=a2.extendFlat({},h,{id:d,plot:i._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var v=[],m,b=0;b1&&(L+=o2+T),M.push(s+L),o=0;o1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=iu(n,"path","xlines-above"),t.ylines=iu(n,"path","ylines-above"),t.xaxislayer=iu(n,"g","xaxislayer-above"),t.yaxislayer=iu(n,"g","yaxislayer-above");else{if(!o){var h=iu(n,"g","layer-subplot");t.shapelayer=iu(h,"g","shapelayer"),t.imagelayer=iu(h,"g","imagelayer"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=iu(n,"g","minor-gridlayer"),t.gridlayer=iu(n,"g","gridlayer"),t.zerolinelayer=iu(n,"g","zerolinelayer"));var d=iu(n,"g","layer-between");t.shapelayerBetween=iu(d,"g","shapelayer"),t.imagelayerBetween=iu(d,"g","imagelayer"),iu(n,"path","xlines-below"),iu(n,"path","ylines-below"),t.overlinesBelow=iu(n,"g","overlines-below"),iu(n,"g","xaxislayer-below"),iu(n,"g","yaxislayer-below"),t.overaxesBelow=iu(n,"g","overaxes-below")}t.overplot=iu(n,"g","overplot"),t.plot=iu(t.overplot,"g",i),f&&c?t.zerolinelayerAbove=f.zerolinelayerAbove:t.zerolinelayerAbove=iu(n,"g","zerolinelayer-above"),o||(t.xlines=iu(n,"path","xlines-above"),t.ylines=iu(n,"path","ylines-above"),t.overlinesAbove=iu(n,"g","overlines-above"),iu(n,"g","xaxislayer-above"),iu(n,"g","yaxislayer-above"),t.overaxesAbove=iu(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+s),t.ylines=n.select(".ylines-"+l),t.xaxislayer=n.select(".xaxislayer-"+s),t.yaxislayer=n.select(".yaxislayer-"+l))}else{var v=f.plotgroup,m=i+"-x",b=i+"-y";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,t.zerolinelayerAbove=f.zerolinelayerAbove,iu(f.overlinesBelow,"path",m),iu(f.overlinesBelow,"path",b),iu(f.overaxesBelow,"g",m),iu(f.overaxesBelow,"g",b),t.plot=iu(f.overplot,"g",i),iu(f.overlinesAbove,"path",m),iu(f.overlinesAbove,"path",b),iu(f.overaxesAbove,"g",m),iu(f.overaxesAbove,"g",b),t.xlines=v.select(".overlines-"+s).select("."+m),t.ylines=v.select(".overlines-"+l).select("."+b),t.xaxislayer=v.select(".overaxes-"+s).select("."+m),t.yaxislayer=v.select(".overaxes-"+l).select("."+b)}o||(u||(_I(t.minorGridlayer,"g",t.xaxis._id),_I(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(p){return p[0]}).sort(S_.idSort),_I(t.gridlayer,"g",t.xaxis._id),_I(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(p){return p[0]}).sort(S_.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function bpe(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=xI.select(this);c.remove(),wpe(u,t),r[u]=!0});for(var n in t._plots)for(var i=t._plots[n],a=i.overlays||[],o=0;o{"use strict";var bI=Ru();Tpe.exports={hasLines:bI.hasLines,hasMarkers:bI.hasMarkers,hasText:bI.hasText,isBubble:bI.isBubble,attributes:pf(),layoutAttributes:rL(),supplyDefaults:Yde(),crossTraceDefaults:hU(),supplyLayoutDefaults:Qde(),calc:O0().calc,crossTraceCalc:Ave(),arraysToCalcdata:Dm(),plot:pT(),colorbar:Qd(),formatLabels:uI(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:_T(),selectPoints:xT(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:mh(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var Epe=ye((Wsr,Mpe)=>{"use strict";var U0t=qa(),V0t=ka(),Spe=BN(),qU=Pr(),G0t=qU.strScale,H0t=qU.strRotate,j0t=qU.strTranslate;Mpe.exports=function(t,r,n){var i=t.node(),a=Spe[n.arrowhead||0],o=Spe[n.startarrowhead||0],s=(n.arrowwidth||1)*(n.arrowsize||1),l=(n.arrowwidth||1)*(n.startarrowsize||1),u=r.indexOf("start")>=0,c=r.indexOf("end")>=0,f=a.backoff*s+n.standoff,h=o.backoff*l+n.startstandoff,d,v,m,b;if(i.nodeName==="line"){d={x:+t.attr("x1"),y:+t.attr("y1")},v={x:+t.attr("x2"),y:+t.attr("y2")};var p=d.x-v.x,k=d.y-v.y;if(m=Math.atan2(k,p),b=m+Math.PI,f&&h&&f+h>Math.sqrt(p*p+k*k)){V();return}if(f){if(f*f>p*p+k*k){V();return}var M=f*Math.cos(m),T=f*Math.sin(m);v.x+=M,v.y+=T,t.attr({x2:v.x,y2:v.y})}if(h){if(h*h>p*p+k*k){V();return}var L=h*Math.cos(m),x=h*Math.sin(m);d.x-=L,d.y-=x,t.attr({x1:d.x,y1:d.y})}}else if(i.nodeName==="path"){var C=i.getTotalLength(),S="";if(C{"use strict";var kpe=qa(),OU=Oa(),W0t=Mc(),E_=Pr(),BU=E_.strTranslate,v4=ho(),s2=ka(),By=So(),Cpe=ef(),NU=Zl(),UU=Eg(),d4=yv(),X0t=vl().arrayEditor,Z0t=Epe();Ipe.exports={draw:Y0t,drawOne:Lpe,drawRaw:Ppe};function Y0t(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?et="right":et="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[et]}for(var Le=!1,me=["x","y"],Pe=0;Pe1)&&(lt===He?(dt=mt.r2fraction(t["a"+ce]),(dt<0||dt>1)&&(Le=!0)):Le=!0),je=mt._offset+mt.r2p(t[ce]),rt=.5}else{var Et=Tt==="domain";ce==="x"?(Ae=t[ce],je=Et?mt._offset+mt._length*Ae:je=s.l+s.w*Ae):(Ae=1-t[ce],je=Et?mt._offset+mt._length*Ae:je=s.t+s.h*Ae),rt=t.showarrow?.5:Ae}if(t.showarrow){tt.head=je;var pt=t["a"+ce];if(St=at*Be(.5,t.xanchor)-ct*Be(.5,t.yanchor),lt===He){var jt=v4.getRefType(lt);jt==="domain"?(ce==="y"&&(pt=1-pt),tt.tail=mt._offset+mt._length*pt):jt==="paper"?ce==="y"?(pt=1-pt,tt.tail=s.t+s.h*pt):tt.tail=s.l+s.w*pt:tt.tail=mt._offset+mt.r2p(pt),Ue=St}else tt.tail=je+pt,Ue=St+pt;tt.text=tt.tail+St;var or=o[ce==="x"?"width":"height"];if(He==="paper"&&(tt.head=E_.constrain(tt.head,1,or-1)),lt==="pixel"){var mr=-Math.max(tt.tail-3,tt.text),Ar=Math.min(tt.tail+3,tt.text)-or;mr>0?(tt.tail+=mr,tt.text+=mr):Ar>0&&(tt.tail-=Ar,tt.text-=Ar)}tt.tail+=rr,tt.head+=rr}else St=ar*Be(rt,Vt),Ue=St,tt.text=je+St;tt.text+=rr,St+=rr,Ue+=rr,t["_"+ce+"padplus"]=ar/2+Ue,t["_"+ce+"padminus"]=ar/2-Ue,t["_"+ce+"size"]=ar,t["_"+ce+"shift"]=St}if(Le){C.remove();return}var ei=0,qr=0;if(t.align!=="left"&&(ei=(re-Ce)*(t.align==="center"?.5:1)),t.valign!=="top"&&(qr=(Se-ge)*(t.valign==="middle"?.5:1)),_e)ae.select("svg").attr({x:P+ei-1,y:P+qr}).call(By.setClipUrl,z?m:null,e);else{var jr=P+qr-Ee.top,gt=P+ei-Ee.left;Z.call(NU.positionText,gt,jr).call(By.setClipUrl,z?m:null,e)}q.select("rect").call(By.setRect,P,P,re,Se),E.call(By.setRect,S/2,S/2,ke-S,be-S),C.call(By.setTranslate,Math.round(b.x.text-ke/2),Math.round(b.y.text-be/2)),M.attr({transform:"rotate("+p+","+b.x.text+","+b.y.text+")"});var Ge=function(We,et){k.selectAll(".annotation-arrow-g").remove();var xt=b.x.head,At=b.y.head,Kt=b.x.tail+We,Qt=b.y.tail+et,Mr=b.x.text+We,Gr=b.y.text+et,Ir=E_.rotationXYMatrix(p,Mr,Gr),Yr=E_.apply2DTransform(Ir),_i=E_.apply2DTransform2(Ir),Pi=+E.attr("width"),ai=+E.attr("height"),mi=Mr-.5*Pi,un=mi+Pi,Fn=Gr-.5*ai,An=Fn+ai,Hn=[[mi,Fn,mi,An],[mi,An,un,An],[un,An,un,Fn],[un,Fn,mi,Fn]].map(_i);if(!Hn.reduce(function($r,Ri){return $r^!!E_.segmentsIntersect(xt,At,xt+1e6,At+1e6,Ri[0],Ri[1],Ri[2],Ri[3])},!1)){Hn.forEach(function($r){var Ri=E_.segmentsIntersect(Kt,Qt,xt,At,$r[0],$r[1],$r[2],$r[3]);Ri&&(Kt=Ri.x,Qt=Ri.y)});var Qn=t.arrowwidth,Vi=t.arrowcolor,Kn=t.arrowside,Jn=k.append("g").style({opacity:s2.opacity(Vi)}).classed("annotation-arrow-g",!0),Gt=Jn.append("path").attr("d","M"+Kt+","+Qt+"L"+xt+","+At).style("stroke-width",Qn+"px").call(s2.stroke,s2.rgb(Vi));if(Z0t(Gt,Kn,t),l.annotationPosition&&Gt.node().parentNode&&!n){var wt=xt,tr=At;if(t.standoff){var ir=Math.sqrt(Math.pow(xt-Kt,2)+Math.pow(At-Qt,2));wt+=t.standoff*(Kt-xt)/ir,tr+=t.standoff*(Qt-At)/ir}var wr=Jn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Kt-wt)+","+(Qt-tr),transform:BU(wt,tr)}).style("stroke-width",Qn+6+"px").call(s2.stroke,"rgba(0,0,0,0)").call(s2.fill,"rgba(0,0,0,0)"),Xr,ti;d4.init({element:wr.node(),gd:e,prepFn:function(){var $r=By.getTranslate(C);Xr=$r.x,ti=$r.y,i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0)},moveFn:function($r,Ri){var Zi=Yr(Xr,ti),en=Zi[0]+$r,fn=Zi[1]+Ri;C.call(By.setTranslate,en,fn),d("x",M_(i,$r,"x",s,t)),d("y",M_(a,Ri,"y",s,t)),t.axref===t.xref&&d("ax",M_(i,$r,"ax",s,t)),t.ayref===t.yref&&d("ay",M_(a,Ri,"ay",s,t)),Jn.attr("transform",BU($r,Ri)),M.attr({transform:"rotate("+p+","+en+","+fn+")"})},doneFn:function(){OU.call("_guiRelayout",e,v());var $r=document.querySelector(".js-notes-box-panel");$r&&$r.redraw($r.selectedObj)}})}}};if(t.showarrow&&Ge(0,0),T){var Je;d4.init({element:C.node(),gd:e,prepFn:function(){Je=M.attr("transform")},moveFn:function(We,et){var xt="pointer";if(t.showarrow)t.axref===t.xref?d("ax",M_(i,We,"ax",s,t)):d("ax",t.ax+We),t.ayref===t.yref?d("ay",M_(a,et,"ay",s.w,t)):d("ay",t.ay+et),Ge(We,et);else{if(n)return;var At,Kt;if(i)At=M_(i,We,"x",s,t);else{var Qt=t._xsize/s.w,Mr=t.x+(t._xshift-t.xshift)/s.w-Qt/2;At=d4.align(Mr+We/s.w,Qt,0,1,t.xanchor)}if(a)Kt=M_(a,et,"y",s,t);else{var Gr=t._ysize/s.h,Ir=t.y-(t._yshift+t.yshift)/s.h-Gr/2;Kt=d4.align(Ir-et/s.h,Gr,0,1,t.yanchor)}d("x",At),d("y",Kt),(!i||!a)&&(xt=d4.getCursor(i?.5:At,a?.5:Kt,t.xanchor,t.yanchor))}M.attr({transform:BU(We,et)+Je}),UU(C,xt)},clickFn:function(We,et){t.captureevents&&e.emit("plotly_clickannotation",x(et))},doneFn:function(){UU(C),OU.call("_guiRelayout",e,v());var We=document.querySelector(".js-notes-box-panel");We&&We.redraw(We.selectedObj)}})}}l.annotationText?Z.call(NU.makeEditable,{delegate:C,gd:e}).call(j).on("edit",function(H){t.text=H,this.call(j),d("text",H),i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0),OU.call("_guiRelayout",e,v())}):Z.call(j)}});var Ope=ye((Zsr,qpe)=>{"use strict";var Rpe=Pr(),K0t=Oa(),Dpe=vl().arrayEditor;qpe.exports={hasClickToShow:J0t,onClick:$0t};function J0t(e,t){var r=zpe(e,t);return r.on.length>0||r.explicitOff.length>0}function $0t(e,t){var r=zpe(e,t),n=r.on,i=r.off.concat(r.explicitOff),a={},o=e._fullLayout.annotations,s,l;if(n.length||i.length){for(s=0;s{"use strict";var VU=Pr(),bT=ka();Bpe.exports=function(t,r,n,i){i("opacity");var a=i("bgcolor"),o=i("bordercolor"),s=bT.opacity(o);i("borderpad");var l=i("borderwidth"),u=i("showarrow");i("text",u?" ":n._dfltTitle.annotation),i("textangle"),VU.coerceFont(i,"font",n.font),i("width"),i("align");var c=i("height");if(c&&i("valign"),u){var f=i("arrowside"),h,d;f.indexOf("end")!==-1&&(h=i("arrowhead"),d=i("arrowsize")),f.indexOf("start")!==-1&&(i("startarrowhead",h),i("startarrowsize",d)),i("arrowcolor",s?r.bordercolor:bT.defaultLine),i("arrowwidth",(s&&l||1)*2),i("standoff"),i("startstandoff")}var v=i("hovertext"),m=n.hoverlabel||{};if(v){var b=i("hoverlabel.bgcolor",m.bgcolor||(bT.opacity(a)?bT.rgb(a):bT.defaultLine)),p=i("hoverlabel.bordercolor",m.bordercolor||bT.contrast(b)),k=VU.extendFlat({},m.font);k.color||(k.color=p),VU.coerceFont(i,"hoverlabel.font",k)}i("captureevents",!!v)}});var Upe=ye((Ksr,Npe)=>{"use strict";var HU=Pr(),l2=ho(),Q0t=Kd(),egt=GU(),tgt=Qb();Npe.exports=function(t,r){Q0t(t,r,{name:"annotations",handleItemDefaults:rgt})};function rgt(e,t,r){function n(M,T){return HU.coerce(e,t,tgt,M,T)}var i=n("visible"),a=n("clicktoshow");if(i||a){egt(e,t,r,n);for(var o=t.showarrow,s=["x","y"],l=[-10,-30],u={_fullLayout:r},c=0;c<2;c++){var f=s[c],h=l2.coerceRef(e,t,u,f,"","paper");if(h!=="paper"){var d=l2.getFromId(u,h);d._annIndices.push(t._index)}if(l2.coercePosition(t,u,n,h,f,.5),o){var v="a"+f,m=l2.coerceRef(e,t,u,v,"pixel",["pixel","paper"]);m!=="pixel"&&m!==h&&(m=t[v]="pixel");var b=m==="pixel"?l[c]:.4;l2.coercePosition(t,u,n,m,v,b)}n(f+"anchor"),n(f+"shift")}if(HU.noneOrAll(e,t,["x","y"]),o&&HU.noneOrAll(e,t,["ax","ay"]),a){var p=n("xclick"),k=n("yclick");t._xclick=p===void 0?t.x:l2.cleanPosition(p,u,t.xref),t._yclick=k===void 0?t.y:l2.cleanPosition(k,u,t.yref)}}}});var Hpe=ye((Jsr,Gpe)=>{"use strict";var jU=Pr(),u2=ho(),igt=wI().draw;Gpe.exports=function(t){var r=t._fullLayout,n=jU.filterVisible(r.annotations);if(n.length&&t._fullData.length)return jU.syncOrAsync([igt,ngt],t)};function ngt(e){var t=e._fullLayout;jU.filterVisible(t.annotations).forEach(function(r){var n=u2.getFromId(e,r.xref),i=u2.getFromId(e,r.yref),a=u2.getRefType(r.xref),o=u2.getRefType(r.yref);r._extremes={},a==="range"&&Vpe(r,n),o==="range"&&Vpe(r,i)})}function Vpe(e,t){var r=t._id,n=r.charAt(0),i=e[n],a=e["a"+n],o=e[n+"ref"],s=e["a"+n+"ref"],l=e["_"+n+"padplus"],u=e["_"+n+"padminus"],c={x:1,y:-1}[n]*e[n+"shift"],f=3*e.arrowsize*e.arrowwidth||0,h=f+c,d=f-c,v=3*e.startarrowsize*e.arrowwidth||0,m=v+c,b=v-c,p;if(s===o){var k=u2.findExtremes(t,[t.r2c(i)],{ppadplus:h,ppadminus:d}),M=u2.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,m),ppadminus:Math.max(u,b)});p={min:[k.min[0],M.min[0]],max:[k.max[0],M.max[0]]}}else m=a?m+a:m,b=a?b-a:b,p=u2.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(l,h,m),ppadminus:Math.max(u,d,b)});e._extremes[r]=p}});var Wpe=ye(($sr,jpe)=>{"use strict";var agt=Eo(),ogt=M6();jpe.exports=function(t,r,n,i){r=r||{};var a=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(!(a||o))return;var s=t._fullLayout.annotations,l=r._id.charAt(0),u,c;function f(d){var v=u[d],m=null;a?m=ogt(v,r.range):m=Math.pow(10,v),agt(m)||(m=null),i(c+d,m)}for(var h=0;h{"use strict";var WU=wI(),Xpe=Ope();Zpe.exports={moduleType:"component",name:"annotations",layoutAttributes:Qb(),supplyLayoutDefaults:Upe(),includeBasePlot:XM()("annotations"),calcAutorange:Hpe(),draw:WU.draw,drawOne:WU.drawOne,drawRaw:WU.drawRaw,hasClickToShow:Xpe.hasClickToShow,onClick:Xpe.onClick,convertCoords:Wpe()}});var TI=ye((elr,Kpe)=>{"use strict";var kc=Qb(),sgt=mc().overrideAll,lgt=vl().templatedArray;Kpe.exports=sgt(lgt("annotation",{visible:kc.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:kc.xanchor,xshift:kc.xshift,yanchor:kc.yanchor,yshift:kc.yshift,text:kc.text,textangle:kc.textangle,font:kc.font,width:kc.width,height:kc.height,opacity:kc.opacity,align:kc.align,valign:kc.valign,bgcolor:kc.bgcolor,bordercolor:kc.bordercolor,borderpad:kc.borderpad,borderwidth:kc.borderwidth,showarrow:kc.showarrow,arrowcolor:kc.arrowcolor,arrowhead:kc.arrowhead,startarrowhead:kc.startarrowhead,arrowside:kc.arrowside,arrowsize:kc.arrowsize,startarrowsize:kc.startarrowsize,arrowwidth:kc.arrowwidth,standoff:kc.standoff,startstandoff:kc.startstandoff,hovertext:kc.hovertext,hoverlabel:kc.hoverlabel,captureevents:kc.captureevents}),"calc","from-root")});var $pe=ye((tlr,Jpe)=>{"use strict";var XU=Pr(),ugt=ho(),cgt=Kd(),fgt=GU(),hgt=TI();Jpe.exports=function(t,r,n){cgt(t,r,{name:"annotations",handleItemDefaults:dgt,fullLayout:n.fullLayout})};function dgt(e,t,r,n){function i(s,l){return XU.coerce(e,t,hgt,s,l)}function a(s){var l=s+"axis",u={_fullLayout:{}};return u._fullLayout[l]=r[l],ugt.coercePosition(t,u,i,s,s,.5)}var o=i("visible");o&&(fgt(e,t,n.fullLayout,i),a("x"),a("y"),a("z"),XU.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",i("ax",-10),i("ay",-30),XU.noneOrAll(e,t,["ax","ay"])))}});var r0e=ye((rlr,t0e)=>{"use strict";var Qpe=Pr(),e0e=ho();t0e.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,i=0;i{"use strict";function ZU(e,t){var r=[0,0,0,0],n,i;for(n=0;n<4;++n)for(i=0;i<4;++i)r[i]+=e[4*n+i]*t[n];return r}function pgt(e,t){var r=ZU(e.projection,ZU(e.view,ZU(e.model,[t[0],t[1],t[2],1])));return r}i0e.exports=pgt});var a0e=ye((nlr,n0e)=>{"use strict";var ggt=wI().drawRaw,mgt=YU(),ygt=["x","y","z"];n0e.exports=function(t){for(var r=t.fullSceneLayout,n=t.dataScale,i=r.annotations,a=0;a1){s=!0;break}}s?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+a+'"]').remove():(o._pdata=mgt(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),ggt(t.graphDiv,o,a,t.id,o._xa,o._ya))}}});var l0e=ye((alr,s0e)=>{"use strict";var _gt=Oa(),o0e=Pr();s0e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:TI()}}},layoutAttributes:TI(),handleDefaults:$pe(),includeBasePlot:xgt,convert:r0e(),draw:a0e()};function xgt(e,t){var r=_gt.subplotsRegistry.gl3d;if(r)for(var n=r.attrRegex,i=Object.keys(e),a=0;a{"use strict";var olr=Rh(),u0e=ec(),c0e=pf().line,bgt=Pd().dash,Bg=Ao().extendFlat,wgt=vl().templatedArray,slr=jM(),wT=Gl(),f0e=Qb(),{shapeTexttemplateAttrs:Tgt,templatefallbackAttrs:Agt}=Ll(),Sgt=F6();h0e.exports=wgt("shape",{visible:Bg({},wT.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Bg({},wT.legend,{editType:"calc+arraydraw"}),legendgroup:Bg({},wT.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Bg({},wT.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:u0e({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Bg({},wT.legendrank,{editType:"calc+arraydraw"}),legendwidth:Bg({},wT.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:Bg({},f0e.xref,{arrayOk:!0}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:Bg({},f0e.yref,{arrayOk:!0}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:Bg({},c0e.color,{editType:"arraydraw"}),width:Bg({},c0e.width,{editType:"calc+arraydraw"}),dash:Bg({},bgt,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:Tgt({},{keys:Object.keys(Sgt)}),texttemplatefallback:Agt({editType:"arraydraw"}),font:u0e({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})});var v0e=ye((ulr,d0e)=>{"use strict";var TT=Pr(),e0=ho(),Mgt=Kd(),Egt=KU(),p4=x_();d0e.exports=function(t,r){Mgt(t,r,{name:"shapes",handleItemDefaults:Cgt})};function kgt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function Cgt(e,t,r){function n(M,T){return TT.coerce(e,t,Egt,M,T)}t._isShape=!0;var i=n("visible");if(!i)return;var a=n("showlegend");n("legend"),n("legendgroup"),a&&(n("legendwidth"),n("legendgrouptitle.text"),TT.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var o=n("path"),s=o?"path":"rect",l=n("type",s),u=l!=="path";u&&delete t.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var c=n("line.width");c&&(n("line.color"),n("line.dash"));var f=n("xsizemode"),h=n("ysizemode");let d=[.25,.75],v=[0,10];["x","y"].forEach(M=>{var T=M+"anchor",L=M==="x"?f:h,x={_fullLayout:r},C,S,g,P;let E=M+"ref",z=e[E];if(Array.isArray(z)&&z.length>0){let q=p4.countDefiningCoords(l,o,M);P=e0.coerceRefArray(e,t,x,M,void 0,"paper",q),t["_"+M+"refArray"]=!0}else P=e0.coerceRef(e,t,x,M,void 0,"paper");if(Array.isArray(P))P.forEach(function(q){e0.getRefType(q)==="range"&&(C=e0.getFromId(x,q),C&&C._shapeIndices.indexOf(t._index)===-1&&C._shapeIndices.push(t._index))}),u&&[0,1].forEach(function(q){let V=P[q];e0.getRefType(V)==="range"?(C=e0.getFromId(x,V),S=p4.shapePositionToRange(C),g=p4.rangeToShapePosition(C),(C.type==="category"||C.type==="multicategory")&&n(M+q+"shift")):S=g=TT.identity;let Z=M+q,j=e[Z];if(e[Z]=S(e[Z],!0),L==="pixel"?n(Z,v[q]):e0.coercePosition(t,x,n,V,Z,d[q]),t[Z]=g(t[Z]),e[Z]=j,q===0&&L==="pixel"){let N=e[T];e[T]=S(e[T],!0),e0.coercePosition(t,x,n,V,T,.25),t[T]=g(t[T]),e[T]=N}});else{if(e0.getRefType(P)==="range"?(C=e0.getFromId(x,P),C._shapeIndices.push(t._index),g=p4.rangeToShapePosition(C),S=p4.shapePositionToRange(C),u&&(C.type==="category"||C.type==="multicategory")&&(n(M+"0shift"),n(M+"1shift"))):S=g=TT.identity,u){let V=M+"0",G=M+"1",Z=e[V],j=e[G];e[V]=S(e[V],!0),e[G]=S(e[G],!0),L==="pixel"?(n(V,v[0]),n(G,v[1])):(e0.coercePosition(t,x,n,P,V,d[0]),e0.coercePosition(t,x,n,P,G,d[1])),t[V]=g(t[V]),t[G]=g(t[G]),e[V]=Z,e[G]=j}if(L==="pixel"){let V=e[T];e[T]=S(e[T],!0),e0.coercePosition(t,x,n,P,T,.25),t[T]=g(t[T]),e[T]=V}}}),u&&TT.noneOrAll(e,t,["x0","x1","y0","y1"]);var m=l==="line",b,p;if(u&&(b=n("label.texttemplate"),n("label.texttemplatefallback")),b||(p=n("label.text")),p||b){n("label.textangle");var k=n("label.textposition",m?"middle":"middle center");n("label.xanchor"),n("label.yanchor",kgt(m,k)),n("label.padding"),TT.coerceFont(n,"label.font",r.font)}}});var m0e=ye((clr,g0e)=>{"use strict";var Lgt=ka(),p0e=Pr();function Pgt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}g0e.exports=function(t,r,n){n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),p0e.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity");var i=n("newshape.line.width");if(i){var a=(t||{}).plot_bgcolor||"#FFF";n("newshape.line.color",Lgt.contrast(a)),n("newshape.line.dash")}var o=t.dragmode==="drawline",s=n("newshape.label.text"),l=n("newshape.label.texttemplate");if(n("newshape.label.texttemplatefallback"),s||l){n("newshape.label.textangle");var u=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",Pgt(o,u)),n("newshape.label.padding"),p0e.coerceFont(n,"newshape.label.font",r.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var A0e=ye((flr,T0e)=>{"use strict";var JU=Pr(),N0=ho(),zm=AM(),$U=x_();T0e.exports=function(t){var r=t._fullLayout,n=JU.filterVisible(r.shapes);if(!(!n.length||!t._fullData.length))for(var i=0;i{o=N0.getFromId(t,f),a._extremes[o._id]=N0.findExtremes(o,h,_0e(a))})}else a.xref!=="paper"&&l!=="domain"&&(o=N0.getFromId(t,a.xref),s=b0e(o,a,zm.paramIsX),s&&(a._extremes[o._id]=N0.findExtremes(o,s,_0e(a))));if(u==="array"){let c=y0e(t,a,"y");Object.entries(c).forEach(([f,h])=>{o=N0.getFromId(t,f),a._extremes[o._id]=N0.findExtremes(o,h,x0e(a))})}else a.yref!=="paper"&&u!=="domain"&&(o=N0.getFromId(t,a.yref),s=b0e(o,a,zm.paramIsY),s&&(a._extremes[o._id]=N0.findExtremes(o,s,x0e(a))))}};function y0e(e,t,r){let n=t[r+"ref"],i=r==="x"?zm.paramIsX:zm.paramIsY;function a(f,h){f==="paper"||N0.getRefType(f)==="domain"||(o[f]||(o[f]=[]),o[f].push(h))}let o={};if(t.type==="path"&&t.path){let f=t.path.match(zm.segmentRE)||[];for(var s=0,l=0;lv&&(a(n[s],m[v]),s++)}}else a(n[0],t[r+"0"]),a(n[1],t[r+"1"]);let u={};for(let f in o){let h=N0.getFromId(e,f);if(h){var c=h.type==="category"||h.type==="multicategory"?h.r2c:h.d2c;h.type==="date"&&(c=$U.decodeDate(c)),u[h._id]=o[f].map(c)}}return u}function _0e(e){return w0e(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function x0e(e){return w0e(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function w0e(e,t,r,n,i,a){var o=e/2,s=a;if(t==="pixel"){var l=i?$U.extractPathCoords(i,a?zm.paramIsY:zm.paramIsX):[r,n],u=JU.aggNums(Math.max,null,l),c=JU.aggNums(Math.min,null,l),f=c<0?Math.abs(c)+o:o,h=u>0?u+o:o;return{ppad:o,ppadplus:s?f:h,ppadminus:s?h:f}}else return{ppad:o}}function b0e(e,t,r){var n=e._id.charAt(0)==="x"?"x":"y",i=e.type==="category"||e.type==="multicategory",a,o,s=0,l=0,u=i?e.r2c:e.d2c,c=t[n+"sizemode"]==="scaled";if(c?(a=t[n+"0"],o=t[n+"1"],i&&(s=t[n+"0shift"],l=t[n+"1shift"])):(a=t[n+"anchor"],o=t[n+"anchor"]),a!==void 0)return[u(a)+s,u(o)+l];if(t.path){var f=1/0,h=-1/0,d=t.path.match(zm.segmentRE),v,m,b,p,k;for(e.type==="date"&&(u=$U.decodeDate(u)),v=0;vh&&(h=k)));if(h>=f)return[f,h]}}});var E0e=ye((hlr,M0e)=>{"use strict";var S0e=vP();M0e.exports={moduleType:"component",name:"shapes",layoutAttributes:KU(),supplyLayoutDefaults:v0e(),supplyDrawNewShapeDefaults:m0e(),includeBasePlot:XM()("shapes"),calcAutorange:A0e(),draw:S0e.draw,drawOne:S0e.drawOne}});var QU=ye((vlr,C0e)=>{"use strict";var k0e=Rh(),Igt=vl().templatedArray,dlr=jM();C0e.exports=Igt("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",k0e.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",k0e.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var P0e=ye((plr,L0e)=>{"use strict";var Rgt=Pr(),eV=ho(),Dgt=Kd(),Fgt=QU(),zgt="images";L0e.exports=function(t,r){var n={name:zgt,handleItemDefaults:qgt};Dgt(t,r,n)};function qgt(e,t,r){function n(h,d){return Rgt.coerce(e,t,Fgt,h,d)}var i=n("source"),a=n("visible",!!i);if(!a)return t;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var o={_fullLayout:r},s=["x","y"],l=0;l<2;l++){var u=s[l],c=eV.coerceRef(e,t,o,u,"paper",void 0);if(c!=="paper"){var f=eV.getFromId(o,c);f._imgIndices.push(t._index)}eV.coercePosition(t,o,n,c,u,0)}return t}});var F0e=ye((glr,D0e)=>{"use strict";var I0e=qa(),Ogt=So(),AT=ho(),R0e=df(),Bgt=Wp();D0e.exports=function(t){var r=t._fullLayout,n=[],i={},a=[],o,s;for(s=0;s{"use strict";var z0e=Eo(),Ngt=M6();q0e.exports=function(t,r,n,i){r=r||{};var a=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(a||o){for(var s=t._fullLayout.images,l=r._id.charAt(0),u,c,f=0;f{"use strict";B0e.exports={moduleType:"component",name:"images",layoutAttributes:QU(),supplyLayoutDefaults:P0e(),includeBasePlot:XM()("images"),draw:F0e(),convertCoords:O0e()}});var AI=ye((_lr,U0e)=>{"use strict";U0e.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:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}}});var tV=ye((xlr,G0e)=>{"use strict";var Ugt=ec(),Vgt=Ih(),Ggt=Ao().extendFlat,Hgt=mc().overrideAll,jgt=z6(),V0e=vl().templatedArray,Wgt=V0e("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}});G0e.exports=Hgt(V0e("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:Wgt,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:Ggt(jgt({editType:"arraydraw"}),{}),font:Ugt({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:Vgt.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var X0e=ye((blr,W0e)=>{"use strict";var SI=Pr(),H0e=Kd(),j0e=tV(),Xgt=AI(),Zgt=Xgt.name,Ygt=j0e.buttons;W0e.exports=function(t,r){var n={name:Zgt,handleItemDefaults:Kgt};H0e(t,r,n)};function Kgt(e,t,r){function n(o,s){return SI.coerce(e,t,j0e,o,s)}var i=H0e(e,t,{name:"buttons",handleItemDefaults:Jgt}),a=n("visible",i.length>0);a&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),SI.noneOrAll(e,t,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),SI.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function Jgt(e,t){function r(i,a){return SI.coerce(e,t,Ygt,i,a)}var n=r("visible",e.method==="skip"||Array.isArray(e.args));n&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}});var K0e=ye((wlr,Y0e)=>{"use strict";Y0e.exports=Mf;var Ng=qa(),Z0e=ka(),ST=So(),MI=Pr();function Mf(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}Mf.barWidth=2;Mf.barLength=20;Mf.barRadius=2;Mf.barPad=1;Mf.barColor="#808BA4";Mf.prototype.enable=function(t,r,n){var i=this.gd._fullLayout,a=i.width,o=i.height;this.position=t;var s=this.position.l,l=this.position.w,u=this.position.t,c=this.position.h,f=this.position.direction,h=f==="down",d=f==="left",v=f==="right",m=f==="up",b=l,p=c,k,M,T,L;!h&&!d&&!v&&!m&&(this.position.direction="down",h=!0);var x=h||m;x?(k=s,M=k+b,h?(T=u,L=Math.min(T+p,o),p=L-T):(L=u+p,T=Math.max(L-p,0),p=L-T)):(T=u,L=T+p,d?(M=s+b,k=Math.max(M-b,0),b=M-k):(k=s,M=Math.min(k+b,a),b=M-k)),this._box={l:k,t:T,w:b,h:p};var C=l>b,S=Mf.barLength+2*Mf.barPad,g=Mf.barWidth+2*Mf.barPad,P=s,E=u+c;E+g>o&&(E=o-g);var z=this.container.selectAll("rect.scrollbar-horizontal").data(C?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-horizontal",!0).call(Z0e.fill,Mf.barColor),C?(this.hbar=z.attr({rx:Mf.barRadius,ry:Mf.barRadius,x:P,y:E,width:S,height:g}),this._hbarXMin=P+S/2,this._hbarTranslateMax=b-S):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var q=c>p,V=Mf.barWidth+2*Mf.barPad,G=Mf.barLength+2*Mf.barPad,Z=s+l,j=u;Z+V>a&&(Z=a-V);var N=this.container.selectAll("rect.scrollbar-vertical").data(q?[0]:[]);N.exit().on(".drag",null).remove(),N.enter().append("rect").classed("scrollbar-vertical",!0).call(Z0e.fill,Mf.barColor),q?(this.vbar=N.attr({rx:Mf.barRadius,ry:Mf.barRadius,x:Z,y:j,width:V,height:G}),this._vbarYMin=j+G/2,this._vbarTranslateMax=p-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var H=this.id,ie=k-.5,ae=q?M+V+.5:M+.5,_e=T-.5,Ee=C?L+g+.5:L+.5,Ce=i._topdefs.selectAll("#"+H).data(C||q?[0]:[]);if(Ce.exit().remove(),Ce.enter().append("clipPath").attr("id",H).append("rect"),C||q?(this._clipRect=Ce.select("rect").attr({x:Math.floor(ie),y:Math.floor(_e),width:Math.ceil(ae)-Math.floor(ie),height:Math.ceil(Ee)-Math.floor(_e)}),this.container.call(ST.setClipUrl,H,this.gd),this.bg.attr({x:s,y:u,width:l,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(ST.setClipUrl,null),delete this._clipRect),C||q){var ge=Ng.behavior.drag().on("dragstart",function(){Ng.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(ge);var re=Ng.behavior.drag().on("dragstart",function(){Ng.event.sourceEvent.preventDefault(),Ng.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));C&&this.hbar.on(".drag",null).call(re),q&&this.vbar.on(".drag",null).call(re)}this.setTranslate(r,n)};Mf.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(ST.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)};Mf.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=Ng.event.dx),this.vbar&&(r-=Ng.event.dy),this.setTranslate(t,r)};Mf.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=Ng.event.deltaY),this.vbar&&(r+=Ng.event.deltaY),this.setTranslate(t,r)};Mf.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,i=n+this._hbarTranslateMax,a=MI.constrain(Ng.event.x,n,i),o=(a-n)/(i-n),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var l=r+this._vbarYMin,u=l+this._vbarTranslateMax,c=MI.constrain(Ng.event.y,l,u),f=(c-l)/(u-l),h=this.position.h-this._box.h;r=f*h}this.setTranslate(t,r)};Mf.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,i=this.position.h-this._box.h;if(t=MI.constrain(t||0,0,n),r=MI.constrain(r||0,0,i),this.translateX=t,this.translateY=r,this.container.call(ST.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var a=t/n;this.hbar.call(ST.setTranslate,t+a*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(ST.setTranslate,t,r+o*this._vbarTranslateMax)}}});var oge=ye((Tlr,age)=>{"use strict";var MT=qa(),g4=Mc(),m4=ka(),ET=So(),t0=Pr(),EI=Zl(),$gt=vl().arrayEditor,$0e=Dh().LINE_SPACING,es=AI(),Qgt=K0e();age.exports=function(t){var r=t._fullLayout,n=t0.filterVisible(r[es.name]);function i(h){g4.autoMargin(t,ige(h))}var a=r._menulayer.selectAll("g."+es.containerClassName).data(n.length>0?[0]:[]);if(a.enter().append("g").classed(es.containerClassName,!0).style("cursor","pointer"),a.exit().each(function(){MT.select(this).selectAll("g."+es.headerGroupClassName).each(i)}).remove(),n.length!==0){var o=a.selectAll("g."+es.headerGroupClassName).data(n,emt);o.enter().append("g").classed(es.headerGroupClassName,!0);for(var s=t0.ensureSingle(a,"g",es.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),l=0;l{"use strict";var smt=AI();sge.exports={moduleType:"component",name:smt.name,layoutAttributes:tV(),supplyLayoutDefaults:X0e(),draw:oge()}});var _4=ye((Slr,uge)=>{"use strict";uge.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}});var aV=ye((Mlr,hge)=>{"use strict";var cge=ec(),lmt=z6(),umt=Ao().extendDeepAll,cmt=mc().overrideAll,fmt=WS(),fge=vl().templatedArray,c2=_4(),hmt=fge("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}});hge.exports=cmt(fge("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:hmt,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:umt(lmt({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:fmt.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:cge({})},font:cge({}),activebgcolor:{valType:"color",dflt:c2.gripBgActiveColor},bgcolor:{valType:"color",dflt:c2.railBgColor},bordercolor:{valType:"color",dflt:c2.railBorderColor},borderwidth:{valType:"number",min:0,dflt:c2.railBorderWidth},ticklen:{valType:"number",min:0,dflt:c2.tickLength},tickcolor:{valType:"color",dflt:c2.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:c2.minorTickLength}}),"arraydraw","from-root")});var gge=ye((Elr,pge)=>{"use strict";var kT=Pr(),dge=Kd(),vge=aV(),dmt=_4(),vmt=dmt.name,pmt=vge.steps;pge.exports=function(t,r){dge(t,r,{name:vmt,handleItemDefaults:gmt})};function gmt(e,t,r){function n(f,h){return kT.coerce(e,t,vge,f,h)}for(var i=dge(e,t,{name:"steps",handleItemDefaults:mmt}),a=0,o=0;o{"use strict";var Ug=qa(),kI=Mc(),k_=ka(),Vg=So(),r0=Pr(),ymt=r0.strTranslate,x4=Zl(),_mt=vl().arrayEditor,Rs=_4(),lV=Dh(),_ge=lV.LINE_SPACING,oV=lV.FROM_TL,sV=lV.FROM_BR;Sge.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,i=xmt(n,t),a=n._infolayer.selectAll("g."+Rs.containerClassName).data(i.length>0?[0]:[]);a.enter().append("g").classed(Rs.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),kI.autoMargin(t,xge(c))}if(a.exit().each(function(){Ug.select(this).selectAll("g."+Rs.groupClassName).each(o)}).remove(),i.length!==0){var s=a.selectAll("g."+Rs.groupClassName).data(i,bmt);s.enter().append("g").classed(Rs.groupClassName,!0),s.exit().each(o).remove();for(var l=0;l0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",ymt(o-Rs.gripWidth*.5,t._dims.currentValueTotalHeight))}}function uV(e,t){var r=e._dims;return r.inputAreaStart+Rs.stepInset+(r.inputAreaLength-2*Rs.stepInset)*Math.min(1,Math.max(0,t))}function yge(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-Rs.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*Rs.stepInset-2*r.inputAreaStart)))}function kmt(e,t,r){var n=r._dims,i=r0.ensureSingle(e,"rect",Rs.railTouchRectClass,function(a){a.call(Tge,t,e,r).style("pointer-events","all")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,Rs.tickOffset+r.ticklen+n.labelHeight)}).call(k_.fill,r.bgcolor).attr("opacity",0),Vg.setTranslate(i,0,n.currentValueTotalHeight)}function Cmt(e,t){var r=t._dims,n=r.inputAreaLength-Rs.railInset*2,i=r0.ensureSingle(e,"rect",Rs.railRectClass);i.attr({width:n,height:Rs.railWidth,rx:Rs.railRadius,ry:Rs.railRadius,"shape-rendering":"crispEdges"}).call(k_.stroke,t.bordercolor).call(k_.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),Vg.setTranslate(i,Rs.railInset,(r.inputAreaWidth-Rs.railWidth)*.5+r.currentValueTotalHeight)}});var kge=ye((Clr,Ege)=>{"use strict";var Lmt=_4();Ege.exports={moduleType:"component",name:Lmt.name,layoutAttributes:aV(),supplyLayoutDefaults:gge(),draw:Mge()}});var LI=ye((Llr,Lge)=>{"use strict";var Cge=Ih();Lge.exports={bgcolor:{valType:"color",dflt:Cge.background,editType:"plot"},bordercolor:{valType:"color",dflt:Cge.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}});var cV=ye((Plr,Pge)=>{"use strict";Pge.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}});var PI=ye((Ilr,Ige)=>{"use strict";Ige.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}});var Fge=ye(RI=>{"use strict";var Pmt=df(),Imt=Zl(),Rge=PI(),Rmt=Dh().LINE_SPACING,II=Rge.name;function Dge(e){var t=e&&e[II];return t&&t.visible}RI.isVisible=Dge;RI.makeData=function(e){for(var t=Pmt.list({_fullLayout:e},"x",!0),r=e.margin,n=[],i=0;i{"use strict";var DI=Pr(),zge=vl(),qge=df(),Dmt=LI(),Fmt=cV();Oge.exports=function(t,r,n){var i=t[n],a=r[n];if(!(i.rangeslider||r._requestRangeslider[a._id]))return;DI.isPlainObject(i.rangeslider)||(i.rangeslider={});var o=i.rangeslider,s=zge.newContainer(a,"rangeslider");function l(L,x){return DI.coerce(o,s,Dmt,L,x)}var u,c;function f(L,x){return DI.coerce(u,c,Fmt,L,x)}var h=l("visible");if(h){l("bgcolor",r.plot_bgcolor),l("bordercolor"),l("borderwidth"),l("thickness"),l("autorange",!a.isValidRange(o.range)),l("range");var d=r._subplots;if(d)for(var v=d.cartesian.filter(function(L){return L.slice(0,Math.max(0,L.indexOf("y")))===qge.name2id(n)}).map(function(L){return L.slice(L.indexOf("y"),L.length)}),m=DI.simpleMap(v,qge.id2name),b=0;b{"use strict";var zmt=df().list,qmt=Mg().getAutoRange,Omt=PI();Nge.exports=function(t){for(var r=zmt(t,"x",!0),n=0;n{"use strict";var FI=qa(),Bmt=Oa(),Nmt=Mc(),Jf=Pr(),zI=Jf.strTranslate,Gge=So(),C_=ka(),Umt=qb(),Vmt=mh(),fV=df(),Gmt=yv(),Hmt=Eg(),rl=PI();Hge.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n=N.max)Z=E[j+1];else if(G=N.pmax)Z=E[j+1];else if(G0?e.touches[0].clientX:0}function jmt(e,t,r,n){if(t._context.staticPlot)return;var i=e.select("rect."+rl.slideBoxClassName).node(),a=e.select("rect."+rl.grabAreaMinClassName).node(),o=e.select("rect."+rl.grabAreaMaxClassName).node();function s(){var l=FI.event,u=l.target,c=Vge(l),f=c-e.node().getBoundingClientRect().left,h=n.d2p(r._rl[0]),d=n.d2p(r._rl[1]),v=Gmt.coverSlip();this.addEventListener("touchmove",m),this.addEventListener("touchend",b),v.addEventListener("mousemove",m),v.addEventListener("mouseup",b);function m(p){var k=Vge(p),M=+k-c,T,L,x;switch(u){case i:if(x="ew-resize",h+M>r._length||d+M<0)return;T=h+M,L=d+M;break;case a:if(x="col-resize",h+M>r._length)return;T=h+M,L=d;break;case o:if(x="col-resize",d+M<0)return;T=h,L=d+M;break;default:x="ew-resize",T=f,L=f+M;break}if(L{"use strict";var tyt=Pr(),ryt=LI(),iyt=cV(),hV=Fge();Wge.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:tyt.extendFlat({},ryt,{yaxis:iyt})}}},layoutAttributes:LI(),handleDefaults:Bge(),calcAutorange:Uge(),draw:jge(),isVisible:hV.isVisible,makeData:hV.makeData,autoMarginOpts:hV.autoMarginOpts}});var qI=ye((Olr,Yge)=>{"use strict";var nyt=ec(),Zge=Ih(),ayt=vl().templatedArray,oyt=ayt("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});Yge.exports={visible:{valType:"boolean",editType:"plot"},buttons:oyt,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:nyt({editType:"plot"}),bgcolor:{valType:"color",dflt:Zge.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:Zge.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var dV=ye((Blr,Kge)=>{"use strict";Kge.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var Qge=ye((Nlr,$ge)=>{"use strict";var OI=Pr(),syt=ka(),lyt=vl(),uyt=Kd(),Jge=qI(),vV=dV();$ge.exports=function(t,r,n,i,a){var o=t.rangeselector||{},s=lyt.newContainer(r,"rangeselector");function l(d,v){return OI.coerce(o,s,Jge,d,v)}var u=uyt(o,s,{name:"buttons",handleItemDefaults:cyt,calendar:a}),c=l("visible",u.length>0);if(c){var f=fyt(r,n,i);l("x",f[0]),l("y",f[1]),OI.noneOrAll(t,r,["x","y"]),l("xanchor"),l("yanchor"),OI.coerceFont(l,"font",n.font);var h=l("bgcolor");l("activecolor",syt.contrast(h,vV.lightAmount,vV.darkAmount)),l("bordercolor"),l("borderwidth")}};function cyt(e,t,r,n){var i=n.calendar;function a(l,u){return OI.coerce(e,t,Jge.buttons,l,u)}var o=a("visible");if(o){var s=a("step");s!=="all"&&(i&&i!=="gregorian"&&(s==="month"||s==="year")?t.stepmode="backward":a("stepmode"),a("count")),a("label")}}function fyt(e,t,r){for(var n=r.filter(function(s){return t[s].anchor===e._id}),i=0,a=0;a{"use strict";var hyt=Eq(),dyt=Pr().titleCase;eme.exports=function(t,r){var n=t._name,i={};if(r.step==="all")i[n+".autorange"]=!0;else{var a=vyt(t,r);i[n+".range[0]"]=a[0],i[n+".range[1]"]=a[1]}return i};function vyt(e,t){var r=e.range,n=new Date(e.r2l(r[1])),i=t.step,a=hyt["utc"+dyt(i)],o=t.count,s;switch(t.stepmode){case"backward":s=e.l2r(+a.offset(n,-o));break;case"todate":var l=a.offset(n,-o);s=e.l2r(+a.ceil(l));break}var u=r[1];return[s,u]}});var ume=ye((Vlr,lme)=>{"use strict";var NI=qa(),pyt=Oa(),gyt=Mc(),rme=ka(),sme=So(),Ny=Pr(),ime=Ny.strTranslate,BI=Zl(),myt=df(),mV=Dh(),nme=mV.LINE_SPACING,ame=mV.FROM_TL,ome=mV.FROM_BR,gV=dV(),yyt=tme();lme.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(".rangeselector").data(_yt(t),xyt);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(i){var a=NI.select(this),o=i,s=o.rangeselector,l=a.selectAll("g.button").data(Ny.filterVisible(s.buttons));l.enter().append("g").classed("button",!0),l.exit().remove(),l.each(function(u){var c=NI.select(this),f=yyt(o,u);u._isActive=byt(o,u,f),c.call(pV,s,u),c.call(Tyt,s,u,t),c.on("click",function(){t._dragged||pyt.call("_guiRelayout",t,f)}),c.on("mouseover",function(){u._isHovered=!0,c.call(pV,s,u)}),c.on("mouseout",function(){u._isHovered=!1,c.call(pV,s,u)})}),Syt(t,l,s,o._name,a)})};function _yt(e){for(var t=myt.list(e,"x",!0),r=[],n=0;n{"use strict";cme.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:qI()}}},layoutAttributes:qI(),handleDefaults:Qge(),draw:ume()}});var Cc=ye(yV=>{"use strict";var hme=Ao().extendFlat;yV.attributes=function(e,t){e=e||{},t=t||{};var r={valType:"info_array",editType:e.editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},n=e.name?e.name+" ":"",i=e.trace?"trace ":"subplot ",a=t.description?" "+t.description:"",o={x:hme({},r,{}),y:hme({},r,{}),editType:e.editType};return e.noGridCell||(o.row={valType:"integer",min:0,dflt:0,editType:e.editType},o.column={valType:"integer",min:0,dflt:0,editType:e.editType}),o};yV.defaults=function(e,t,r,n){var i=n&&n.x||[0,1],a=n&&n.y||[0,1],o=t.grid;if(o){var s=r("domain.column");s!==void 0&&(s{"use strict";var Myt=Pr(),Eyt=m3().counter,kyt=Cc().attributes,dme=Rh().idRegex,Cyt=vl(),_V={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[Eyt("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[dme.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[dme.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:kyt({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function UI(e,t,r){var n=t[r+"axes"],i=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(n))return n;if(i.length)return i}function Lyt(e,t){var r=e.grid||{},n=UI(t,r,"x"),i=UI(t,r,"y");if(!e.grid&&!n&&!i)return;var a=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(n),s=Array.isArray(i),l=o&&n!==r.xaxes&&s&&i!==r.yaxes,u,c;a?(u=r.subplots.length,c=r.subplots[0].length):(s&&(u=i.length),o&&(c=n.length));var f=Cyt.newContainer(t,"grid");function h(x,C){return Myt.coerce(r,f,_V,x,C)}var d=h("rows",u),v=h("columns",c);if(!(d*v>1)){delete t.grid;return}if(!a&&!o&&!s){var m=h("pattern")==="independent";m&&(a=!0)}f._hasSubplotGrid=a;var b=h("roworder"),p=b==="top to bottom",k=a?.2:.1,M=a?.3:.1,T,L;l&&t._splomGridDflt&&(T=t._splomGridDflt.xside,L=t._splomGridDflt.yside),f._domains={x:vme("x",h,k,T,v),y:vme("y",h,M,L,d,p)}}function vme(e,t,r,n,i,a){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var l=new Array(i),u=s[0],c=(s[1]-u)/(i-o),f=c*(1-o),h=0;h{"use strict";mme.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc"}});var xme=ye((Xlr,_me)=>{"use strict";var yme=Eo(),Iyt=Oa(),Ryt=Pr(),Dyt=vl(),Fyt=bV();_me.exports=function(e,t,r,n){var i="error_"+n.axis,a=Dyt.newContainer(t,i),o=e[i]||{};function s(v,m){return Ryt.coerce(o,a,Fyt,v,m)}var l=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=s("visible",l);if(u!==!1){var c=s("type","array"in o?"data":"percent"),f=!0;c!=="sqrt"&&(f=s("symmetric",!((c==="data"?"arrayminus":"valueminus")in o))),c==="data"?(s("array"),s("traceref"),f||(s("arrayminus"),s("tracerefminus"))):(c==="percent"||c==="constant")&&(s("value"),f||s("valueminus"));var h="copy_"+n.inherit+"style";if(n.inherit){var d=t["error_"+n.inherit];(d||{}).visible&&s(h,!(o.color||yme(o.thickness)||yme(o.width)))}(!n.inherit||!a[h])&&(s("color",r),s("thickness"),s("width",Iyt.traceIs(t,"gl3d")?0:4))}}});var wV=ye((Zlr,wme)=>{"use strict";wme.exports=function(t){var r=t.type,n=t.symmetric;if(r==="data"){var i=t.array||[];if(n)return function(u,c){var f=+i[c];return[f,f]};var a=t.arrayminus||[];return function(u,c){var f=+i[c],h=+a[c];return!isNaN(f)||!isNaN(h)?[h||0,f||0]:[NaN,NaN]}}else{var o=bme(r,t.value),s=bme(r,t.valueminus);return n||t.valueminus===void 0?function(u){var c=o(u);return[c,c]}:function(u){return[s(u),o(u)]}}};function bme(e,t){if(e==="percent")return function(r){return Math.abs(r*t/100)};if(e==="constant")return function(){return Math.abs(t)};if(e==="sqrt")return function(r){return Math.sqrt(Math.abs(r))}}});var Sme=ye((Ylr,Ame)=>{"use strict";var TV=Eo(),zyt=Oa(),AV=ho(),qyt=Pr(),Oyt=wV();Ame.exports=function(t){for(var r=t.calcdata,n=0;n{"use strict";var Mme=qa(),L_=Eo(),Byt=So(),Nyt=Ru();Eme.exports=function(t,r,n,i){var a,o=n.xaxis,s=n.yaxis,l=i&&i.duration>0,u=t._context.staticPlot;r.each(function(c){var f=c[0].trace,h=f.error_x||{},d=f.error_y||{},v;f.ids&&(v=function(k){return k.id});var m=Nyt.hasMarkers(f)&&f.marker.maxdisplayed>0;!d.visible&&!h.visible&&(c=[]);var b=Mme.select(this).selectAll("g.errorbar").data(c,v);if(b.exit().remove(),!!c.length){h.visible||b.selectAll("path.xerror").remove(),d.visible||b.selectAll("path.yerror").remove(),b.style("opacity",1);var p=b.enter().append("g").classed("errorbar",!0);l&&p.style("opacity",0).transition().duration(i.duration).style("opacity",1),Byt.setClipUrl(b,n.layerClipId,t),b.each(function(k){var M=Mme.select(this),T=Uyt(k,o,s);if(!(m&&!k.vis)){var L,x=M.select("path.yerror");if(d.visible&&L_(T.x)&&L_(T.yh)&&L_(T.ys)){var C=d.width;L="M"+(T.x-C)+","+T.yh+"h"+2*C+"m-"+C+",0V"+T.ys,T.noYS||(L+="m-"+C+",0h"+2*C),a=!x.size(),a?x=M.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):l&&(x=x.transition().duration(i.duration).ease(i.easing)),x.attr("d",L)}else x.remove();var S=M.select("path.xerror");if(h.visible&&L_(T.y)&&L_(T.xh)&&L_(T.xs)){var g=(h.copy_ystyle?d:h).width;L="M"+T.xh+","+(T.y-g)+"v"+2*g+"m0,-"+g+"H"+T.xs,T.noXS||(L+="m0,-"+g+"v"+2*g),a=!S.size(),a?S=M.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):l&&(S=S.transition().duration(i.duration).ease(i.easing)),S.attr("d",L)}else S.remove()}})}})};function Uyt(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),L_(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),L_(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}});var Pme=ye((Jlr,Lme)=>{"use strict";var Vyt=qa(),Cme=ka();Lme.exports=function(t){t.each(function(r){var n=r[0].trace,i=n.error_y||{},a=n.error_x||{},o=Vyt.select(this);o.selectAll("path.yerror").style("stroke-width",i.thickness+"px").call(Cme.stroke,i.color),a.copy_ystyle&&(a=i),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(Cme.stroke,a.color)})}});var Dme=ye(($lr,Rme)=>{"use strict";var b4=Pr(),Ime=mc().overrideAll,w4=bV(),f2={error_x:b4.extendFlat({},w4),error_y:b4.extendFlat({},w4)};delete f2.error_x.copy_zstyle;delete f2.error_y.copy_zstyle;delete f2.error_y.copy_ystyle;var T4={error_x:b4.extendFlat({},w4),error_y:b4.extendFlat({},w4),error_z:b4.extendFlat({},w4)};delete T4.error_x.copy_ystyle;delete T4.error_y.copy_ystyle;delete T4.error_z.copy_ystyle;delete T4.error_z.copy_zstyle;Rme.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:f2,bar:f2,histogram:f2,scatter3d:Ime(T4,"calc","nested"),scattergl:Ime(f2,"calc","nested")}},supplyDefaults:xme(),calc:Sme(),makeComputeError:wV(),plot:kme(),style:Pme(),hoverInfo:Gyt};function Gyt(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}});var zme=ye((Qlr,Fme)=>{"use strict";Fme.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"}}});var Gme=ye((eur,Vme)=>{"use strict";var P_=qa(),SV=fd(),GI=Mc(),qme=Oa(),Uy=ho(),VI=yv(),U0=Pr(),Hg=U0.strTranslate,Ume=Ao().extendFlat,MV=Eg(),Gg=So(),EV=ka(),Hyt=qb(),jyt=Zl(),Wyt=pv().flipScale,Xyt=h4(),Zyt=vI(),Yyt=Rd(),kV=Dh(),Ome=kV.LINE_SPACING,Bme=kV.FROM_TL,Nme=kV.FROM_BR,gf=zme().cn;function Kyt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+gf.colorbar).data(Jyt(e),function(n){return n._id});r.enter().append("g").attr("class",function(n){return n._id}).classed(gf.colorbar,!0),r.each(function(n){var i=P_.select(this);U0.ensureSingle(i,"rect",gf.cbbg),U0.ensureSingle(i,"g",gf.cbfills),U0.ensureSingle(i,"g",gf.cblines),U0.ensureSingle(i,"g",gf.cbaxis,function(o){o.classed(gf.crisp,!0)}),U0.ensureSingle(i,"g",gf.cbtitleunshift,function(o){o.append("g").classed(gf.cbtitle,!0)}),U0.ensureSingle(i,"rect",gf.cboutline);var a=$yt(i,n,e);a&&a.then&&(e._promises||[]).push(a),e._context.edits.colorbarPosition&&Qyt(i,n,e)}),r.exit().each(function(n){GI.autoMargin(e,n._id)}).remove(),r.order()}function Jyt(e){var t=e._fullLayout,r=e.calcdata,n=[],i,a,o,s;function l(M){return Ume(M,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){typeof s.calc=="function"?s.calc(e,o,i):(i._fillgradient=a.reversescale?Wyt(a.colorscale):a.colorscale,i._zrange=[a[s.min],a[s.max]])}for(var c=0;c1){var Pe=Math.pow(10,Math.floor(Math.log(me)/Math.LN10));Be*=Pe*U0.roundUp(me/Pe,[2,5,10]),(Math.abs(z.start)/z.size+1e-6)%1<2e-6&&(ke.tick0=0)}ke.dtick=Be}ke.domain=n?[re+v/T.h,re+H-v/T.h]:[re+d/T.w,re+H-d/T.w],ke.setScale(),e.attr("transform",Hg(Math.round(T.l),Math.round(T.t)));var ce=e.select("."+gf.cbtitleunshift).attr("transform",Hg(-Math.round(T.l),-Math.round(T.t))),He=ke.ticklabelposition,lt=ke.title.font.size,mt=e.select("."+gf.cbaxis),Ht,at=0,ct=0;function ar(Ue,Ae){var rt={propContainer:ke,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:M._dfltTitle.colorbar,containerGroup:e.select("."+gf.cbtitle)},St=Ue.charAt(0)==="h"?Ue.slice(1):"h"+Ue;e.selectAll("."+St+",."+St+"-math-group").remove(),Hyt.draw(r,Ue,Ume(rt,Ae||{}))}function Vt(){if(n&&be||!n&&!be){var Ue,Ae;S==="top"&&(Ue=d+T.l+ie*m,Ae=v+T.t+ae*(1-re-H)+3+lt*.75),S==="bottom"&&(Ue=d+T.l+ie*m,Ae=v+T.t+ae*(1-re)-3-lt*.25),S==="right"&&(Ae=v+T.t+ae*b+3+lt*.75,Ue=d+T.l+ie*re),ar(ke._id+"title",{attributes:{x:Ue,y:Ae,"text-anchor":n?"start":"middle"}})}}function rr(){if(n&&!be||!n&&be){var Ue=ke.position||0,Ae=ke._offset+ke._length/2,rt,St;if(S==="right")St=Ae,rt=T.l+ie*Ue+10+lt*(ke.showticklabels?1:.5);else if(rt=Ae,S==="bottom"&&(St=T.t+ae*Ue+10+(He.indexOf("inside")===-1?ke.tickfont.size:0)+(ke.ticks!=="inside"&&t.ticklen||0)),S==="top"){var Tt=C.text.split("
").length;St=T.t+ae*Ue+10-Z-Ome*lt*Tt}ar((n?"h":"v")+ke._id+"title",{avoid:{selection:P_.select(r).selectAll("g."+ke._id+"tick"),side:S,offsetTop:n?0:T.t,offsetLeft:n?T.l:0,maxShift:n?M.width:M.height},attributes:{x:rt,y:St,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function tt(){if(!n&&!be||n&&be){var Ue=e.select("."+gf.cbtitle),Ae=Ue.select("text"),rt=[-l/2,l/2],St=Ue.select(".h"+ke._id+"title-math-group").node(),Tt=15.6;Ae.node()&&(Tt=parseInt(Ae.node().style.fontSize,10)*Ome);var dt;if(St?(dt=Gg.bBox(St),ct=dt.width,at=dt.height,at>Tt&&(rt[1]-=(at-Tt)/2)):Ae.node()&&!Ae.classed(gf.jsPlaceholder)&&(dt=Gg.bBox(Ae.node()),ct=dt.width,at=dt.height),n){if(at){if(at+=5,S==="top")ke.domain[1]-=at/T.h,rt[1]*=-1;else{ke.domain[0]+=at/T.h;var Et=jyt.lineCount(Ae);rt[1]+=(1-Et)*Tt}Ue.attr("transform",Hg(rt[0],rt[1])),ke.setScale()}}else ct&&(S==="right"&&(ke.domain[0]+=(ct+lt/2)/T.w),Ue.attr("transform",Hg(rt[0],rt[1])),ke.setScale())}e.selectAll("."+gf.cbfills+",."+gf.cblines).attr("transform",n?Hg(0,Math.round(T.h*(1-ke.domain[1]))):Hg(Math.round(T.w*ke.domain[0]),0)),mt.attr("transform",n?Hg(0,Math.round(-T.t)):Hg(Math.round(-T.l),0));var pt=e.select("."+gf.cbfills).selectAll("rect."+gf.cbfill).attr("style","").data(V);pt.enter().append("rect").classed(gf.cbfill,!0).attr("style",""),pt.exit().remove();var jt=g.map(ke.c2p).map(Math.round).sort(function(qr,jr){return qr-jr});pt.each(function(qr,jr){var gt=[jr===0?g[0]:(V[jr]+V[jr-1])/2,jr===V.length-1?g[1]:(V[jr]+V[jr+1])/2].map(ke.c2p).map(Math.round);n&&(gt[1]=U0.constrain(gt[1]+(gt[1]>gt[0])?1:-1,jt[0],jt[1]));var Ge=P_.select(this).attr(n?"x":"y",_e).attr(n?"y":"x",P_.min(gt)).attr(n?"width":"height",Math.max(Z,2)).attr(n?"height":"width",Math.max(P_.max(gt)-P_.min(gt),2));if(t._fillgradient)Gg.gradient(Ge,r,t._id,n?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var Je=E(qr).replace("e-","");Ge.attr("fill",SV(Je).toHexString())}});var or=e.select("."+gf.cblines).selectAll("path."+gf.cbline).data(x.color&&x.width?G:[]);or.enter().append("path").classed(gf.cbline,!0),or.exit().remove(),or.each(function(qr){var jr=_e,gt=Math.round(ke.c2p(qr))+x.width/2%1;P_.select(this).attr("d","M"+(n?jr+","+gt:gt+","+jr)+(n?"h":"v")+Z).call(Gg.lineGroupStyle,x.width,P(qr),x.dash)}),mt.selectAll("g."+ke._id+"tick,path").remove();var mr=_e+Z+(l||0)/2-(t.ticks==="outside"?1:0),Ar=Uy.calcTicks(ke),ei=Uy.getTickSigns(ke)[2];return Uy.drawTicks(r,ke,{vals:ke.ticks==="inside"?Uy.clipEnds(ke,Ar):Ar,layer:mt,path:Uy.makeTickPath(ke,mr,ei),transFn:Uy.makeTransTickFn(ke)}),Uy.drawLabels(r,ke,{vals:Ar,layer:mt,transFn:Uy.makeTransTickLabelFn(ke),labelFns:Uy.makeLabelFns(ke,mr)})}function je(){var Ue,Ae=Z+l/2;He.indexOf("inside")===-1&&(Ue=Gg.bBox(mt.node()),Ae+=n?Ue.width:Ue.height),Ht=ce.select("text");var rt=0,St=n&&S==="top",Tt=!n&&S==="right",dt=0;if(Ht.node()&&!Ht.classed(gf.jsPlaceholder)){var Et,pt=ce.select(".h"+ke._id+"title-math-group").node();pt&&(n&&be||!n&&!be)?(Ue=Gg.bBox(pt),rt=Ue.width,Et=Ue.height):(Ue=Gg.bBox(ce.node()),rt=Ue.right-T.l-(n?_e:Se),Et=Ue.bottom-T.t-(n?Se:_e),!n&&S==="top"&&(Ae+=Ue.height,dt=Ue.height)),Tt&&(Ht.attr("transform",Hg(rt/2+lt/2,0)),rt*=2),Ae=Math.max(Ae,n?rt:Et)}var jt=(n?d:v)*2+Ae+u+l/2,or=0;!n&&C.text&&h==="bottom"&&b<=0&&(or=jt/2,jt+=or,dt+=or),M._hColorbarMoveTitle=or,M._hColorbarMoveCBTitle=dt;var mr=u+l,Ar=(n?_e:Se)-mr/2-(n?d:0),ei=(n?Se:_e)-(n?N:v+dt-or);e.select("."+gf.cbbg).attr("x",Ar).attr("y",ei).attr(n?"width":"height",Math.max(jt-or,2)).attr(n?"height":"width",Math.max(N+mr,2)).call(EV.fill,c).call(EV.stroke,t.bordercolor).style("stroke-width",u);var qr=Tt?Math.max(rt-10,0):0;e.selectAll("."+gf.cboutline).attr("x",(n?_e:Se+d)+qr).attr("y",(n?Se+v-N:_e)+(St?at:0)).attr(n?"width":"height",Math.max(Z,2)).attr(n?"height":"width",Math.max(N-(n?2*v+at:2*d+qr),2)).call(EV.stroke,t.outlinecolor).style({fill:"none","stroke-width":l});var jr=n?Ee*jt:0,gt=n?0:(1-Ce)*jt-dt;if(jr=k?T.l-jr:-jr,gt=p?T.t-gt:-gt,e.attr("transform",Hg(jr,gt)),!n&&(u||SV(c).getAlpha()&&!SV.equals(M.paper_bgcolor,c))){var Ge=mt.selectAll("text"),Je=Ge[0].length,We=e.select("."+gf.cbbg).node(),et=Gg.bBox(We),xt=Gg.getTranslate(e),At=2;Ge.each(function(mi,un){var Fn=0,An=Je-1;if(un===Fn||un===An){var Hn=Gg.bBox(this),Qn=Gg.getTranslate(this),Vi;if(un===An){var Kn=Hn.right+Qn.x,Jn=et.right+xt.x+Se-u-At+m;Vi=Jn-Kn,Vi>0&&(Vi=0)}else if(un===Fn){var Gt=Hn.left+Qn.x,wt=et.left+xt.x+Se+u+At;Vi=wt-Gt,Vi<0&&(Vi=0)}Vi&&(Je<3?this.setAttribute("transform","translate("+Vi+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Kt={},Qt=Bme[f],Mr=Nme[f],Gr=Bme[h],Ir=Nme[h],Yr=jt-Z;n?(a==="pixels"?(Kt.y=b,Kt.t=N*Gr,Kt.b=N*Ir):(Kt.t=Kt.b=0,Kt.yt=b+i*Gr,Kt.yb=b-i*Ir),s==="pixels"?(Kt.x=m,Kt.l=jt*Qt,Kt.r=jt*Mr):(Kt.l=Yr*Qt,Kt.r=Yr*Mr,Kt.xl=m-o*Qt,Kt.xr=m+o*Mr)):(a==="pixels"?(Kt.x=m,Kt.l=N*Qt,Kt.r=N*Mr):(Kt.l=Kt.r=0,Kt.xl=m+i*Qt,Kt.xr=m-i*Mr),s==="pixels"?(Kt.y=1-b,Kt.t=jt*Gr,Kt.b=jt*Ir):(Kt.t=Yr*Gr,Kt.b=Yr*Ir,Kt.yt=b-o*Gr,Kt.yb=b+o*Ir));var _i=t.y<.5?"b":"t",Pi=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var ai={r:M.width-Ar-jr,l:Ar+Kt.r,b:M.height-ei-gt,t:ei+Kt.b};k&&p?GI.autoMargin(r,t._id,Kt):k?r._fullLayout._reservedMargin[t._id][_i]=ai[_i]:p||n?r._fullLayout._reservedMargin[t._id][Pi]=ai[Pi]:r._fullLayout._reservedMargin[t._id][_i]=ai[_i]}return U0.syncOrAsync([GI.previousPromises,Vt,tt,rr,GI.previousPromises,je],r)}function Qyt(e,t,r){var n=t.orientation==="v",i=r._fullLayout,a=i._size,o,s,l;VI.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),MV(e)},moveFn:function(u,c){e.attr("transform",o+Hg(u,c)),s=VI.align((n?t._uFrac:t._vFrac)+u/a.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=VI.align((n?t._vFrac:1-t._uFrac)-c/a.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=VI.getCursor(s,l,t.xanchor,t.yanchor);MV(e,f)},doneFn:function(){if(MV(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+"x"]=s,u[t._propPrefix+"y"]=l,t._traceIndex!==void 0?qme.call("_guiRestyle",r,u,t._traceIndex):qme.call("_guiRelayout",r,u)}}})}function e1t(e,t,r){var n=t._levels,i=[],a=[],o,s,l=n.end+n.size/100,u=n.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=n.start+s*u,!(u>0?o>=l:o<=l));s++)o>c&&o0?o>=l:o<=l));s++)o>r[0]&&o{"use strict";Hme.exports={moduleType:"component",name:"colorbar",attributes:cL(),supplyDefaults:qO(),draw:Gme().draw,hasColorbar:LO()}});var Xme=ye((rur,Wme)=>{"use strict";Wme.exports={moduleType:"component",name:"legend",layoutAttributes:PB(),supplyLayoutDefaults:RB(),draw:XB(),style:GB()}});var Yme=ye((iur,Zme)=>{"use strict";Zme.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"}}});var Jme=ye((nur,Kme)=>{"use strict";Kme.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var LV=ye((aur,tye)=>{"use strict";var r1t=Oa(),eye=Pr(),CV=eye.extendFlat,$me=eye.extendDeep;function Qme(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function i1t(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}tye.exports=function(t,r){var n,i=t.data,a=t.layout,o=$me([],i),s=$me({},a,Qme(r.tileClass)),l=t._context||{};if(r.width&&(s.width=r.width),r.height&&(s.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){s.annotations=[];var u=Object.keys(s);for(n=0;n{"use strict";var n1t=Sb().EventEmitter,a1t=Oa(),o1t=Pr(),rye=qy(),s1t=LV(),l1t=KP(),u1t=JP();function c1t(e,t){var r=new n1t,n=s1t(e,{format:"png"}),i=n.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function a(){var s=rye.getDelay(i._fullLayout);setTimeout(function(){var l=l1t(i),u=document.createElement("canvas");u.id=o1t.randstr(),r=u1t({format:t.format,width:i._fullLayout.width,height:i._fullLayout.height,canvas:u,emitter:r,svg:l}),r.clean=function(){i&&document.body.removeChild(i)}},s)}var o=rye.getRedrawFunc(i);return a1t.call("_doPlot",i,n.data,n.layout,n.config).then(o).then(a).catch(function(s){r.emit("error",s)}),r}iye.exports=c1t});var sye=ye((sur,oye)=>{"use strict";var aye=qy(),f1t={getDelay:aye.getDelay,getRedrawFunc:aye.getRedrawFunc,clone:LV(),toSVG:KP(),svgToImg:JP(),toImage:nye(),downloadImage:uU()};oye.exports=f1t});var uye=ye(Vy=>{"use strict";Vy.version=m6().version;wee();cne();var h1t=Oa(),A4=Vy.register=h1t.register,IV=Cde(),lye=Object.keys(IV);for(HI=0;HI{"use strict";cye.exports=uye()});var qm=ye((cur,gye)=>{"use strict";var Bf=pf(),hye=vf().axisHoverFormat,{hovertemplateAttrs:d1t,texttemplateAttrs:v1t,templatefallbackAttrs:dye}=Ll(),pye=Tu(),p1t=ec(),vye=A_(),g1t=Pd().pattern,h2=Ao().extendFlat,RV=p1t({editType:"calc",arrayOk:!0,colorEditType:"style"}),m1t=Bf.marker,y1t=m1t.line,_1t=h2({},y1t.width,{dflt:0}),x1t=h2({width:_1t,editType:"calc"},pye("marker.line")),b1t=h2({line:x1t,editType:"calc"},pye("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:g1t,cornerradius:{valType:"any",editType:"calc"}});gye.exports={x:Bf.x,x0:Bf.x0,dx:Bf.dx,y:Bf.y,y0:Bf.y0,dy:Bf.dy,xperiod:Bf.xperiod,yperiod:Bf.yperiod,xperiod0:Bf.xperiod0,yperiod0:Bf.yperiod0,xperiodalignment:Bf.xperiodalignment,yperiodalignment:Bf.yperiodalignment,xhoverformat:hye("x"),yhoverformat:hye("y"),text:Bf.text,texttemplate:v1t({editType:"plot"},{keys:vye.eventDataKeys}),texttemplatefallback:dye({editType:"plot"}),hovertext:Bf.hovertext,hovertemplate:d1t({},{keys:vye.eventDataKeys}),hovertemplatefallback:dye(),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:h2({},RV,{}),insidetextfont:h2({},RV,{}),outsidetextfont:h2({},RV,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:h2({},Bf.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:b1t,offsetgroup:Bf.offsetgroup,alignmentgroup:Bf.alignmentgroup,selected:{marker:{opacity:Bf.selected.marker.opacity,color:Bf.selected.marker.color,editType:"style"},textfont:Bf.selected.textfont,editType:"style"},unselected:{marker:{opacity:Bf.unselected.marker.opacity,color:Bf.unselected.marker.color,editType:"style"},textfont:Bf.unselected.textfont,editType:"style"},zorder:Bf.zorder}});var WI=ye((fur,mye)=>{"use strict";mye.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"}}});var XI=ye((hur,xye)=>{"use strict";var w1t=ka(),yye=pv().hasColorscale,_ye=td(),T1t=Pr().coercePattern;xye.exports=function(t,r,n,i,a){var o=n("marker.color",i),s=yye(t,"marker");s&&_ye(t,r,a,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",w1t.defaultLine),yye(t,"marker.line")&&_ye(t,r,a,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),T1t(n,"marker.pattern",o,s),n("selected.marker.color"),n("unselected.marker.color")}});var i0=ye((dur,Mye)=>{"use strict";var bye=Eo(),LT=Pr(),wye=ka(),A1t=Oa(),S1t=lT(),M1t=Dg(),E1t=XI(),k1t=r2(),Tye=qm(),ZI=LT.coerceFont;function C1t(e,t,r,n){function i(u,c){return LT.coerce(e,t,Tye,u,c)}var a=S1t(e,t,n,i);if(!a){t.visible=!1;return}M1t(e,t,n,i),i("xhoverformat"),i("yhoverformat"),i("zorder"),i("orientation",t.x&&!t.y?"h":"v"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var o=i("textposition");Sye(e,t,n,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),E1t(e,t,i,r,n);var s=(t.marker.line||{}).color,l=A1t.getComponentMethod("errorbars","supplyDefaults");l(e,t,s||wye.defaultLine,{axis:"y"}),l(e,t,s||wye.defaultLine,{axis:"x",inherit:"y"}),LT.coerceSelectionMarkerOpacity(t,i)}function L1t(e,t){var r,n;function i(s,l){return LT.coerce(n._input,n,Tye,s,l)}for(var a=0;a=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&bye(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function Sye(e,t,r,n,i,a){a=a||{};var o=a.moduleHasSelected!==!1,s=a.moduleHasUnselected!==!1,l=a.moduleHasConstrain!==!1,u=a.moduleHasCliponaxis!==!1,c=a.moduleHasTextangle!==!1,f=a.moduleHasInsideanchor!==!1,h=!!a.hasPathbar,d=Array.isArray(i)||i==="auto",v=d||i==="inside",m=d||i==="outside";if(v||m){var b=ZI(n,"textfont",r.font),p=LT.extendFlat({},b),k=e.textfont&&e.textfont.color,M=!k;if(M&&delete p.color,ZI(n,"insidetextfont",p),h){var T=LT.extendFlat({},b);M&&delete T.color,ZI(n,"pathbar.textfont",T)}m&&ZI(n,"outsidetextfont",b),o&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),l&&n("constraintext"),u&&n("cliponaxis"),c&&n("textangle"),n("texttemplate"),n("texttemplatefallback")}v&&f&&n("insidetextanchor")}Mye.exports={supplyDefaults:C1t,crossTraceDefaults:L1t,handleText:Sye,validateCornerradius:Aye}});var DV=ye((vur,Eye)=>{"use strict";var P1t=Oa(),I1t=ho(),R1t=Pr(),D1t=WI(),F1t=i0().validateCornerradius;Eye.exports=function(e,t,r){function n(m,b){return R1t.coerce(e,t,D1t,m,b)}for(var i=!1,a=!1,o=!1,s={},l=n("barmode"),u=l==="group",c=0;c0&&!s[h]&&(o=!0),s[h]=!0),f.visible&&f.type==="histogram"){var d=I1t.getFromId({_fullLayout:t},f[f.orientation==="v"?"xaxis":"yaxis"]);d.type!=="category"&&(a=!0)}}if(!i){delete t.barmode;return}l!=="overlay"&&n("barnorm"),n("bargap",a&&!o?0:.2),n("bargroupgap");var v=n("barcornerradius");t.barcornerradius=F1t(v)}});var S4=ye((pur,kye)=>{"use strict";var PT=Pr();kye.exports=function(t,r){for(var n=0;n{"use strict";var Cye=ho(),Lye=zg(),Pye=pv().hasColorscale,Iye=gv(),z1t=S4(),q1t=q0();Rye.exports=function(t,r){var n=Cye.getFromId(t,r.xaxis||"x"),i=Cye.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c,f={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(a=n.makeCalcdata(r,"x",f),s=i.makeCalcdata(r,"y"),l=Lye(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y",f),s=n.makeCalcdata(r,"x"),l=Lye(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var h=Math.min(o.length,a.length),d=new Array(h),v=0;v{"use strict";var O1t=qa(),B1t=Pr();function N1t(e,t,r){var n=e._fullLayout,i=n["_"+r+"Text_minsize"];if(i){var a=n.uniformtext.mode==="hide",o;switch(r){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}t.selectAll(o).each(function(s){var l=s.transform;if(l){l.scale=a&&l.hide?0:i/l.fontSize;var u=O1t.select(this).select("text");B1t.setTransormAndDisplay(u,l)}})}}function U1t(e,t,r){if(r.uniformtext.mode){var n=Fye(e),i=r.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a{"use strict";var G1t=Eo(),H1t=fd(),qye=Pr().isArrayOrTypedArray;d2.coerceString=function(e,t,r){if(typeof t=="string"){if(t||!e.noBlank)return t}else if((typeof t=="number"||t===!0)&&!e.strict)return String(t);return r!==void 0?r:e.dflt};d2.coerceNumber=function(e,t,r){if(G1t(t)){t=+t;var n=e.min,i=e.max,a=n!==void 0&&ti;if(!a)return t}return r!==void 0?r:e.dflt};d2.coerceColor=function(e,t,r){return H1t(t).isValid()?t:r!==void 0?r:e.dflt};d2.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};d2.getValue=function(e,t){var r;return qye(e)?t{"use strict";var M4=qa(),j1t=ka(),E4=So(),Oye=Pr(),Bye=Oa(),Nye=bv().resizeText,FV=qm(),W1t=FV.textfont,X1t=FV.insidetextfont,Z1t=FV.outsidetextfont,ev=YI();function Y1t(e){var t=M4.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");Nye(e,t,"bar");var r=t.size(),n=e._fullLayout;t.style("opacity",function(i){return i[0].trace.opacity}).each(function(i){(n.barmode==="stack"&&r>1||n.bargap===0&&n.bargroupgap===0&&!i[0].trace.marker.line.width)&&M4.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(i){var a=M4.select(this),o=i[0].trace;Uye(a,o,e)}),Bye.getComponentMethod("errorbars","style")(t)}function Uye(e,t,r){E4.pointStyle(e.selectAll("path"),t,r),Vye(e,t,r)}function Vye(e,t,r){e.selectAll("text").each(function(n){var i=M4.select(this),a=Oye.ensureUniformFontSize(r,Gye(i,n,t,r));E4.font(i,a)})}function K1t(e,t,r){var n=t[0].trace;n.selectedpoints?J1t(r,n,e):(Uye(r,n,e),Bye.getComponentMethod("errorbars","style")(r))}function J1t(e,t,r){E4.selectedPointStyle(e.selectAll("path"),t),$1t(e.selectAll("text"),t,r)}function $1t(e,t,r){e.each(function(n){var i=M4.select(this),a;if(n.selected){a=Oye.ensureUniformFontSize(r,Gye(i,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(a.color=o),E4.font(i,a)}else E4.selectedTextStyle(i,t)})}function Gye(e,t,r,n){var i=n._fullLayout.font,a=r.textfont;if(e.classed("bartext-inside")){var o=Xye(t,r);a=jye(r,t.i,i,o)}else e.classed("bartext-outside")&&(a=Wye(r,t.i,i));return a}function Hye(e,t,r){return zV(W1t,e.textfont,t,r)}function jye(e,t,r,n){var i=Hye(e,t,r),a=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[t]===void 0;return a&&(i={color:j1t.contrast(n),family:i.family,size:i.size,weight:i.weight,style:i.style,variant:i.variant,textcase:i.textcase,lineposition:i.lineposition,shadow:i.shadow}),zV(X1t,e.insidetextfont,t,i)}function Wye(e,t,r){var n=Hye(e,t,r);return zV(Z1t,e.outsidetextfont,t,n)}function zV(e,t,r,n){t=t||{};var i=ev.getValue(t.family,r),a=ev.getValue(t.size,r),o=ev.getValue(t.color,r),s=ev.getValue(t.weight,r),l=ev.getValue(t.style,r),u=ev.getValue(t.variant,r),c=ev.getValue(t.textcase,r),f=ev.getValue(t.lineposition,r),h=ev.getValue(t.shadow,r);return{family:ev.coerceString(e.family,i,n.family),size:ev.coerceNumber(e.size,a,n.size),color:ev.coerceColor(e.color,o,n.color),weight:ev.coerceString(e.weight,s,n.weight),style:ev.coerceString(e.style,l,n.style),variant:ev.coerceString(e.variant,u,n.variant),textcase:ev.coerceString(e.variant,c,n.textcase),lineposition:ev.coerceString(e.variant,f,n.lineposition),shadow:ev.coerceString(e.variant,h,n.shadow)}}function Xye(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}Zye.exports={style:Y1t,styleTextPoints:Vye,styleOnSelect:K1t,getInsideTextFont:jye,getOutsideTextFont:Wye,getBarColor:Xye,resizeText:Nye}});var p2=ye((xur,r1e)=>{"use strict";var KI=qa(),JI=Eo(),Fd=Pr(),Q1t=Zl(),e_t=ka(),I_=So(),t_t=Oa(),$I=ho().tickText,Yye=bv(),r_t=Yye.recordMinTextSize,i_t=Yye.clearMinTextSize,qV=V0(),IT=YI(),n_t=A_(),Kye=qm(),a_t=Kye.text,o_t=Kye.textposition,s_t=ip().appendArrayPointValue,Gv=n_t.TEXTPAD;function l_t(e){return e.id}function u_t(e){if(e.ids)return l_t}function OV(e){return(e>0)-(e<0)}function Om(e,t){return e0}function f_t(e,t,r,n,i,a){var o=t.xaxis,s=t.yaxis,l=e._fullLayout,u=e._context.staticPlot;i||(i={mode:l.barmode,norm:l.barmode,gap:l.bargap,groupgap:l.bargroupgap},i_t("bar",l));var c=Fd.makeTraceGroups(n,r,"trace bars").each(function(f){var h=KI.select(this),d=f[0].trace,v=f[0].t,m=d.type==="waterfall",b=d.type==="funnel",p=d.type==="histogram",k=d.type==="bar",M=k||b,T=0;m&&d.connector.visible&&d.connector.mode==="between"&&(T=d.connector.line.width/2);var L=d.orientation==="h",x=$ye(i),C=Fd.ensureSingle(h,"g","points"),S=u_t(d),g=C.selectAll("g.point").data(Fd.identity,S);g.enter().append("g").classed("point",!0),g.exit().remove(),g.each(function(E,z){var q=KI.select(this),V=c_t(E,o,s,L),G=V[0][0],Z=V[0][1],j=V[1][0],N=V[1][1],H=(L?Z-G:N-j)===0;H&&M&&IT.getLineWidth(d,E)&&(H=!1),H||(H=!JI(G)||!JI(Z)||!JI(j)||!JI(N)),E.isBlank=H,H&&(L?Z=G:N=j),T&&!H&&(L?(G-=Om(G,Z)*T,Z+=Om(G,Z)*T):(j-=Om(j,N)*T,N+=Om(j,N)*T));var ie,ae;if(d.type==="waterfall"){if(!H){var _e=d[E.dir].marker;ie=_e.line.width,ae=_e.color}}else ie=IT.getLineWidth(d,E),ae=E.mc||d.marker.color;function Ee(Ae){var rt=KI.round(ie/2%1,2);return i.gap===0&&i.groupgap===0?KI.round(Math.round(Ae)-rt,2):Ae}function Ce(Ae,rt,St){return St&&Ae===rt?Ae:Math.abs(Ae-rt)>=2?Ee(Ae):Ae>rt?Math.ceil(Ae):Math.floor(Ae)}var ge=e_t.opacity(ae),re=ge<1||ie>.01?Ee:Ce;e._context.staticPlot||(G=re(G,Z,L),Z=re(Z,G,L),j=re(j,N,!L),N=re(N,j,!L));var Se=L?o.c2p:s.c2p,ke;E.s0>0?ke=E._sMax:E.s0<0?ke=E._sMin:ke=E.s1>0?E._sMax:E._sMin;function be(Ae,rt){if(!Ae)return 0;var St=Math.abs(L?N-j:Z-G),Tt=Math.abs(L?Z-G:N-j),dt=re(Math.abs(Se(ke,!0)-Se(0,!0))),Et=E.hasB?Math.min(St/2,Tt/2):Math.min(St/2,dt),pt;if(rt==="%"){var jt=Math.min(50,Ae);pt=St*(jt/100)}else pt=Ae;return re(Math.max(Math.min(pt,Et),0))}var Be=k||p?be(v.cornerradiusvalue,v.cornerradiusform):0,Le,me,Pe="M"+G+","+j+"V"+N+"H"+Z+"V"+j+"Z",ce=0;if(Be&&E.s){var He=OV(E.s0)===0||OV(E.s)===OV(E.s0)?E.s1:E.s0;if(ce=re(E.hasB?0:Math.abs(Se(ke,!0)-Se(He,!0))),ce0?Math.sqrt(ce*(2*Be-ce)):0,ar=lt>0?Math.max:Math.min;Le="M"+G+","+j+"V"+(N-at*mt)+"H"+ar(Z-(Be-ce)*lt,G)+"A "+Be+","+Be+" 0 0 "+Ht+" "+Z+","+(N-Be*mt-ct)+"V"+(j+Be*mt+ct)+"A "+Be+","+Be+" 0 0 "+Ht+" "+ar(Z-(Be-ce)*lt,G)+","+(j+at*mt)+"Z"}else if(E.hasB)Le="M"+(G+Be*lt)+","+j+"A "+Be+","+Be+" 0 0 "+Ht+" "+G+","+(j+Be*mt)+"V"+(N-Be*mt)+"A "+Be+","+Be+" 0 0 "+Ht+" "+(G+Be*lt)+","+N+"H"+(Z-Be*lt)+"A "+Be+","+Be+" 0 0 "+Ht+" "+Z+","+(N-Be*mt)+"V"+(j+Be*mt)+"A "+Be+","+Be+" 0 0 "+Ht+" "+(Z-Be*lt)+","+j+"Z";else{me=Math.abs(N-j)+ce;var Vt=me0?Math.sqrt(ce*(2*Be-ce)):0,tt=mt>0?Math.max:Math.min;Le="M"+(G+Vt*lt)+","+j+"V"+tt(N-(Be-ce)*mt,j)+"A "+Be+","+Be+" 0 0 "+Ht+" "+(G+Be*lt-rr)+","+N+"H"+(Z-Be*lt+rr)+"A "+Be+","+Be+" 0 0 "+Ht+" "+(Z-Vt*lt)+","+tt(N-(Be-ce)*mt,j)+"V"+j+"Z"}}else Le=Pe}else Le=Pe;var je=Jye(Fd.ensureSingle(q,"path"),l,i,a);if(je.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((Z-G)*(N-j))||H&&e._context.staticPlot?"M0,0Z":Le).call(I_.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&x){var Ue=I_.makePointStyleFns(d);I_.singlePointStyle(E,je,d,Ue,e)}h_t(e,t,q,f,z,G,Z,j,N,Be,ce,i,a),t.layerClipId&&I_.hideOutsideRangePoint(E,q.select("text"),o,s,d.xcalendar,d.ycalendar)});var P=d.cliponaxis===!1;I_.setClipUrl(h,P?null:t.layerClipId,e)});t_t.getComponentMethod("errorbars","plot")(e,c,t,i)}function h_t(e,t,r,n,i,a,o,s,l,u,c,f,h){var d=t.xaxis,v=t.yaxis,m=e._fullLayout,b;function p(me,Pe,ce){var He=Fd.ensureSingle(me,"text").text(Pe).attr({class:"bartext bartext-"+b,"text-anchor":"middle","data-notex":1}).call(I_.font,ce).call(Q1t.convertToTspans,e);return He}var k=n[0].trace,M=k.orientation==="h",T=p_t(m,n,i,d,v);b=g_t(k,i);var L=f.mode==="stack"||f.mode==="relative",x=n[i],C=!L||x._outmost,S=x.hasB,g=u&&u-c>Gv;if(!T||b==="none"||(x.isBlank||a===o||s===l)&&(b==="auto"||b==="inside")){r.select("text").remove();return}var P=m.font,E=qV.getBarColor(n[i],k),z=qV.getInsideTextFont(k,i,P,E),q=qV.getOutsideTextFont(k,i,P),V=k.insidetextanchor||"end",G=r.datum();M?d.type==="log"&&G.s0<=0&&(d.range[0]0&&Ee>0,re;g?S?re=v2(N-2*u,H,_e,Ee,M)||v2(N,H-2*u,_e,Ee,M):M?re=v2(N-(u-c),H,_e,Ee,M)||v2(N,H-2*(u-c),_e,Ee,M):re=v2(N,H-(u-c),_e,Ee,M)||v2(N-2*(u-c),H,_e,Ee,M):re=v2(N,H,_e,Ee,M),ge&&re?b="inside":(b="outside",ie.remove(),ie=null)}else b="inside";if(!ie){Ce=Fd.ensureUniformFontSize(e,b==="outside"?q:z),ie=p(r,T,Ce);var Se=ie.attr("transform");if(ie.attr("transform",""),ae=I_.bBox(ie.node()),_e=ae.width,Ee=ae.height,ie.attr("transform",Se),_e<=0||Ee<=0){ie.remove();return}}var ke=k.textangle,be,Be;b==="outside"?(Be=k.constraintext==="both"||k.constraintext==="outside",be=v_t(a,o,s,l,ae,{isHorizontal:M,constrained:Be,angle:ke})):(Be=k.constraintext==="both"||k.constraintext==="inside",be=t1e(a,o,s,l,ae,{isHorizontal:M,constrained:Be,angle:ke,anchor:V,hasB:S,r:u,overhead:c})),be.fontSize=Ce.size,r_t(k.type==="histogram"?"bar":k.type,be,m),x.transform=be;var Le=Jye(ie,m,f,h);Fd.setTransormAndDisplay(Le,be)}function v2(e,t,r,n,i){if(e<0||t<0)return!1;var a=r<=e&&n<=t,o=r<=t&&n<=e,s=i?e>=r*(t/n):t>=n*(e/r);return a||o||s}function Qye(e){return e==="auto"?0:e}function e1e(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:e.width*i+e.height*n,y:e.width*n+e.height*i}}function t1e(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=a.anchor,c=u==="end",f=u==="start",h=a.leftToRight||0,d=(h+1)/2,v=1-d,m=a.hasB,b=a.r,p=a.overhead,k=i.width,M=i.height,T=Math.abs(t-e),L=Math.abs(n-r),x=T>2*Gv&&L>2*Gv?Gv:0;T-=2*x,L-=2*x;var C=Qye(l);l==="auto"&&!(k<=T&&M<=L)&&(k>T||M>L)&&(!(k>L||M>T)||kGv){var E=d_t(e,t,r,n,S,b,p,o,m);g=E.scale,P=E.pad}else g=1,s&&(g=Math.min(1,T/S.x,L/S.y)),P=0;var z=i.left*v+i.right*d,q=(i.top+i.bottom)/2,V=(e+Gv)*v+(t-Gv)*d,G=(r+n)/2,Z=0,j=0;if(f||c){var N=(o?S.x:S.y)/2;b&&(c||m)&&(x+=P);var H=o?Om(e,t):Om(r,n);o?f?(V=e+H*x,Z=-H*N):(V=t-H*x,Z=H*N):f?(G=r+H*x,j=-H*N):(G=n-H*x,j=H*N)}return{textX:z,textY:q,targetX:V,targetY:G,anchorX:Z,anchorY:j,scale:g,rotate:C}}function d_t(e,t,r,n,i,a,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*Gv),c=Math.max(0,Math.abs(n-r)-2*Gv),f=a-Gv,h=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,d=l?f*2:s?f-o:2*h,v=l?f*2:s?2*h:f-o,m,b,p,k,M;return i.y/i.x>=c/(u-d)?k=c/i.y:i.y/i.x<=(c-v)/u?k=u/i.x:!l&&s?(m=i.x*i.x+i.y*i.y/4,b=-2*i.x*(u-f)-i.y*(c/2-f),p=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,k=(-b+Math.sqrt(b*b-4*m*p))/(2*m)):l?(m=(i.x*i.x+i.y*i.y)/4,b=-i.x*(u/2-f)-i.y*(c/2-f),p=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,k=(-b+Math.sqrt(b*b-4*m*p))/(2*m)):(m=i.x*i.x/4+i.y*i.y,b=-i.x*(u/2-f)-2*i.y*(c-f),p=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,k=(-b+Math.sqrt(b*b-4*m*p))/(2*m)),k=Math.min(1,k),s?M=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-i.y*k)/2)*(f-(c-i.y*k)/2)))-o):M=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-i.x*k)/2)*(f-(u-i.x*k)/2)))-o),{scale:k,pad:M}}function v_t(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=i.width,c=i.height,f=Math.abs(t-e),h=Math.abs(n-r),d;o?d=h>2*Gv?Gv:0:d=f>2*Gv?Gv:0;var v=1;s&&(v=o?Math.min(1,h/c):Math.min(1,f/u));var m=Qye(l),b=e1e(i,m),p=(o?b.x:b.y)/2,k=(i.left+i.right)/2,M=(i.top+i.bottom)/2,T=(e+t)/2,L=(r+n)/2,x=0,C=0,S=o?Om(t,e):Om(r,n);return o?(T=t-S*d,x=S*p):(L=n+S*d,C=-S*p),{textX:k,textY:M,targetX:T,targetY:L,anchorX:x,anchorY:C,scale:v,rotate:m}}function p_t(e,t,r,n,i){var a=t[0].trace,o=a.texttemplate,s;return o?s=m_t(e,t,r,n,i):a.textinfo?s=y_t(t,r,n,i):s=IT.getValue(a.text,r),IT.coerceString(a_t,s)}function g_t(e,t){var r=IT.getValue(e.textposition,t);return IT.coerceEnumerated(o_t,r)}function m_t(e,t,r,n,i){var a=t[0].trace,o=Fd.castOption(a,r,"texttemplate");if(!o)return"";var s=a.type==="histogram",l=a.type==="waterfall",u=a.type==="funnel",c=a.orientation==="h",f,h,d,v;c?(f="y",h=i,d="x",v=n):(f="x",h=n,d="y",v=i);function m(x){return $I(h,h.c2l(x),!0).text}function b(x){return $I(v,v.c2l(x),!0).text}var p=t[r],k={};k.label=p.p,k.labelLabel=k[f+"Label"]=m(p.p);var M=Fd.castOption(a,p.i,"text");(M===0||M)&&(k.text=M),k.value=p.s,k.valueLabel=k[d+"Label"]=b(p.s);var T={};s_t(T,a,p.i),(s||T.x===void 0)&&(T.x=c?k.value:k.label),(s||T.y===void 0)&&(T.y=c?k.label:k.value),(s||T.xLabel===void 0)&&(T.xLabel=c?k.valueLabel:k.labelLabel),(s||T.yLabel===void 0)&&(T.yLabel=c?k.labelLabel:k.valueLabel),l&&(k.delta=+p.rawS||p.s,k.deltaLabel=b(k.delta),k.final=p.v,k.finalLabel=b(k.final),k.initial=k.final-k.delta,k.initialLabel=b(k.initial)),u&&(k.value=p.s,k.valueLabel=b(k.value),k.percentInitial=p.begR,k.percentInitialLabel=Fd.formatPercent(p.begR),k.percentPrevious=p.difR,k.percentPreviousLabel=Fd.formatPercent(p.difR),k.percentTotal=p.sumR,k.percenTotalLabel=Fd.formatPercent(p.sumR));var L=Fd.castOption(a,p.i,"customdata");return L&&(k.customdata=L),Fd.texttemplateString({data:[T,k,a._meta],fallback:a.texttemplatefallback,labels:k,locale:e._d3locale,template:o})}function y_t(e,t,r,n){var i=e[0].trace,a=i.orientation==="h",o=i.type==="waterfall",s=i.type==="funnel";function l(L){var x=a?n:r;return $I(x,L,!0).text}function u(L){var x=a?r:n;return $I(x,+L,!0).text}var c=i.textinfo,f=e[t],h=c.split("+"),d=[],v,m=function(L){return h.indexOf(L)!==-1};if(m("label")&&d.push(l(e[t].p)),m("text")&&(v=Fd.castOption(i,f.i,"text"),(v===0||v)&&d.push(v)),o){var b=+f.rawS||f.s,p=f.v,k=p-b;m("initial")&&d.push(u(k)),m("delta")&&d.push(u(b)),m("final")&&d.push(u(p))}if(s){m("value")&&d.push(u(f.s));var M=0;m("percent initial")&&M++,m("percent previous")&&M++,m("percent total")&&M++;var T=M>1;m("percent initial")&&(v=Fd.formatPercent(f.begR),T&&(v+=" of initial"),d.push(v)),m("percent previous")&&(v=Fd.formatPercent(f.difR),T&&(v+=" of previous"),d.push(v)),m("percent total")&&(v=Fd.formatPercent(f.sumR),T&&(v+=" of total"),d.push(v))}return d.join("
")}r1e.exports={plot:f_t,toMoveInsideBar:t1e}});var RT=ye((bur,o1e)=>{"use strict";var k4=ef(),__t=Oa(),i1e=ka(),x_t=Pr().fillText,b_t=YI().getLineWidth,BV=ho().hoverLabelText,w_t=fs().BADNUM;function T_t(e,t,r,n,i){var a=n1e(e,t,r,n,i);if(a){var o=a.cd,s=o[0].trace,l=o[a.index];return a.color=a1e(s,l),__t.getComponentMethod("errorbars","hoverInfo")(l,s,a),[a]}}function n1e(e,t,r,n,i){var a=e.cd,o=a[0].trace,s=a[0].t,l=n==="closest",u=o.type==="waterfall",c=e.maxHoverDistance,f=e.maxSpikeDistance,h,d,v,m,b,p,k;o.orientation==="h"?(h=r,d=t,v="y",m="x",b=G,p=z):(h=t,d=r,v="x",m="y",p=G,b=z);var M=o[v+"period"],T=l||M;function L(re){return C(re,-1)}function x(re){return C(re,1)}function C(re,Se){var ke=re.w;return re[v]+Se*ke/2}function S(re){return re[v+"End"]-re[v+"Start"]}var g=l?L:M?function(re){return re.p-S(re)/2}:function(re){return Math.min(L(re),re.p-s.bardelta/2)},P=l?x:M?function(re){return re.p+S(re)/2}:function(re){return Math.max(x(re),re.p+s.bardelta/2)};function E(re,Se,ke){return i.finiteRange&&(ke=0),k4.inbox(re-h,Se-h,ke+Math.min(1,Math.abs(Se-re)/k)-1)}function z(re){return E(g(re),P(re),c)}function q(re){return E(L(re),x(re),f)}function V(re){var Se=re[m];if(u){var ke=Math.abs(re.rawS)||0;d>0?Se+=ke:d<0&&(Se-=ke)}return Se}function G(re){var Se=d,ke=re.b,be=V(re);return k4.inbox(ke-Se,be-Se,c+(be-Se)/(be-ke)-1)}function Z(re){var Se=d,ke=re.b,be=V(re);return k4.inbox(ke-Se,be-Se,f+(be-Se)/(be-ke)-1)}var j=e[v+"a"],N=e[m+"a"];k=Math.abs(j.r2c(j.range[1])-j.r2c(j.range[0]));function H(re){return(b(re)+p(re))/2}var ie=k4.getDistanceFunction(n,b,p,H);if(k4.getClosest(a,ie,e),e.index!==!1&&a[e.index].p!==w_t){T||(g=function(re){return Math.min(L(re),re.p-s.bargroupwidth/2)},P=function(re){return Math.max(x(re),re.p+s.bargroupwidth/2)});var ae=e.index,_e=a[ae],Ee=o.base?_e.b+_e.s:_e.s;e[m+"0"]=e[m+"1"]=N.c2p(_e[m],!0),e[m+"LabelVal"]=Ee;var Ce=s.extents[s.extents.round(_e.p)];e[v+"0"]=j.c2p(l?g(_e):Ce[0],!0),e[v+"1"]=j.c2p(l?P(_e):Ce[1],!0);var ge=_e.orig_p!==void 0;return e[v+"LabelVal"]=ge?_e.orig_p:_e.p,e.labelLabel=BV(j,e[v+"LabelVal"],o[v+"hoverformat"]),e.valueLabel=BV(N,e[m+"LabelVal"],o[m+"hoverformat"]),e.baseLabel=BV(N,_e.b,o[m+"hoverformat"]),e.spikeDistance=(Z(_e)+q(_e))/2,e[v+"Spike"]=j.c2p(_e.p,!0),x_t(_e,o,e),e.hovertemplate=o.hovertemplate,e}}function a1e(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=b_t(e,t);if(i1e.opacity(r))return r;if(i1e.opacity(n)&&i)return n}o1e.exports={hoverPoints:T_t,hoverOnBars:n1e,getTraceColor:a1e}});var l1e=ye((wur,s1e)=>{"use strict";s1e.exports=function(t,r,n){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),n.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}});var DT=ye((Tur,u1e)=>{"use strict";u1e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=n[0].trace,s=o.type==="funnel",l=o.orientation==="h",u=[],c;if(r===!1)for(c=0;c{"use strict";c1e.exports={attributes:qm(),layoutAttributes:WI(),supplyDefaults:i0().supplyDefaults,crossTraceDefaults:i0().crossTraceDefaults,supplyLayoutDefaults:DV(),calc:Dye(),crossTraceCalc:i2().crossTraceCalc,colorbar:Qd(),arraysToCalcdata:S4(),plot:p2().plot,style:V0().style,styleOnSelect:V0().styleOnSelect,hoverPoints:RT().hoverPoints,eventData:l1e(),selectPoints:DT(),moduleType:"trace",name:"bar",basePlotModule:mh(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var d1e=ye((Sur,h1e)=>{"use strict";h1e.exports=f1e()});var C4=ye((Mur,m1e)=>{"use strict";var S_t=Pg(),G0=pf(),v1e=qm(),M_t=Ih(),p1e=vf().axisHoverFormat,{hovertemplateAttrs:E_t,templatefallbackAttrs:k_t}=Ll(),Gy=Ao().extendFlat,FT=G0.marker,g1e=FT.line;m1e.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:G0.xperiod,yperiod:G0.yperiod,xperiod0:G0.xperiod0,yperiod0:G0.yperiod0,xperiodalignment:G0.xperiodalignment,yperiodalignment:G0.yperiodalignment,xhoverformat:p1e("x"),yhoverformat:p1e("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:Gy({},FT.symbol,{arrayOk:!1,editType:"plot"}),opacity:Gy({},FT.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:Gy({},FT.angle,{arrayOk:!1,editType:"calc"}),size:Gy({},FT.size,{arrayOk:!1,editType:"calc"}),color:Gy({},FT.color,{arrayOk:!1,editType:"style"}),line:{color:Gy({},g1e.color,{arrayOk:!1,dflt:M_t.defaultLine,editType:"style"}),width:Gy({},g1e.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:S_t(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:v1e.offsetgroup,alignmentgroup:v1e.alignmentgroup,selected:{marker:G0.selected.marker,editType:"style"},unselected:{marker:G0.unselected.marker,editType:"style"},text:Gy({},G0.text,{}),hovertext:Gy({},G0.hovertext,{}),hovertemplate:E_t({}),hovertemplatefallback:k_t(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:G0.zorder}});var L4=ye((Eur,y1e)=>{"use strict";y1e.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}});var I4=ye((kur,w1e)=>{"use strict";var H0=Pr(),C_t=Oa(),L_t=ka(),P_t=Dg(),I_t=r2(),_1e=H3(),P4=C4();function R_t(e,t,r,n){function i(v,m){return H0.coerce(e,t,P4,v,m)}if(x1e(e,t,i,n),t.visible!==!1){P_t(e,t,n,i),i("xhoverformat"),i("yhoverformat");var a=t._hasPreCompStats;a&&(i("lowerfence"),i("upperfence")),i("line.color",(e.marker||{}).color||r),i("line.width"),i("fillcolor",L_t.addOpacity(t.line.color,.5));var o=!1;if(a){var s=i("mean"),l=i("sd");s&&s.length&&(o=!0,l&&l.length&&(o="sd"))}i("whiskerwidth");var u=i("sizemode"),c;u==="quartiles"&&(c=i("boxmean",o)),i("showwhiskers",u==="quartiles"),(u==="sd"||c==="sd")&&i("sdmultiple"),i("width"),i("quartilemethod");var f=!1;if(a){var h=i("notchspan");h&&h.length&&(f=!0)}else H0.validate(e.notchwidth,P4.notchwidth)&&(f=!0);var d=i("notched",f);d&&i("notchwidth"),b1e(e,t,i,{prefix:"box"}),i("zorder")}}function x1e(e,t,r,n){function i(P){var E=0;return P&&P.length&&(E+=1,H0.isArrayOrTypedArray(P[0])&&P[0].length&&(E+=1)),E}function a(P){return H0.validate(e[P],P4[P])}var o=r("y"),s=r("x"),l;if(t.type==="box"){var u=r("q1"),c=r("median"),f=r("q3");t._hasPreCompStats=u&&u.length&&c&&c.length&&f&&f.length,l=Math.min(H0.minRowLength(u),H0.minRowLength(c),H0.minRowLength(f))}else t._hasPreCompStats=!1;var h=i(o),d=i(s),v=h&&H0.minRowLength(o),m=d&&H0.minRowLength(s),b=n.calendar,p={autotypenumbers:n.autotypenumbers},k,M;if(t._hasPreCompStats)switch(String(d)+String(h)){case"00":var T=a("x0")||a("dx"),L=a("y0")||a("dy");L&&!T?k="h":k="v",M=l;break;case"10":k="v",M=Math.min(l,m);break;case"20":k="h",M=Math.min(l,s.length);break;case"01":k="h",M=Math.min(l,v);break;case"02":k="v",M=Math.min(l,o.length);break;case"12":k="v",M=Math.min(l,m,o.length);break;case"21":k="h",M=Math.min(l,s.length,v);break;case"11":M=0;break;case"22":var x=!1,C;for(C=0;C0?(k="v",d>0?M=Math.min(m,v):M=Math.min(v)):d>0?(k="h",M=Math.min(m)):M=0;if(!M){t.visible=!1;return}t._length=M;var S=r("orientation",k);t._hasPreCompStats?S==="v"&&d===0?(r("x0",0),r("dx",1)):S==="h"&&h===0&&(r("y0",0),r("dy",1)):S==="v"&&d===0?r("x0"):S==="h"&&h===0&&r("y0");var g=C_t.getComponentMethod("calendars","handleTraceDefaults");g(e,t,["x","y"],n)}function b1e(e,t,r,n){var i=n.prefix,a=H0.coerce2(e,t,P4,"marker.outliercolor"),o=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(a||o)&&(s="suspectedoutliers");var l=r(i+"points",s);l?(r("jitter",l==="all"?.3:0),r("pointpos",l==="all"?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),l==="suspectedoutliers"&&(r("marker.line.outliercolor",t.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete t.marker;var u=r("hoveron");(u==="all"||u.indexOf("points")!==-1)&&(r("hovertemplate"),r("hovertemplatefallback")),H0.coerceSelectionMarkerOpacity(t,r)}function D_t(e,t){var r,n;function i(l){return H0.coerce(n._input,n,P4,l)}for(var a=0;a{"use strict";var F_t=Oa(),z_t=Pr(),q_t=L4();function T1e(e,t,r,n,i){for(var a=i+"Layout",o=!1,s=0;s{"use strict";var UV=Eo(),e8=ho(),B_t=zg(),yh=Pr(),n0=fs().BADNUM,Hy=yh._;R1e.exports=function(t,r){var n=t._fullLayout,i=e8.getFromId(t,r.xaxis||"x"),a=e8.getFromId(t,r.yaxis||"y"),o=[],s=r.type==="violin"?"_numViolins":"_numBoxes",l,u,c,f,h,d,v;r.orientation==="h"?(c=i,f="x",h=a,d="y",v=!!r.yperiodalignment):(c=a,f="y",h=i,d="x",v=!!r.xperiodalignment);var m=N_t(r,d,h,n[s]),b=m[0],p=m[1],k=yh.distinctVals(b,h),M=k.vals,T=k.minDiff/2,L,x,C,S,g,P,E=(r.boxpoints||r.points)==="all"?yh.identity:function(Ht){return Ht.vL.uf};if(r._hasPreCompStats){var z=r[f],q=function(Ht){return c.d2c((r[Ht]||[])[l])},V=1/0,G=-1/0;for(l=0;l=L.q1&&L.q3>=L.med){var j=q("lowerfence");L.lf=j!==n0&&j<=L.q1?j:k1e(L,C,S);var N=q("upperfence");L.uf=N!==n0&&N>=L.q3?N:C1e(L,C,S);var H=q("mean");L.mean=H!==n0?H:S?yh.mean(C,S):(L.q1+L.q3)/2;var ie=q("sd");L.sd=H!==n0&&ie>=0?ie:S?yh.stdev(C,S,L.mean):L.q3-L.q1,L.lo=L1e(L),L.uo=P1e(L);var ae=q("notchspan");ae=ae!==n0&&ae>0?ae:I1e(L,S),L.ln=L.med-ae,L.un=L.med+ae;var _e=L.lf,Ee=L.uf;r.boxpoints&&C.length&&(_e=Math.min(_e,C[0]),Ee=Math.max(Ee,C[S-1])),r.notched&&(_e=Math.min(_e,L.ln),Ee=Math.max(Ee,L.un)),L.min=_e,L.max=Ee}else{yh.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+L.q1,"median = "+L.med,"q3 = "+L.q3].join(` +`));var Ce;L.med!==n0?Ce=L.med:L.q1!==n0?L.q3!==n0?Ce=(L.q1+L.q3)/2:Ce=L.q1:L.q3!==n0?Ce=L.q3:Ce=0,L.med=Ce,L.q1=L.q3=Ce,L.lf=L.uf=Ce,L.mean=L.sd=Ce,L.ln=L.un=Ce,L.min=L.max=Ce}V=Math.min(V,L.min),G=Math.max(G,L.max),L.pts2=x.filter(E),o.push(L)}}r._extremes[c._id]=e8.findExtremes(c,[V,G],{padded:!0})}else{var ge=c.makeCalcdata(r,f),re=U_t(M,T),Se=M.length,ke=V_t(Se);for(l=0;l=0&&be0){if(L={},L.pos=L[d]=M[l],x=L.pts=ke[l].sort(M1e),C=L[f]=x.map(E1e),S=C.length,L.min=C[0],L.max=C[S-1],L.mean=yh.mean(C,S),L.sd=yh.stdev(C,S,L.mean)*r.sdmultiple,L.med=yh.interp(C,.5),S%2&&(Pe||ce)){var He,lt;Pe?(He=C.slice(0,S/2),lt=C.slice(S/2+1)):ce&&(He=C.slice(0,S/2+1),lt=C.slice(S/2)),L.q1=yh.interp(He,.5),L.q3=yh.interp(lt,.5)}else L.q1=yh.interp(C,.25),L.q3=yh.interp(C,.75);L.lf=k1e(L,C,S),L.uf=C1e(L,C,S),L.lo=L1e(L),L.uo=P1e(L);var mt=I1e(L,S);L.ln=L.med-mt,L.un=L.med+mt,Be=Math.min(Be,L.ln),Le=Math.max(Le,L.un),L.pts2=x.filter(E),o.push(L)}r.notched&&yh.isTypedArray(ge)&&(ge=Array.from(ge)),r._extremes[c._id]=e8.findExtremes(c,r.notched?ge.concat([Be,Le]):ge,{padded:!0})}return G_t(o,r),o.length>0?(o[0].t={num:n[s],dPos:T,posLetter:d,valLetter:f,labels:{med:Hy(t,"median:"),min:Hy(t,"min:"),q1:Hy(t,"q1:"),q3:Hy(t,"q3:"),max:Hy(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?Hy(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):Hy(t,"mean:"),lf:Hy(t,"lower fence:"),uf:Hy(t,"upper fence:")}},n[s]++,o):[{t:{empty:!0}}]};function N_t(e,t,r,n){var i=t in e,a=t+"0"in e,o="d"+t in e;if(i||a&&o){var s=r.makeCalcdata(e,t),l=B_t(e,r,t,s).vals;return[l,s]}var u;a?u=e[t+"0"]:"name"in e&&(r.type==="category"||UV(e.name)&&["linear","log"].indexOf(r.type)!==-1||yh.isDateTime(e.name)&&r.type==="date")?u=e.name:u=n;for(var c=r.type==="multicategory"?r.r2c_just_indices(u):r.d2c(u,0,e[t+"calendar"]),f=e._length,h=new Array(f),d=0;d{"use strict";var D1e=ho(),H_t=Pr(),j_t=$b().getAxisGroup,F1e=["v","h"];function W_t(e,t){for(var r=e.calcdata,n=t.xaxis,i=t.yaxis,a=0;a1,k=1-a[e+"gap"],M=1-a[e+"groupgap"];for(l=0;l0;if(C==="positive"?(N=S*(x?1:.5),ae=ie,H=ae=P):C==="negative"?(N=ae=P,H=S*(x?1:.5),_e=ie):(N=H=S,ae=_e=ie),ke){var be=T.pointpos,Be=T.jitter,Le=T.marker.size/2,me=0;be+Be>=0&&(me=ie*(be+Be),me>N?(Se=!0,ge=Le,Ee=me):me>ae&&(ge=Le,Ee=N)),me<=N&&(Ee=N);var Pe=0;be-Be<=0&&(Pe=-ie*(be-Be),Pe>H?(Se=!0,re=Le,Ce=Pe):Pe>_e&&(re=Le,Ce=H)),Pe<=H&&(Ce=H)}else Ee=N,Ce=H;var ce=new Array(c.length);for(u=0;u{"use strict";var zT=qa(),g2=Pr(),X_t=So(),O1e=5,Z_t=.01;function Y_t(e,t,r,n){var i=e._context.staticPlot,a=t.xaxis,o=t.yaxis;g2.makeTraceGroups(n,r,"trace boxes").each(function(s){var l=zT.select(this),u=s[0],c=u.t,f=u.trace;if(c.wdPos=c.bdPos*f.whiskerwidth,f.visible!==!0||c.empty){l.remove();return}var h,d;f.orientation==="h"?(h=o,d=a):(h=a,d=o),B1e(l,{pos:h,val:d},f,c,i),N1e(l,{x:a,y:o},f,c),U1e(l,{pos:h,val:d},f,c)})}function B1e(e,t,r,n,i){var a=r.orientation==="h",o=t.val,s=t.pos,l=!!s.rangebreaks,u=n.bPos,c=n.wdPos||0,f=n.bPosPxOffset||0,h=r.whiskerwidth||0,d=r.showwhiskers!==!1,v=r.notched||!1,m=v?1-2*r.notchwidth:1,b,p;Array.isArray(n.bdPos)?(b=n.bdPos[0],p=n.bdPos[1]):(b=n.bdPos,p=n.bdPos);var k=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?g2.identity:[]);k.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","box"),k.exit().remove(),k.each(function(M){if(M.empty)return zT.select(this).attr("d","M0,0Z");var T=s.c2l(M.pos+u,!0),L=s.l2p(T-b)+f,x=s.l2p(T+p)+f,C=l?(L+x)/2:s.l2p(T)+f,S=r.whiskerwidth,g=l?L*S+(1-S)*C:s.l2p(T-c)+f,P=l?x*S+(1-S)*C:s.l2p(T+c)+f,E=s.l2p(T-b*m)+f,z=s.l2p(T+p*m)+f,q=r.sizemode==="sd",V=o.c2p(q?M.mean-M.sd:M.q1,!0),G=q?o.c2p(M.mean+M.sd,!0):o.c2p(M.q3,!0),Z=g2.constrain(q?o.c2p(M.mean,!0):o.c2p(M.med,!0),Math.min(V,G)+1,Math.max(V,G)-1),j=M.lf===void 0||r.boxpoints===!1||q,N=o.c2p(j?M.min:M.lf,!0),H=o.c2p(j?M.max:M.uf,!0),ie=o.c2p(M.ln,!0),ae=o.c2p(M.un,!0);a?zT.select(this).attr("d","M"+Z+","+E+"V"+z+"M"+V+","+L+"V"+x+(v?"H"+ie+"L"+Z+","+z+"L"+ae+","+x:"")+"H"+G+"V"+L+(v?"H"+ae+"L"+Z+","+E+"L"+ie+","+L:"")+"Z"+(d?"M"+V+","+C+"H"+N+"M"+G+","+C+"H"+H+(h===0?"":"M"+N+","+g+"V"+P+"M"+H+","+g+"V"+P):"")):zT.select(this).attr("d","M"+E+","+Z+"H"+z+"M"+L+","+V+"H"+x+(v?"V"+ie+"L"+z+","+Z+"L"+x+","+ae:"")+"V"+G+"H"+L+(v?"V"+ae+"L"+E+","+Z+"L"+L+","+ie:"")+"Z"+(d?"M"+C+","+V+"V"+N+"M"+C+","+G+"V"+H+(h===0?"":"M"+g+","+N+"H"+P+"M"+g+","+H+"H"+P):""))})}function N1e(e,t,r,n){var i=t.x,a=t.y,o=n.bdPos,s=n.bPos,l=r.boxpoints||r.points;g2.seedPseudoRandom();var u=function(h){return h.forEach(function(d){d.t=n,d.trace=r}),h},c=e.selectAll("g.points").data(l?u:[]);c.enter().append("g").attr("class","points"),c.exit().remove();var f=c.selectAll("path").data(function(h){var d,v=h.pts2,m=Math.max((h.max-h.min)/10,h.q3-h.q1),b=m*1e-9,p=m*Z_t,k=[],M=0,T;if(r.jitter){if(m===0)for(M=1,k=new Array(v.length),d=0;dh.lo&&(P.so=!0)}return v});f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(X_t.translatePoints,i,a)}function U1e(e,t,r,n){var i=t.val,a=t.pos,o=!!a.rangebreaks,s=n.bPos,l=n.bPosPxOffset||0,u=r.boxmean||(r.meanline||{}).visible,c,f;Array.isArray(n.bdPos)?(c=n.bdPos[0],f=n.bdPos[1]):(c=n.bdPos,f=n.bdPos);var h=e.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?g2.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each(function(d){var v=a.c2l(d.pos+s,!0),m=a.l2p(v-c)+l,b=a.l2p(v+f)+l,p=o?(m+b)/2:a.l2p(v)+l,k=i.c2p(d.mean,!0),M=i.c2p(d.mean-d.sd,!0),T=i.c2p(d.mean+d.sd,!0);r.orientation==="h"?zT.select(this).attr("d","M"+k+","+m+"V"+b+(u==="sd"?"m0,0L"+M+","+p+"L"+k+","+m+"L"+T+","+p+"Z":"")):zT.select(this).attr("d","M"+m+","+k+"H"+b+(u==="sd"?"m0,0L"+p+","+M+"L"+m+","+k+"L"+p+","+T+"Z":""))})}V1e.exports={plot:Y_t,plotBoxAndWhiskers:B1e,plotPoints:N1e,plotBoxMean:U1e}});var i8=ye((Rur,G1e)=>{"use strict";var GV=qa(),HV=ka(),jV=So();function K_t(e,t,r){var n=r||GV.select(e).selectAll("g.trace.boxes");n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=GV.select(this),o=i[0].trace,s=o.line.width;function l(f,h,d,v){f.style("stroke-width",h+"px").call(HV.stroke,d).call(HV.fill,v)}var u=a.selectAll("path.box");if(o.type==="candlestick")u.each(function(f){if(!f.empty){var h=GV.select(this),d=o[f.dir];l(h,d.line.width,d.line.color,d.fillcolor),h.style("opacity",o.selectedpoints&&!f.selected?.3:1)}});else{l(u,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(HV.stroke,o.line.color);var c=a.selectAll("path.point");jV.pointStyle(c,o,e)}})}function J_t(e,t,r){var n=t[0].trace,i=r.selectAll("path.point");n.selectedpoints?jV.selectedPointStyle(i,n):jV.pointStyle(i,n,e)}G1e.exports={style:K_t,styleOnSelect:J_t}});var XV=ye((Dur,X1e)=>{"use strict";var $_t=ho(),WV=Pr(),R_=ef(),H1e=ka(),Q_t=WV.fillText;function ext(e,t,r,n){var i=e.cd,a=i[0].trace,o=a.hoveron,s=[],l;return o.indexOf("boxes")!==-1&&(s=s.concat(j1e(e,t,r,n))),o.indexOf("points")!==-1&&(l=W1e(e,t,r)),n==="closest"?l?[l]:s:(l&&s.push(l),s)}function j1e(e,t,r,n){var i=e.cd,a=e.xa,o=e.ya,s=i[0].trace,l=i[0].t,u=s.type==="violin",c,f,h,d,v,m,b,p,k,M,T,L=l.bdPos,x,C,S=l.wHover,g=function(Le){return h.c2l(Le.pos)+l.bPos-h.c2l(m)};u&&s.side!=="both"?(s.side==="positive"&&(k=function(Le){var me=g(Le);return R_.inbox(me,me+S,M)},x=L,C=0),s.side==="negative"&&(k=function(Le){var me=g(Le);return R_.inbox(me-S,me,M)},x=0,C=L)):(k=function(Le){var me=g(Le);return R_.inbox(me-S,me+S,M)},x=C=L);var P;u?P=function(Le){return R_.inbox(Le.span[0]-v,Le.span[1]-v,M)}:P=function(Le){return R_.inbox(Le.min-v,Le.max-v,M)},s.orientation==="h"?(v=t,m=r,b=P,p=k,c="y",h=o,f="x",d=a):(v=r,m=t,b=k,p=P,c="x",h=a,f="y",d=o);var E=Math.min(1,L/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));M=e.maxHoverDistance-E,T=e.maxSpikeDistance-E;function z(Le){return(b(Le)+p(Le))/2}var q=R_.getDistanceFunction(n,b,p,z);if(R_.getClosest(i,q,e),e.index===!1)return[];var V=i[e.index],G=s.line.color,Z=(s.marker||{}).color;H1e.opacity(G)&&s.line.width?e.color=G:H1e.opacity(Z)&&s.boxpoints?e.color=Z:e.color=s.fillcolor,e[c+"0"]=h.c2p(V.pos+l.bPos-C,!0),e[c+"1"]=h.c2p(V.pos+l.bPos+x,!0),e[c+"LabelVal"]=V.orig_p!==void 0?V.orig_p:V.pos;var j=c+"Spike";e.spikeDistance=z(V)*T/M,e[j]=h.c2p(V.pos,!0);var N=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,H=s.boxpoints||s.points,ie=H&&N?["max","uf","q3","med","mean","q1","lf","min"]:H&&!N?["max","uf","q3","med","q1","lf","min"]:!H&&N?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],ae=d.range[1]{"use strict";Z1e.exports=function(t,r){return r.hoverOnBox&&(t.hoverOnBox=r.hoverOnBox),"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var ZV=ye((zur,K1e)=>{"use strict";K1e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l;if(r===!1)for(s=0;s{"use strict";J1e.exports={attributes:C4(),layoutAttributes:L4(),supplyDefaults:I4().supplyDefaults,crossTraceDefaults:I4().crossTraceDefaults,supplyLayoutDefaults:QI().supplyLayoutDefaults,calc:VV(),crossTraceCalc:t8().crossTraceCalc,plot:r8().plot,style:i8().style,styleOnSelect:i8().styleOnSelect,hoverPoints:XV().hoverPoints,eventData:Y1e(),selectPoints:ZV(),moduleType:"trace",name:"box",basePlotModule:mh(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var e_e=ye((Our,Q1e)=>{"use strict";Q1e.exports=$1e()});var qT=ye((Bur,r_e)=>{"use strict";var txt=Tu(),{extendFlat:Pp}=Ao(),rxt=Gl(),{axisHoverFormat:YV}=vf(),ixt=ec(),{hovertemplateAttrs:nxt,templatefallbackAttrs:t_e,texttemplateAttrs:axt}=Ll(),a0=pf();r_e.exports=Pp({z:{valType:"data_array",editType:"calc"},x:Pp({},a0.x,{impliedEdits:{xtype:"array"}}),x0:Pp({},a0.x0,{impliedEdits:{xtype:"scaled"}}),dx:Pp({},a0.dx,{impliedEdits:{xtype:"scaled"}}),y:Pp({},a0.y,{impliedEdits:{ytype:"array"}}),y0:Pp({},a0.y0,{impliedEdits:{ytype:"scaled"}}),dy:Pp({},a0.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:Pp({},a0.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:Pp({},a0.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:Pp({},a0.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:Pp({},a0.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:Pp({},a0.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:Pp({},a0.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:YV("x"),yhoverformat:YV("y"),zhoverformat:YV("z",1),hovertemplate:nxt(),hovertemplatefallback:t_e(),texttemplate:axt({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:t_e({editType:"plot"}),textfont:ixt({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:Pp({},rxt.showlegend,{dflt:!1}),zorder:a0.zorder},txt("",{cLetter:"z",autoColorDflt:!1}))});var a8=ye((Nur,n_e)=>{"use strict";var oxt=Eo(),n8=Pr(),sxt=Oa();n_e.exports=function(t,r,n,i,a,o){var s=n("z");a=a||"x",o=o||"y";var l,u;if(s===void 0||!s.length)return 0;if(n8.isArray1D(s)){l=n(a),u=n(o);var c=n8.minRowLength(l),f=n8.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=i_e(a,n),u=i_e(o,n),!lxt(s))return 0;n("transpose"),r._length=null}var h=sxt.getComponentMethod("calendars","handleTraceDefaults");return h(t,r,[a,o],i),!0};function i_e(e,t){var r=t(e),n=r?t(e+"type","array"):"scaled";return n==="scaled"&&(t(e+"0"),t("d"+e)),r}function lxt(e){for(var t=!0,r=!1,n=!1,i,a=0;a0&&(r=!0);for(var o=0;o{"use strict";var a_e=Pr();o_e.exports=function(t,r){t("texttemplate"),t("texttemplatefallback");var n=a_e.extendFlat({},r.font,{color:"auto",size:"auto"});a_e.coerceFont(t,"textfont",n)}});var KV=ye((Vur,s_e)=>{"use strict";s_e.exports=function(t,r,n){var i=n("zsmooth");i===!1&&(n("xgap"),n("ygap")),n("zhoverformat")}});var c_e=ye((Gur,u_e)=>{"use strict";var l_e=Pr(),uxt=a8(),cxt=R4(),fxt=Dg(),hxt=KV(),dxt=td(),vxt=qT();u_e.exports=function(t,r,n,i){function a(s,l){return l_e.coerce(t,r,vxt,s,l)}var o=uxt(t,r,a,i);if(!o){r.visible=!1;return}fxt(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),cxt(a,i),hxt(t,r,a,i),a("hoverongaps"),a("connectgaps",l_e.isArray1D(r.z)&&r.zsmooth!==!1),dxt(t,r,i,a,{prefix:"",cLetter:"z"}),a("zorder")}});var JV=ye((Hur,f_e)=>{"use strict";var OT=Eo();f_e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var i=n[t];return OT(i)?(i=Number(i),r[e]+=i,i):0},avg:function(e,t,r,n,i){var a=n[t];return OT(a)&&(a=Number(a),r[e]+=a,i[e]++),0},min:function(e,t,r,n){var i=n[t];if(OT(i))if(i=Number(i),OT(r[e])){if(r[e]>i){var a=i-r[e];return r[e]=i,a}}else return r[e]=i,i;return 0},max:function(e,t,r,n){var i=n[t];if(OT(i))if(i=Number(i),OT(r[e])){if(r[e]{"use strict";h_e.exports={percent:function(e,t){for(var r=e.length,n=100/t,i=0;i{"use strict";d_e.exports=function(t,r){for(var n=t.length,i=0,a=0;a{"use strict";var BT=fs(),m2=BT.ONEAVGYEAR,v_e=BT.ONEAVGMONTH,s8=BT.ONEDAY,p_e=BT.ONEHOUR,g_e=BT.ONEMIN,m_e=BT.ONESEC,y_e=ho().tickIncrement;b_e.exports=function(t,r,n,i,a){var o=-1.1*r,s=-.1*r,l=t-s,u=n[0],c=n[1],f=Math.min(o8(u+s,u+l,i,a),o8(c+s,c+l,i,a)),h=Math.min(o8(u+o,u+s,i,a),o8(c+o,c+s,i,a)),d,v;if(f>h&&hs8){var m=d===m2?1:6,b=d===m2?"M12":"M1";return function(p,k){var M=i.c2d(p,m2,a),T=M.indexOf("-",m);T>0&&(M=M.slice(0,T));var L=i.d2c(M,0,a);if(Lm_e?e>s8?e>m2*1.1?m2:e>v_e*1.1?v_e:s8:e>p_e?p_e:e>g_e?g_e:m_e:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function pxt(e,t,r,n,i,a){if(n&&e>s8){var o=x_e(t,i,a),s=x_e(r,i,a),l=e===m2?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function x_e(e,t,r){var n=t.c2d(e,m2,r).split("-");return n[0]===""&&(n.unshift(),n[0]="-"+n[0]),n}});var iG=ye((Zur,M_e)=>{"use strict";var tG=Eo(),Hv=Pr(),w_e=Oa(),j0=ho(),{hasColorscale:T_e}=pv(),A_e=gv(),gxt=S4(),S_e=JV(),mxt=$V(),yxt=QV(),_xt=eG();function xxt(e,t){var r=[],n=[],i=t.orientation==="h",a=j0.getFromId(e,i?t.yaxis:t.xaxis),o=i?"y":"x",s={x:"y",y:"x"}[o],l=t[o+"calendar"],u=t.cumulative,c,f=rG(e,t,a,o),h=f[0],d=f[1],v=typeof h.size=="string",m=[],b=v?m:h,p=[],k=[],M=[],T=0,L=t.histnorm,x=t.histfunc,C=L.indexOf("density")!==-1,S,g,P;u.enabled&&C&&(L=L.replace(/ ?density$/,""),C=!1);var E=x==="max"||x==="min",z=E?null:0,q=S_e.count,V=mxt[L],G=!1,Z=function(me){return a.r2c(me,0,l)},j;for(Hv.isArrayOrTypedArray(t[s])&&x!=="count"&&(j=t[s],G=x==="avg",q=S_e[x]),c=Z(h.start),g=Z(h.end)+(c-j0.tickIncrement(c,h.size,!1,l))/1e6;c=0&&P=be;c--)if(n[c]){Be=c;break}for(c=be;c<=Be;c++)if(tG(r[c])&&tG(n[c])){var Le={p:r[c],s:n[c],b:0};u.enabled||(Le.pts=M[c],ae?Le.ph0=Le.ph1=M[c].length?d[M[c][0]]:r[c]:(t._computePh=!0,Le.ph0=re(m[c]),Le.ph1=re(m[c+1],!0))),ke.push(Le)}return ke.length===1&&(ke[0].width1=j0.tickIncrement(ke[0].p,h.size,!1,l)-ke[0].p),T_e(t,"marker")&&A_e(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),T_e(t,"marker.line")&&A_e(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),gxt(ke,t),Hv.isArrayOrTypedArray(t.selectedpoints)&&Hv.tagSelected(ke,t,Ce),ke}function rG(e,t,r,n,i){var a=n+"bins",o=e._fullLayout,s=t["_"+n+"bingroup"],l=o._histogramBinOpts[s],u=o.barmode==="overlay",c,f,h,d,v,m,b,p=function(ge){return r.r2c(ge,0,d)},k=function(ge){return r.c2r(ge,0,d)},M=r.type==="date"?function(ge){return ge||ge===0?Hv.cleanDate(ge,null,d):null}:function(ge){return tG(ge)?Number(ge):null};function T(ge,re,Se){re[ge+"Found"]?(re[ge]=M(re[ge]),re[ge]===null&&(re[ge]=Se[ge])):(m[ge]=re[ge]=Se[ge],Hv.nestedProperty(f[0],a+"."+ge).set(Se[ge]))}if(t["_"+n+"autoBinFinished"])delete t["_"+n+"autoBinFinished"];else{f=l.traces;var L=[],x=!0,C=!1,S=!1;for(c=0;cr.r2l(j)&&(H=j0.tickIncrement(H,l.size,!0,d)),q.start=r.l2r(H),Z||Hv.nestedProperty(t,a+".start").set(q.start)}var ie=l.end,ae=r.r2l(z.end),_e=ae!==void 0;if((l.endFound||_e)&&ae!==r.r2l(ie)){var Ee=_e?ae:Hv.aggNums(Math.max,null,v);q.end=r.l2r(Ee),_e||Hv.nestedProperty(t,a+".start").set(q.end)}var Ce="autobin"+n;return t._input[Ce]===!1&&(t._input[a]=Hv.extendFlat({},t[a]||{}),delete t._input[Ce],delete t[Ce]),[q,v]}function bxt(e,t,r,n,i){var a=e._fullLayout,o=wxt(e,t),s=!1,l=1/0,u=[t],c,f,h;for(c=0;c=0;n--)s(n);else if(t==="increasing"){for(n=1;n=0;n--)e[n]+=e[n+1];r==="exclude"&&(e.push(0),e.shift())}}M_e.exports={calc:xxt,calcAllAutoBins:rG}});var D_e=ye((Yur,R_e)=>{"use strict";var E_e=Pr(),NT=ho(),k_e=JV(),Axt=$V(),Sxt=QV(),Mxt=eG(),C_e=iG().calcAllAutoBins;R_e.exports=function(t,r){var n=NT.getFromId(t,r.xaxis),i=NT.getFromId(t,r.yaxis),a=r.xcalendar,o=r.ycalendar,s=function(Et){return n.r2c(Et,0,a)},l=function(Et){return i.r2c(Et,0,o)},u=function(Et){return n.c2r(Et,0,a)},c=function(Et){return i.c2r(Et,0,o)},f,h,d,v,m=C_e(t,r,n,"x"),b=m[0],p=m[1],k=C_e(t,r,i,"y"),M=k[0],T=k[1],L=r._length;p.length>L&&p.splice(L,p.length-L),T.length>L&&T.splice(L,T.length-L);var x=[],C=[],S=[],g=typeof b.size=="string",P=typeof M.size=="string",E=[],z=[],q=g?E:b,V=P?z:M,G=0,Z=[],j=[],N=r.histnorm,H=r.histfunc,ie=N.indexOf("density")!==-1,ae=H==="max"||H==="min",_e=ae?null:0,Ee=k_e.count,Ce=Axt[N],ge=!1,re=[],Se=[],ke="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";ke&&H!=="count"&&(ge=H==="avg",Ee=k_e[H]);var be=b.size,Be=s(b.start),Le=s(b.end)+(Be-NT.tickIncrement(Be,be,!1,a))/1e6;for(f=Be;f=0&&d=0&&v{"use strict";var Bm=Pr(),F_e=fs().BADNUM,z_e=zg();q_e.exports=function(t,r,n,i,a,o){var s=t._length,l=r.makeCalcdata(t,i),u=n.makeCalcdata(t,a);l=z_e(t,r,i,l).vals,u=z_e(t,n,a,u).vals;var c=t.text,f=c!==void 0&&Bm.isArray1D(c),h=t.hovertext,d=h!==void 0&&Bm.isArray1D(h),v,m,b=Bm.distinctVals(l),p=b.vals,k=Bm.distinctVals(u),M=k.vals,T=[],L,x,C=M.length,S=p.length;for(v=0;v{"use strict";var Ext=Eo(),kxt=Pr(),u8=fs().BADNUM;O_e.exports=function(t,r,n,i){var a,o,s,l,u,c;function f(p){if(Ext(p))return+p}if(r&&r.transpose){for(a=0,u=0;u{"use strict";var Cxt=Pr(),B_e=.01,Lxt=[[-1,0],[1,0],[0,-1],[0,1]];function Pxt(e){return .5-.25*Math.min(1,e*.5)}U_e.exports=function(t,r){var n=1,i;for(N_e(t,r),i=0;iB_e;i++)n=N_e(t,r,Pxt(n));return n>B_e&&Cxt.log("interp2d didn't converge quickly",n),t};function N_e(e,t,r){var n=0,i,a,o,s,l,u,c,f,h,d,v,m,b;for(s=0;sm&&(n=Math.max(n,Math.abs(e[a][o]-v)/(b-m))))}return n}});var h8=ye((Qur,V_e)=>{"use strict";var Ixt=Pr().maxRowLength;V_e.exports=function(t){var r=[],n={},i=[],a=t[0],o=[],s=[0,0,0],l=Ixt(t),u,c,f,h,d,v,m,b;for(c=0;c=0;d--)h=i[d],c=h[0],f=h[1],v=((n[[c-1,f]]||s)[2]+(n[[c+1,f]]||s)[2]+(n[[c,f-1]]||s)[2]+(n[[c,f+1]]||s)[2])/20,v&&(m[h]=[c,f,v],i.splice(d,1),b=!0);if(!b)throw"findEmpties iterated with no new neighbors";for(h in m)n[h]=m[h],r.push(m[h])}return r.sort(function(p,k){return k[2]-p[2]})}});var nG=ye((ecr,j_e)=>{"use strict";var G_e=Oa(),H_e=Pr().isArrayOrTypedArray;j_e.exports=function(t,r,n,i,a,o){var s=[],l=G_e.traceIs(t,"contour"),u=G_e.traceIs(t,"histogram"),c,f,h,d=H_e(r)&&r.length>1;if(d&&!u&&o.type!=="category"){var v=r.length;if(v<=a){if(l)s=Array.from(r).slice(0,a);else if(a===1)o.type==="log"?s=[.5*r[0],2*r[0]]:s=[r[0]-.5,r[0]+.5];else if(o.type==="log"){for(s=[Math.pow(r[0],1.5)/Math.pow(r[1],.5)],h=1;h{"use strict";var W_e=Oa(),aG=Pr(),d8=ho(),X_e=zg(),Rxt=D_e(),Dxt=gv(),Fxt=l8(),zxt=c8(),qxt=f8(),Oxt=h8(),v8=nG(),oG=fs().BADNUM;Y_e.exports=function(t,r){var n=d8.getFromId(t,r.xaxis||"x"),i=d8.getFromId(t,r.yaxis||"y"),a=W_e.traceIs(r,"contour"),o=W_e.traceIs(r,"histogram"),s=a?"best":r.zsmooth,l,u,c,f,h,d,v,m,b,p,k;if(n._minDtick=0,i._minDtick=0,o)k=Rxt(t,r),f=k.orig_x,l=k.x,u=k.x0,c=k.dx,m=k.orig_y,h=k.y,d=k.y0,v=k.dy,b=k.z;else{var M=r.z;aG.isArray1D(M)?(Fxt(r,n,i,"x","y",["z"]),l=r._x,h=r._y,M=r._z):(f=r.x?n.makeCalcdata(r,"x"):[],m=r.y?i.makeCalcdata(r,"y"):[],l=X_e(r,n,"x",f).vals,h=X_e(r,i,"y",m).vals,r._x=l,r._y=h),u=r.x0,c=r.dx,d=r.y0,v=r.dy,b=zxt(M,r,n,i)}(n.rangebreaks||i.rangebreaks)&&(b=Bxt(l,h,b),o||(l=Z_e(l),h=Z_e(h),r._x=l,r._y=h)),!o&&(a||r.connectgaps)&&(r._emptypoints=Oxt(b),qxt(b,r._emptypoints));function T(q){s=r._input.zsmooth=r.zsmooth=!1,aG.warn('cannot use zsmooth: "fast": '+q)}function L(q){if(q.length>1){var V=(q[q.length-1]-q[0])/(q.length-1),G=Math.abs(V/100);for(p=0;pG)return!1}return!0}r._islinear=!1,n.type==="log"||i.type==="log"?s==="fast"&&T("log axis found"):L(l)?L(h)?r._islinear=!0:s==="fast"&&T("y scale is not linear"):s==="fast"&&T("x scale is not linear");var x=aG.maxRowLength(b),C=r.xtype==="scaled"?"":l,S=v8(r,C,u,c,x,n),g=r.ytype==="scaled"?"":h,P=v8(r,g,d,v,b.length,i);r._extremes[n._id]=d8.findExtremes(n,S),r._extremes[i._id]=d8.findExtremes(i,P);var E={x:S,y:P,z:b,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&f&&(E.orig_x=f),r.yperiodalignment&&m&&(E.orig_y=m),C&&C.length===S.length-1&&(E.xCenter=C),g&&g.length===P.length-1&&(E.yCenter=g),o&&(E.xRanges=k.xRanges,E.yRanges=k.yRanges,E.pts=k.pts),a||Dxt(t,r,{vals:b,cLetter:"z"}),a&&r.contours&&r.contours.coloring==="heatmap"){var z={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};E.xfill=v8(z,C,u,c,x,n),E.yfill=v8(z,g,d,v,b.length,i)}return[E]};function Z_e(e){for(var t=[],r=e.length,n=0;n{"use strict";g8.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"]];g8.STYLE=g8.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var lG=ye((icr,J_e)=>{"use strict";var K_e=m8(),Nxt=So(),sG=Pr(),UT=null;function Uxt(){if(UT!==null)return UT;UT=!1;var e=sG.isSafari()||sG.isMacWKWebView()||sG.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(K_e.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")UT=t.some(function(o){return r.apply(null,o)});else{var n=Nxt.tester.append("image").attr("style",K_e.STYLE),i=window.getComputedStyle(n.node()),a=i.imageRendering;UT=t.some(function(o){var s=o[1];return a===s||a===s.toLowerCase()}),n.remove()}}return UT}J_e.exports=Uxt});var y8=ye((ncr,oxe)=>{"use strict";var $_e=qa(),Vxt=fd(),Gxt=Oa(),Hxt=So(),jxt=ho(),W0=Pr(),Q_e=Zl(),Wxt=uI(),Xxt=ka(),Zxt=tc().extractOpts,Yxt=tc().makeColorScaleFuncFromTrace,Kxt=Wp(),Jxt=Dh(),uG=Jxt.LINE_SPACING,$xt=lG(),Qxt=m8().STYLE,nxe="heatmap-label";function axe(e){return e.selectAll("g."+nxe)}function exe(e){axe(e).remove()}oxe.exports=function(e,t,r,n){var i=t.xaxis,a=t.yaxis;W0.makeTraceGroups(n,r,"hm").each(function(o){var s=$_e.select(this),l=o[0],u=l.trace,c=u.xgap||0,f=u.ygap||0,h=l.z,d=l.x,v=l.y,m=l.xCenter,b=l.yCenter,p=Gxt.traceIs(u,"contour"),k=p?"best":u.zsmooth,M=h.length,T=W0.maxRowLength(h),L=!1,x=!1,C,S,g,P,E,z,q,V;for(z=0;C===void 0&&z0;)S=i.c2p(d[z]),z--;for(S0;)E=a.c2p(v[z]),z--;E=i._length||S<=0||P>=a._length||E<=0;if(H){var ie=s.selectAll("image").data([]);ie.exit().remove(),exe(s);return}var ae,_e;G==="fast"?(ae=T,_e=M):(ae=j,_e=N);var Ee=document.createElement("canvas");Ee.width=ae,Ee.height=_e;var Ce=Ee.getContext("2d",{willReadFrequently:!0}),ge=Yxt(u,{noNumericCheck:!0,returnArray:!0}),re,Se;G==="fast"?(re=L?function(fn){return T-1-fn}:W0.identity,Se=x?function(fn){return M-1-fn}:W0.identity):(re=function(fn){return W0.constrain(Math.round(i.c2p(d[fn])-C),0,j)},Se=function(fn){return W0.constrain(Math.round(a.c2p(v[fn])-P),0,N)});var ke=Se(0),be=[ke,ke],Be=L?0:1,Le=x?0:1,me=0,Pe=0,ce=0,He=0,lt,mt,Ht,at,ct;function ar(fn,yn){if(fn!==void 0){var Mn=ge(fn);return Mn[0]=Math.round(Mn[0]),Mn[1]=Math.round(Mn[1]),Mn[2]=Math.round(Mn[2]),me+=yn,Pe+=Mn[0]*yn,ce+=Mn[1]*yn,He+=Mn[2]*yn,Mn}return[0,0,0,0]}function Vt(fn,yn,Mn,Ba){var ua=fn[Mn.bin0];if(ua===void 0)return ar(void 0,1);var ma=fn[Mn.bin1],Wa=yn[Mn.bin0],Fa=yn[Mn.bin1],Xo=ma-ua||0,da=Wa-ua||0,jn;return ma===void 0?Fa===void 0?jn=0:Wa===void 0?jn=2*(Fa-ua):jn=(2*Fa-Wa-ua)*2/3:Fa===void 0?Wa===void 0?jn=0:jn=(2*ua-ma-Wa)*2/3:Wa===void 0?jn=(2*Fa-ma-ua)*2/3:jn=Fa+ua-ma-Wa,ar(ua+Mn.frac*Xo+Ba.frac*(da+Mn.frac*jn))}if(G!=="default"){var rr=0,tt;try{tt=new Uint8Array(ae*_e*4)}catch(fn){tt=new Array(ae*_e*4)}if(G==="smooth"){var je=m||d,Ue=b||v,Ae=new Array(je.length),rt=new Array(Ue.length),St=new Array(j),Tt=m?rxe:txe,dt=b?rxe:txe,Et,pt,jt;for(z=0;zYr||Yr>a._length))for(q=Qt;qPi||Pi>i._length)){var ai=Wxt({x:_i,y:Ir},u,e._fullLayout);ai.x=_i,ai.y=Ir;var mi=l.z[z][q];mi===void 0?(ai.z="",ai.zLabel=""):(ai.z=mi,ai.zLabel=jxt.tickText(We,mi,"hover").text);var un=l.text&&l.text[z]&&l.text[z][q];(un===void 0||un===!1)&&(un=""),ai.text=un;var Fn=W0.texttemplateString({data:[ai,u._meta],fallback:u.texttemplatefallback,labels:ai,locale:e._fullLayout._d3locale,template:Ge});if(Fn){var An=Fn.split("
"),Hn=An.length,Qn=0;for(V=0;V{"use strict";sxe.exports={min:"zmin",max:"zmax"}});var _8=ye((ocr,lxe)=>{"use strict";var ebt=qa();lxe.exports=function(t){ebt.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var b8=ye((scr,cxe)=>{"use strict";var uxe=ef(),D4=Pr(),x8=D4.isArrayOrTypedArray,tbt=ho(),rbt=tc().extractOpts;cxe.exports=function(t,r,n,i,a){a||(a={});var o=a.isContour,s=t.cd[0],l=s.trace,u=t.xa,c=t.ya,f=s.x,h=s.y,d=s.z,v=s.xCenter,m=s.yCenter,b=s.zmask,p=l.zhoverformat,k=f,M=h,T,L,x,C;if(t.index!==!1){try{x=Math.round(t.index[1]),C=Math.round(t.index[0])}catch(ie){D4.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(x<0||x>=d[0].length||C<0||C>d.length)return}else{if(uxe.inbox(r-f[0],r-f[f.length-1],0)>0||uxe.inbox(n-h[0],n-h[h.length-1],0)>0)return;if(o){var S;for(k=[2*f[0]-f[1]],S=1;S{"use strict";fxe.exports={attributes:qT(),supplyDefaults:c_e(),calc:p8(),plot:y8(),colorbar:D_(),style:_8(),hoverPoints:b8(),moduleType:"trace",name:"heatmap",basePlotModule:mh(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var vxe=ye((ucr,dxe)=>{"use strict";dxe.exports=hxe()});var cG=ye((ccr,pxe)=>{"use strict";pxe.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var mxe=ye((fcr,gxe)=>{"use strict";gxe.exports={eventDataKeys:["binNumber"]}});var w8=ye((hcr,bxe)=>{"use strict";var Ip=qm(),yxe=vf().axisHoverFormat,{hovertemplateAttrs:ibt,texttemplateAttrs:nbt,templatefallbackAttrs:_xe}=Ll(),fG=ec(),xxe=cG(),abt=mxe(),hG=Ao().extendFlat;bxe.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:yxe("x"),yhoverformat:yxe("y"),text:hG({},Ip.text,{}),hovertext:hG({},Ip.hovertext,{}),orientation:Ip.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:xxe("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:xxe("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:ibt({},{keys:abt.eventDataKeys}),hovertemplatefallback:_xe(),texttemplate:nbt({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:_xe({editType:"plot"}),textposition:hG({},Ip.textposition,{arrayOk:!1}),textfont:fG({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:fG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:fG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:Ip.insidetextanchor,textangle:Ip.textangle,cliponaxis:Ip.cliponaxis,constraintext:Ip.constraintext,marker:Ip.marker,offsetgroup:Ip.offsetgroup,alignmentgroup:Ip.alignmentgroup,selected:Ip.selected,unselected:Ip.unselected,zorder:Ip.zorder}});var Sxe=ye((dcr,Axe)=>{"use strict";var wxe=Oa(),F4=Pr(),Txe=ka(),obt=i0().handleText,sbt=XI(),lbt=w8();Axe.exports=function(t,r,n,i){function a(k,M){return F4.coerce(t,r,lbt,k,M)}var o=a("x"),s=a("y"),l=a("cumulative.enabled");l&&(a("cumulative.direction"),a("cumulative.currentbin")),a("text");var u=a("textposition");obt(t,r,i,a,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat");var c=a("orientation",s&&!o?"h":"v"),f=c==="v"?"x":"y",h=c==="v"?"y":"x",d=o&&s?Math.min(F4.minRowLength(o)&&F4.minRowLength(s)):F4.minRowLength(r[f]||[]);if(!d){r.visible=!1;return}r._length=d;var v=wxe.getComponentMethod("calendars","handleTraceDefaults");v(t,r,["x","y"],i);var m=r[h];m&&a("histfunc"),a("histnorm"),a("autobin"+f),sbt(t,r,a,n,i),F4.coerceSelectionMarkerOpacity(r,a);var b=(r.marker.line||{}).color,p=wxe.getComponentMethod("errorbars","supplyDefaults");p(t,r,b||Txe.defaultLine,{axis:"y"}),p(t,r,b||Txe.defaultLine,{axis:"x",inherit:"y"}),a("zorder")}});var A8=ye((vcr,kxe)=>{"use strict";var z4=Pr(),ubt=df(),T8=Oa().traceIs,cbt=r2(),fbt=i0().validateCornerradius,Mxe=z4.nestedProperty,dG=$b().getAxisGroup,Exe=[{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"}],hbt=["x","y"];kxe.exports=function(t,r){var n=r._histogramBinOpts={},i=[],a={},o=[],s,l,u,c,f,h,d;function v(G,Z){return z4.coerce(s._input,s,s._module.attributes,G,Z)}function m(G){return G.orientation==="v"?"x":"y"}function b(G,Z){var j=ubt.getFromTrace({_fullLayout:r},G,Z);return j.type}function p(G,Z,j){var N=G.uid+"__"+j;Z||(Z=N);var H=b(G,j),ie=G[j+"calendar"]||"",ae=n[Z],_e=!0;ae&&(H===ae.axType&&ie===ae.calendar?(_e=!1,ae.traces.push(G),ae.dirs.push(j)):(Z=N,H!==ae.axType&&z4.warn(["Attempted to group the bins of trace",G.index,"set on a","type:"+H,"axis","with bins on","type:"+ae.axType,"axis."].join(" ")),ie!==ae.calendar&&z4.warn(["Attempted to group the bins of trace",G.index,"set with a",ie,"calendar","with bins",ae.calendar?"on a "+ae.calendar+" calendar":"w/o a set calendar"].join(" ")))),_e&&(n[Z]={traces:[G],dirs:[j],axType:H,calendar:G[j+"calendar"]||""}),G["_"+j+"bingroup"]=Z}for(f=0;f{"use strict";var dbt=RT().hoverPoints,vbt=ho().hoverLabelText;Cxe.exports=function(t,r,n,i,a){var o=dbt(t,r,n,i,a);if(o){t=o[0];var s=t.cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var u=l.orientation==="h"?"y":"x";t[u+"Label"]=vbt(t[u+"a"],[s.ph0,s.ph1],l[u+"hoverformat"])}return o}}});var vG=ye((gcr,Pxe)=>{"use strict";Pxe.exports=function(t,r,n,i,a){if(t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(t.z=r.zLabelVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),!(n.cumulative||{}).enabled){var o=Array.isArray(a)?i[0].pts[a[0]][a[1]]:i[a].pts;t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex;var s;if(n._indexToPoints){s=[];for(var l=0;l{"use strict";Ixe.exports={attributes:w8(),layoutAttributes:WI(),supplyDefaults:Sxe(),crossTraceDefaults:A8(),supplyLayoutDefaults:DV(),calc:iG().calc,crossTraceCalc:i2().crossTraceCalc,plot:p2().plot,layerName:"barlayer",style:V0().style,styleOnSelect:V0().styleOnSelect,colorbar:Qd(),hoverPoints:Lxe(),selectPoints:DT(),eventData:vG(),moduleType:"trace",name:"histogram",basePlotModule:mh(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var Fxe=ye((ycr,Dxe)=>{"use strict";Dxe.exports=Rxe()});var M8=ye((_cr,Oxe)=>{"use strict";var jg=w8(),zxe=cG(),S8=qT(),pbt=Gl(),pG=vf().axisHoverFormat,{hovertemplateAttrs:gbt,texttemplateAttrs:mbt,templatefallbackAttrs:qxe}=Ll(),ybt=Tu(),q4=Ao().extendFlat;Oxe.exports=q4({x:jg.x,y:jg.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:jg.histnorm,histfunc:jg.histfunc,nbinsx:jg.nbinsx,xbins:zxe("x"),nbinsy:jg.nbinsy,ybins:zxe("y"),autobinx:jg.autobinx,autobiny:jg.autobiny,bingroup:q4({},jg.bingroup,{}),xbingroup:q4({},jg.bingroup,{}),ybingroup:q4({},jg.bingroup,{}),xgap:S8.xgap,ygap:S8.ygap,zsmooth:S8.zsmooth,xhoverformat:pG("x"),yhoverformat:pG("y"),zhoverformat:pG("z",1),hovertemplate:gbt({},{keys:["z"]}),hovertemplatefallback:qxe(),texttemplate:mbt({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:qxe({editType:"plot"}),textfont:S8.textfont,showlegend:q4({},pbt.showlegend,{dflt:!1})},ybt("",{cLetter:"z",autoColorDflt:!1}))});var gG=ye((xcr,Nxe)=>{"use strict";var _bt=Oa(),Bxe=Pr();Nxe.exports=function(t,r,n,i){var a=n("x"),o=n("y"),s=Bxe.minRowLength(a),l=Bxe.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=_bt.getComponentMethod("calendars","handleTraceDefaults");u(t,r,["x","y"],i);var c=n("z")||n("marker.color");c&&n("histfunc"),n("histnorm"),n("autobinx"),n("autobiny")}});var Vxe=ye((bcr,Uxe)=>{"use strict";var xbt=Pr(),bbt=gG(),wbt=KV(),Tbt=td(),Abt=R4(),Sbt=M8();Uxe.exports=function(t,r,n,i){function a(o,s){return xbt.coerce(t,r,Sbt,o,s)}bbt(t,r,a,i),r.visible!==!1&&(wbt(t,r,a,i),Tbt(t,r,i,a,{prefix:"",cLetter:"z"}),a("hovertemplate"),a("hovertemplatefallback"),Abt(a,i),a("xhoverformat"),a("yhoverformat"))}});var jxe=ye((wcr,Hxe)=>{"use strict";var Mbt=b8(),Gxe=ho().hoverLabelText;Hxe.exports=function(t,r,n,i,a){var o=Mbt(t,r,n,i,a);if(o){t=o[0];var s=t.index,l=s[0],u=s[1],c=t.cd[0],f=c.trace,h=c.xRanges[u],d=c.yRanges[l];return t.xLabel=Gxe(t.xa,[h[0],h[1]],f.xhoverformat),t.yLabel=Gxe(t.ya,[d[0],d[1]],f.yhoverformat),o}}});var Xxe=ye((Tcr,Wxe)=>{"use strict";Wxe.exports={attributes:M8(),supplyDefaults:Vxe(),crossTraceDefaults:A8(),calc:p8(),plot:y8(),layerName:"heatmaplayer",colorbar:D_(),style:_8(),hoverPoints:jxe(),eventData:vG(),moduleType:"trace",name:"histogram2d",basePlotModule:mh(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var Yxe=ye((Acr,Zxe)=>{"use strict";Zxe.exports=Xxe()});var E8=ye((Scr,Kxe)=>{"use strict";Kxe.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var O4=ye((Mcr,ebe)=>{"use strict";var _h=qT(),k8=pf(),$xe=vf(),mG=$xe.axisHoverFormat,Ebt=$xe.descriptionOnlyNumbers,kbt=Tu(),Cbt=Pd().dash,Lbt=ec(),VT=Ao().extendFlat,Qxe=E8(),Pbt=Qxe.COMPARISON_OPS2,Ibt=Qxe.INTERVAL_OPS,Jxe=k8.line;ebe.exports=VT({z:_h.z,x:_h.x,x0:_h.x0,dx:_h.dx,y:_h.y,y0:_h.y0,dy:_h.dy,xperiod:_h.xperiod,yperiod:_h.yperiod,xperiod0:k8.xperiod0,yperiod0:k8.yperiod0,xperiodalignment:_h.xperiodalignment,yperiodalignment:_h.yperiodalignment,text:_h.text,hovertext:_h.hovertext,transpose:_h.transpose,xtype:_h.xtype,ytype:_h.ytype,xhoverformat:mG("x"),yhoverformat:mG("y"),zhoverformat:mG("z",1),hovertemplate:_h.hovertemplate,hovertemplatefallback:_h.hovertemplatefallback,texttemplate:VT({},_h.texttemplate,{}),texttemplatefallback:_h.texttemplatefallback,textfont:VT({},_h.textfont,{}),hoverongaps:_h.hoverongaps,connectgaps:VT({},_h.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:Lbt({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:Ebt("contour label")},operation:{valType:"enumerated",values:[].concat(Pbt).concat(Ibt),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:VT({},Jxe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:Cbt,smoothing:VT({},Jxe.smoothing,{}),editType:"plot"},zorder:k8.zorder},kbt("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var _G=ye((Ecr,rbe)=>{"use strict";var wv=M8(),Nm=O4(),Rbt=Tu(),yG=vf().axisHoverFormat,tbe=Ao().extendFlat;rbe.exports=tbe({x:wv.x,y:wv.y,z:wv.z,marker:wv.marker,histnorm:wv.histnorm,histfunc:wv.histfunc,nbinsx:wv.nbinsx,xbins:wv.xbins,nbinsy:wv.nbinsy,ybins:wv.ybins,autobinx:wv.autobinx,autobiny:wv.autobiny,bingroup:wv.bingroup,xbingroup:wv.xbingroup,ybingroup:wv.ybingroup,autocontour:Nm.autocontour,ncontours:Nm.ncontours,contours:Nm.contours,line:{color:Nm.line.color,width:tbe({},Nm.line.width,{dflt:.5}),dash:Nm.line.dash,smoothing:Nm.line.smoothing,editType:"plot"},xhoverformat:yG("x"),yhoverformat:yG("y"),zhoverformat:yG("z",1),hovertemplate:wv.hovertemplate,hovertemplatefallback:wv.hovertemplatefallback,texttemplate:Nm.texttemplate,texttemplatefallback:Nm.texttemplatefallback,textfont:Nm.textfont},Rbt("",{cLetter:"z",editTypeOverride:"calc"}))});var C8=ye((kcr,ibe)=>{"use strict";ibe.exports=function(t,r,n,i){var a=i("contours.start"),o=i("contours.end"),s=a===!1||o===!1,l=n("contours.size"),u;s?u=r.autocontour=!0:u=n("autocontour",!1),(u||!l)&&n("ncontours")}});var xG=ye((Ccr,nbe)=>{"use strict";var Dbt=Pr();nbe.exports=function(t,r,n,i){i||(i={});var a=t("contours.showlabels");if(a){var o=r.font;Dbt.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:n}}),t("contours.labelformat")}i.hasHover!==!1&&t("zhoverformat")}});var L8=ye((Lcr,abe)=>{"use strict";var Fbt=td(),zbt=xG();abe.exports=function(t,r,n,i,a){var o=n("contours.coloring"),s,l="";o==="fill"&&(s=n("contours.showlines")),s!==!1&&(o!=="lines"&&(l=n("line.color","#000")),n("line.width",.5),n("line.dash")),o!=="none"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,Fbt(t,r,i,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),zbt(n,i,l,a)}});var ube=ye((Pcr,lbe)=>{"use strict";var obe=Pr(),qbt=gG(),Obt=C8(),Bbt=L8(),Nbt=R4(),sbe=_G();lbe.exports=function(t,r,n,i){function a(s,l){return obe.coerce(t,r,sbe,s,l)}function o(s){return obe.coerce2(t,r,sbe,s)}qbt(t,r,a,i),r.visible!==!1&&(Obt(t,r,a,o),Bbt(t,r,a,i),a("xhoverformat"),a("yhoverformat"),a("hovertemplate"),a("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&Nbt(a,i))}});var TG=ye((Icr,fbe)=>{"use strict";var wG=ho(),bG=Pr();fbe.exports=function(t,r){var n=t.contours;if(t.autocontour){var i=t.zmin,a=t.zmax;(t.zauto||i===void 0)&&(i=bG.aggNums(Math.min,null,r)),(t.zauto||a===void 0)&&(a=bG.aggNums(Math.max,null,r));var o=cbe(i,a,t.ncontours);n.size=o.dtick,n.start=wG.tickFirst(o),o.range.reverse(),n.end=wG.tickFirst(o),n.start===i&&(n.start+=n.size),n.end===a&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),t._input.contours||(t._input.contours={}),bG.extendFlat(t._input.contours,{start:n.start,end:n.end,size:n.size}),t._input.autocontour=!0}else if(n.type!=="constraint"){var s=n.start,l=n.end,u=t._input.contours;if(s>l&&(n.start=u.start=l,l=n.end=u.end=s,s=n.start),!(n.size>0)){var c;s===l?c=1:c=cbe(s,l,t.ncontours).dtick,u.size=n.size=c}}};function cbe(e,t,r){var n={type:"linear",range:[e,t]};return wG.autoTicks(n,(t-e)/(r||15)),n}});var B4=ye((Rcr,hbe)=>{"use strict";hbe.exports=function(t){return t.end+t.size/1e6}});var AG=ye((Dcr,vbe)=>{"use strict";var dbe=tc(),Ubt=p8(),Vbt=TG(),Gbt=B4();vbe.exports=function(t,r){var n=Ubt(t,r),i=n[0].z;Vbt(r,i);var a=r.contours,o=dbe.extractOpts(r),s;if(a.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var l=a.start,u=Gbt(a),c=a.size||1,f=Math.floor((u-l)/c)+1;isFinite(c)||(c=1,f=1);var h=l-c/2,d=h+f*c;s=[h,d]}else s=i;return dbe.calc(t,r,{vals:s,cLetter:"z"}),n}});var N4=ye((Fcr,pbe)=>{"use strict";pbe.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}}});var SG=ye((zcr,gbe)=>{"use strict";var P8=N4();gbe.exports=function(t){var r=t[0].z,n=r.length,i=r[0].length,a=n===2||i===2,o,s,l,u,c,f,h,d,v;for(s=0;se?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);if(r===5||r===10){var n=(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4;return e>n?r===5?713:1114:r===5?104:208}return r===15?0:r}});var MG=ye((qcr,_be)=>{"use strict";var I8=Pr(),GT=N4();_be.exports=function(t,r,n){var i,a,o,s,l;for(r=r||.01,n=n||.01,o=0;o20?(o=GT.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[a]=GT.SADDLEREMAINDER[o]):delete e.crossings[a],s=GT.NEWDELTA[o],!s){I8.log("Found bad marching index:",o,t,e.level);break}l.push(ybe(e,t,s)),t[0]+=s[0],t[1]+=s[1],a=t.join(","),U4(l[l.length-1],l[l.length-2],n,i)&&l.pop();var v=s[0]&&(t[0]<0||t[0]>c-2)||s[1]&&(t[1]<0||t[1]>u-2),m=t[0]===f[0]&&t[1]===f[1]&&s[0]===h[0]&&s[1]===h[1];if(m||r&&v)break;o=e.crossings[a]}d===1e4&&I8.log("Infinite loop in contour?");var b=U4(l[0],l[l.length-1],n,i),p=0,k=.2*e.smoothing,M=[],T=0,L,x,C,S,g,P,E,z,q,V,G;for(d=1;d=T;d--)if(L=M[d],L=T&&L+M[x]z&&q--,e.edgepaths[q]=G.concat(l,V));break}H||(e.edgepaths[z]=l.concat(V))}for(z=0;z20&&t?e===208||e===1114?n=r[0]===0?1:-1:i=r[1]===0?1:-1:GT.BOTTOMSTART.indexOf(e)!==-1?i=1:GT.LEFTSTART.indexOf(e)!==-1?n=1:GT.TOPSTART.indexOf(e)!==-1?i=-1:n=-1,[n,i]}function ybe(e,t,r){var n=t[0]+Math.max(r[0],0),i=t[1]+Math.max(r[1],0),a=e.z[i][n],o=e.xaxis,s=e.yaxis;if(r[1]){var l=(e.level-a)/(e.z[i][n+1]-a),u=(l!==1?(1-l)*o.c2l(e.x[n]):0)+(l!==0?l*o.c2l(e.x[n+1]):0);return[o.c2p(o.l2c(u),!0),s.c2p(e.y[i],!0),n+l,i]}else{var c=(e.level-a)/(e.z[i+1][n]-a),f=(c!==1?(1-c)*s.c2l(e.y[i]):0)+(c!==0?c*s.c2l(e.y[i+1]):0);return[o.c2p(e.x[n],!0),s.c2p(s.l2c(f),!0),n,i+c]}}});var Tbe=ye((Ocr,wbe)=>{"use strict";var EG=E8(),Xbt=Eo();wbe.exports={"[]":xbe("[]"),"][":xbe("]["),">":kG(">"),"<":kG("<"),"=":kG("=")};function bbe(e,t){var r=Array.isArray(t),n;function i(a){return Xbt(a)?+a:null}return EG.COMPARISON_OPS2.indexOf(e)!==-1?n=i(r?t[0]:t):EG.INTERVAL_OPS.indexOf(e)!==-1?n=r?[i(t[0]),i(t[1])]:[i(t),i(t)]:EG.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(i):[i(t)]),n}function xbe(e){return function(t){t=bbe(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function kG(e){return function(t){return t=bbe(e,t),{start:t,end:1/0,size:1/0}}}});var CG=ye((Bcr,Sbe)=>{"use strict";var Abe=Pr(),Zbt=Tbe(),Ybt=B4();Sbe.exports=function(t,r,n){for(var i=t.type==="constraint"?Zbt[t._operation](t.value):t,a=i.size,o=[],s=Ybt(i),l=n.trace._carpetTrace,u=l?{xaxis:l.aaxis,yaxis:l.baxis,x:n.a,y:n.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:n.x,y:n.y},c=i.start;c1e3){Abe.warn("Too many contours, clipping at 1000",t);break}return o}});var LG=ye((Ncr,Ebe)=>{"use strict";var HT=Pr();Ebe.exports=function(e,t){var r,n,i,a=function(l){return l.reverse()},o=function(l){return l};switch(t){case"=":case"<":return e;case">":for(e.length!==1&&HT.warn("Contour data invalid for the specified inequality operation."),n=e[0],r=0;r{"use strict";kbe.exports=function(e,t){var r=e[0],n=r.z,i;switch(t.type){case"levels":var a=Math.min(n[0][0],n[0][1]);for(i=0;io.level||o.starts.length&&a===o.level)}break;case"constraint":if(r.prefixBoundary=!1,r.edgepaths.length)return;var s=r.x.length,l=r.y.length,u=-1/0,c=1/0;for(i=0;i":f>u&&(r.prefixBoundary=!0);break;case"<":(fu||r.starts.length&&d===c)&&(r.prefixBoundary=!0);break;case"][":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),hu&&(r.prefixBoundary=!0);break}break}}});var R8=ye(jv=>{"use strict";var G4=qa(),zd=Pr(),jy=So(),Kbt=tc(),Pbe=Zl(),Cbe=ho(),Lbe=xm(),Jbt=y8(),Ibe=SG(),Rbe=MG(),$bt=CG(),Qbt=LG(),Dbe=PG(),V4=N4(),Um=V4.LABELOPTIMIZER;jv.plot=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;zd.makeTraceGroups(i,n,"contour").each(function(s){var l=G4.select(this),u=s[0],c=u.trace,f=u.x,h=u.y,d=c.contours,v=$bt(d,r,u),m=zd.ensureSingle(l,"g","heatmapcoloring"),b=[];d.coloring==="heatmap"&&(b=[s]),Jbt(t,r,b,m),Ibe(v),Rbe(v);var p=a.c2p(f[0],!0),k=a.c2p(f[f.length-1],!0),M=o.c2p(h[0],!0),T=o.c2p(h[h.length-1],!0),L=[[p,T],[k,T],[k,M],[p,M]],x=v;d.type==="constraint"&&(x=Qbt(v,d._operation)),e2t(l,L,d),t2t(l,x,L,d),r2t(l,v,t,u,d),n2t(l,r,t,u,L)})};function e2t(e,t,r){var n=zd.ensureSingle(e,"g","contourbg"),i=n.selectAll("path").data(r.coloring==="fill"?[0]:[]);i.enter().append("path"),i.exit().remove(),i.attr("d","M"+t.join("L")+"Z").style("stroke","none")}function t2t(e,t,r,n){var i=n.coloring==="fill"||n.type==="constraint"&&n._operation!=="=",a="M"+r.join("L")+"Z";i&&Dbe(t,n);var o=zd.ensureSingle(e,"g","contourfill"),s=o.selectAll("path").data(i?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(l){var u=(l.prefixBoundary?a:"")+Fbe(l,r);u?G4.select(this).attr("d",u).style("stroke","none"):G4.select(this).remove()})}function Fbe(e,t){var r="",n=0,i=e.edgepaths.map(function(p,k){return k}),a=!0,o,s,l,u,c,f;function h(p){return Math.abs(p[1]-t[0][1])<.01}function d(p){return Math.abs(p[1]-t[2][1])<.01}function v(p){return Math.abs(p[0]-t[0][0])<.01}function m(p){return Math.abs(p[0]-t[2][0])<.01}for(;i.length;){for(f=jy.smoothopen(e.edgepaths[n],e.smoothing),r+=a?f:f.replace(/^M/,"L"),i.splice(i.indexOf(n),1),o=e.edgepaths[n][e.edgepaths[n].length-1],u=-1,l=0;l<4;l++){if(!o){zd.log("Missing end?",n,e);break}for(h(o)&&!m(o)?s=t[1]:v(o)?s=t[0]:d(o)?s=t[3]:m(o)&&(s=t[2]),c=0;c=0&&(s=b,u=c):Math.abs(o[1]-s[1])<.01?Math.abs(o[1]-b[1])<.01&&(b[0]-o[0])*(s[0]-b[0])>=0&&(s=b,u=c):zd.log("endpt to newendpt is not vert. or horz.",o,s,b)}if(o=s,u>=0)break;r+="L"+s}if(u===e.edgepaths.length){zd.log("unclosed perimeter path");break}n=u,a=i.indexOf(n)===-1,a&&(n=i[0],r+="Z")}for(n=0;nUm.MAXCOST*2)break;h&&(s/=2),o=u-s/2,l=o+s*1.5}if(f<=Um.MAXCOST)return c};function i2t(e,t,r,n){var i=t.width/2,a=t.height/2,o=e.x,s=e.y,l=e.theta,u=Math.cos(l)*i,c=Math.sin(l)*i,f=(o>n.center?n.right-o:o-n.left)/(u+Math.abs(Math.sin(l)*a)),h=(s>n.middle?n.bottom-s:s-n.top)/(Math.abs(c)+Math.cos(l)*a);if(f<1||h<1)return 1/0;var d=Um.EDGECOST*(1/(f-1)+1/(h-1));d+=Um.ANGLECOST*l*l;for(var v=o-u,m=s-c,b=o+u,p=s+c,k=0;k{"use strict";var o2t=qa(),IG=tc(),s2t=B4();zbe.exports=function(t){var r=t.contours,n=r.start,i=s2t(r),a=r.size||1,o=Math.floor((i-n)/a)+1,s=r.coloring==="lines"?0:1,l=IG.extractOpts(t);isFinite(a)||(a=1,o=1);var u=l.reversescale?IG.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),h=new Array(c),d,v,m=l.min,b=l.max;if(r.coloring==="heatmap"){for(v=0;v=b)&&(n<=m&&(n=m),i>=b&&(i=b),o=Math.floor((i-n)/a)+1,s=0),v=0;vm&&(f.unshift(m),h.unshift(h[0])),f[f.length-1]{"use strict";var D8=qa(),qbe=So(),l2t=_8(),u2t=RG();Obe.exports=function(t){var r=D8.select(t).selectAll("g.contour");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=D8.select(this),a=n[0].trace,o=a.contours,s=a.line,l=o.size||1,u=o.start,c=o.type==="constraint",f=!c&&o.coloring==="lines",h=!c&&o.coloring==="fill",d=f||h?u2t(a):null;i.selectAll("g.contourlevel").each(function(b){D8.select(this).selectAll("path").call(qbe.lineGroupStyle,s.width,f?d(b.level):s.color,s.dash)});var v=o.labelfont;if(i.selectAll("g.contourlabels text").each(function(b){qbe.font(D8.select(this),{weight:v.weight,style:v.style,variant:v.variant,textcase:v.textcase,lineposition:v.lineposition,shadow:v.shadow,family:v.family,size:v.size,color:v.color||(f?d(b.level):s.color)})}),c)i.selectAll("g.contourfill path").style("fill",a.fillcolor);else if(h){var m;i.selectAll("g.contourfill path").style("fill",function(b){return m===void 0&&(m=b.level),d(b.level+.5*l)}),m===void 0&&(m=u),i.selectAll("g.contourbg path").style("fill",d(m-.5*l))}}),l2t(t)}});var z8=ye((jcr,Nbe)=>{"use strict";var Bbe=tc(),c2t=RG(),f2t=B4();function h2t(e,t,r){var n=t.contours,i=t.line,a=n.size||1,o=n.coloring,s=c2t(t,{isColorbar:!0});if(o==="heatmap"){var l=Bbe.extractOpts(t);r._fillgradient=l.reversescale?Bbe.flipScale(l.colorscale):l.colorscale,r._zrange=[l.min,l.max]}else o==="fill"&&(r._fillcolor=s);r._line={color:o==="lines"?s:i.color,width:n.showlines!==!1?i.width:0,dash:i.dash},r._levels={start:n.start,end:f2t(n),size:a}}Nbe.exports={min:"zmin",max:"zmax",calc:h2t}});var DG=ye((Wcr,Ube)=>{"use strict";var q8=ka(),d2t=b8();Ube.exports=function(t,r,n,i,a){a||(a={}),a.isContour=!0;var o=d2t(t,r,n,i,a);return o&&o.forEach(function(s){var l=s.trace;l.contours.type==="constraint"&&(l.fillcolor&&q8.opacity(l.fillcolor)?s.color=q8.addOpacity(l.fillcolor,1):l.contours.showlines&&q8.opacity(l.line.color)&&(s.color=q8.addOpacity(l.line.color,1)))}),o}});var Gbe=ye((Xcr,Vbe)=>{"use strict";Vbe.exports={attributes:_G(),supplyDefaults:ube(),crossTraceDefaults:A8(),calc:AG(),plot:R8().plot,layerName:"contourlayer",style:F8(),colorbar:z8(),hoverPoints:DG(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:mh(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var jbe=ye((Zcr,Hbe)=>{"use strict";Hbe.exports=Gbe()});var FG=ye((Ycr,Jbe)=>{"use strict";var Wbe=Eo(),v2t=xG(),Ybe=ka(),Xbe=Ybe.addOpacity,p2t=Ybe.opacity,Kbe=E8(),Zbe=Pr().isArrayOrTypedArray,g2t=Kbe.CONSTRAINT_REDUCTION,m2t=Kbe.COMPARISON_OPS2;Jbe.exports=function(t,r,n,i,a,o){var s=r.contours,l,u,c,f=n("contours.operation");if(s._operation=g2t[f],y2t(n,s),f==="="?l=s.showlines=!0:(l=n("contours.showlines"),c=n("fillcolor",Xbe((t.line||{}).color||a,.5))),l){var h=c&&p2t(c)?Xbe(r.fillcolor,1):a;u=n("line.color",h),n("line.width",2),n("line.dash")}n("line.smoothing"),v2t(n,i,u,o)};function y2t(e,t){var r;m2t.indexOf(t.operation)===-1?(e("contours.value",[0,1]),Zbe(t.value)?t.value.length>2?t.value=t.value.slice(2):t.length===0?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:Wbe(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),Wbe(t.value)||(Zbe(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var e2e=ye((Kcr,Qbe)=>{"use strict";var zG=Pr(),_2t=a8(),x2t=Dg(),b2t=FG(),w2t=C8(),T2t=L8(),A2t=R4(),$be=O4();Qbe.exports=function(t,r,n,i){function a(u,c){return zG.coerce(t,r,$be,u,c)}function o(u){return zG.coerce2(t,r,$be,u)}var s=_2t(t,r,a,i);if(!s){r.visible=!1;return}x2t(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hoverongaps"),a("hovertemplate"),a("hovertemplatefallback");var l=a("contours.type")==="constraint";a("connectgaps",zG.isArray1D(r.z)),l?b2t(t,r,a,i,n):(w2t(t,r,a,o),T2t(t,r,a,i)),r.contours&&r.contours.coloring==="heatmap"&&A2t(a,i),a("zorder")}});var r2e=ye((Jcr,t2e)=>{"use strict";t2e.exports={attributes:O4(),supplyDefaults:e2e(),calc:AG(),plot:R8().plot,style:F8(),colorbar:z8(),hoverPoints:DG(),moduleType:"trace",name:"contour",basePlotModule:mh(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var n2e=ye(($cr,i2e)=>{"use strict";i2e.exports=r2e()});var qG=ye((Qcr,l2e)=>{"use strict";var{hovertemplateAttrs:S2t,texttemplateAttrs:M2t,templatefallbackAttrs:a2e}=Ll(),E2t=Pg(),o0=pf(),k2t=Gl(),o2e=Tu(),C2t=Pd().dash,F_=Ao().extendFlat,X0=o0.marker,H4=o0.line,s2e=X0.line;l2e.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:F_({},o0.mode,{dflt:"markers"}),text:F_({},o0.text,{}),texttemplate:M2t({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:a2e({editType:"plot"}),hovertext:F_({},o0.hovertext,{}),line:{color:H4.color,width:H4.width,dash:C2t,backoff:H4.backoff,shape:F_({},H4.shape,{values:["linear","spline"]}),smoothing:H4.smoothing,editType:"calc"},connectgaps:o0.connectgaps,cliponaxis:o0.cliponaxis,fill:F_({},o0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:E2t(),marker:F_({symbol:X0.symbol,opacity:X0.opacity,angle:X0.angle,angleref:X0.angleref,standoff:X0.standoff,maxdisplayed:X0.maxdisplayed,size:X0.size,sizeref:X0.sizeref,sizemin:X0.sizemin,sizemode:X0.sizemode,line:F_({width:s2e.width,dash:s2e.dash,editType:"calc"},o2e("marker.line")),gradient:X0.gradient,editType:"calc"},o2e("marker")),textfont:o0.textfont,textposition:o0.textposition,selected:o0.selected,unselected:o0.unselected,hoverinfo:F_({},k2t.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:o0.hoveron,hovertemplate:S2t(),hovertemplatefallback:a2e()}});var h2e=ye((efr,f2e)=>{"use strict";var u2e=Pr(),L2t=Pm(),jT=Ru(),P2t=$p(),I2t=D0(),c2e=uT(),R2t=F0(),D2t=Fg(),F2t=qG();f2e.exports=function(t,r,n,i){function a(h,d){return u2e.coerce(t,r,F2t,h,d)}var o=a("a"),s=a("b"),l=a("c"),u;if(o?(u=o.length,s?(u=Math.min(u,s.length),l&&(u=Math.min(u,l.length))):l?u=Math.min(u,l.length):u=0):s&&l&&(u=Math.min(s.length,l.length)),!u){r.visible=!1;return}r._length=u,a("sum"),a("text"),a("hovertext"),r.hoveron!=="fills"&&(a("hovertemplate"),a("hovertemplatefallback"));var c=u{"use strict";var OG=ho();d2e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.aLabel=OG.tickText(a.aaxis,t.a,!0).text,i.bLabel=OG.tickText(a.baxis,t.b,!0).text,i.cLabel=OG.tickText(a.caxis,t.c,!0).text,i}});var y2e=ye((rfr,m2e)=>{"use strict";var BG=Eo(),z2t=z0(),q2t=Dm(),O2t=q0(),B2t=O0().calcMarkerSize,p2e=["a","b","c"],g2e={a:["b","c"],b:["a","c"],c:["a","b"]};m2e.exports=function(t,r){var n=t._fullLayout[r.subplot],i=n.sum,a=r.sum||i,o={a:r.a,b:r.b,c:r.c},s=r.ids,l,u,c,f,h,d;for(l=0;l{"use strict";var N2t=pT();_2e.exports=function(t,r,n){var i=r.plotContainer;i.select(".scatterlayer").selectAll("*").remove();for(var a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:i,layerClipId:r._hasClipOnAxisFalse?r.clipIdRelative:null},l=r.layers.frontplot.select("g.scatterlayer"),u=0;u{"use strict";var U2t=_T();b2e.exports=function(t,r,n,i){var a=U2t(t,r,n,i);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index],h=o.trace,d=o.subplot;o.a=f.a,o.b=f.b,o.c=f.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var v={};v[h.subplot]={_subplot:d};var m=h._module.formatLabels(f,h,v);o.aLabel=m.aLabel,o.bLabel=m.bLabel,o.cLabel=m.cLabel;var b=f.hi||h.hoverinfo,p=[];function k(T,L){p.push(T._hovertitle+": "+L)}if(!h.hovertemplate){var M=b.split("+");M.indexOf("all")!==-1&&(M=["a","b","c"]),M.indexOf("a")!==-1&&k(d.aaxis,o.aLabel),M.indexOf("b")!==-1&&k(d.baxis,o.bLabel),M.indexOf("c")!==-1&&k(d.caxis,o.cLabel)}return o.extraText=p.join("
"),o.hovertemplate=h.hovertemplate,a}});var A2e=ye((afr,T2e)=>{"use strict";T2e.exports=function(t,r,n,i,a){if(r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),i[a]){var o=i[a];t.a=o.a,t.b=o.b,t.c=o.c}else t.a=r.a,t.b=r.b,t.c=r.c;return t}});var F2e=ye((ofr,D2e)=>{"use strict";var L2e=qa(),V2t=fd(),NG=Oa(),Wy=Pr(),Vm=Wy.strTranslate,O8=Wy._,XT=ka(),B8=So(),j4=xm(),UG=Ao().extendFlat,G2t=Mc(),z_=ho(),S2e=yv(),M2e=ef(),P2e=Cg(),E2e=P2e.freeMode,H2t=P2e.rectMode,VG=qb(),j2t=qf().prepSelect,W2t=qf().selectOnClick,X2t=qf().clearOutline,Z2t=qf().clearSelectionsCache,I2e=Rh();function R2e(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}D2e.exports=R2e;var Gm=R2e.prototype;Gm.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};Gm.plot=function(e,t){var r=this,n=t[r.id],i=t._size;r._hasClipOnAxisFalse=!1;for(var a=0;aWT*u?(p=u,b=p*WT):(b=l,p=b/WT),k=o*b/l,M=s*p/u,v=t.l+t.w*i-b/2,m=t.t+t.h*(1-a)-p/2,r.x0=v,r.y0=m,r.w=b,r.h=p,r.sum=c,r.xaxis={type:"linear",range:[f+2*d-c,c-f-2*h],domain:[i-k/2,i+k/2],_id:"x"},j4(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(V){return V.a>=r.aaxis.range[0]&&V.a<=r.aaxis.range[1]&&V.b>=r.baxis.range[1]&&V.b<=r.baxis.range[0]&&V.c>=r.caxis.range[1]&&V.c<=r.caxis.range[0]},r.yaxis={type:"linear",range:[f,c-h-d],domain:[a-M/2,a+M/2],_id:"y"},j4(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var T=r.yaxis.domain[0],L=r.aaxis=UG({},e.aaxis,{range:[f,c-h-d],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[T,T+M*WT],anchor:"free",position:0,_id:"y",_length:b});j4(L,r.graphDiv._fullLayout),L.setScale();var x=r.baxis=UG({},e.baxis,{range:[c-f-d,h],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:b});j4(x,r.graphDiv._fullLayout),x.setScale();var C=r.caxis=UG({},e.caxis,{range:[c-f-h,d],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[T,T+M*WT],anchor:"free",position:0,_id:"y",_length:b});j4(C,r.graphDiv._fullLayout),C.setScale();var S="M"+v+","+(m+p)+"h"+b+"l-"+b/2+",-"+p+"Z";r.clipDef.select("path").attr("d",S),r.layers.plotbg.select("path").attr("d",S);var g="M0,"+p+"h"+b+"l-"+b/2+",-"+p+"Z";r.clipDefRelative.select("path").attr("d",g);var P=Vm(v,m);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),r.clipDefRelative.select("path").attr("transform",null);var E=Vm(v-x._offset,m+p);r.layers.baxis.attr("transform",E),r.layers.bgrid.attr("transform",E);var z=Vm(v+b/2,m)+"rotate(30)"+Vm(0,-L._offset);r.layers.aaxis.attr("transform",z),r.layers.agrid.attr("transform",z);var q=Vm(v+b/2,m)+"rotate(-30)"+Vm(0,-C._offset);r.layers.caxis.attr("transform",q),r.layers.cgrid.attr("transform",q),r.drawAxes(!0),r.layers.aline.select("path").attr("d",L.showline?"M"+v+","+(m+p)+"l"+b/2+",-"+p:"M0,0").call(XT.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",x.showline?"M"+v+","+(m+p)+"h"+b:"M0,0").call(XT.stroke,x.linecolor||"#000").style("stroke-width",(x.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",C.showline?"M"+(v+b/2)+","+m+"l"+b/2+","+p:"M0,0").call(XT.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),B8.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};Gm.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.slice(7)+"title",i=t.layers,a=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(a),t.drawAx(o),t.drawAx(s),e){var l=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks==="outside"?s.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;i["a-title"]=VG.draw(r,"a"+n,{propContainer:a,propName:t.id+".aaxis.title.text",placeholder:O8(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-l,"text-anchor":"middle"}}),i["b-title"]=VG.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title.text",placeholder:O8(r,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+o.title.font.size*.83+u,"text-anchor":"middle"}}),i["c-title"]=VG.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title.text",placeholder:O8(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+s.title.font.size*.83+u,"text-anchor":"middle"}})}};Gm.drawAx=function(e){var t=this,r=t.graphDiv,n=e._name,i=n.charAt(0),a=e._id,o=t.layers[n],s=30,l=i+"tickLayout",u=Y2t(e);t[l]!==u&&(o.selectAll("."+a+"tick").remove(),t[l]=u),e.setScale();var c=z_.calcTicks(e),f=z_.clipEnds(e,c),h=z_.makeTransTickFn(e),d=z_.getTickSigns(e)[2],v=Wy.deg2rad(s),m=d*(e.linewidth||1)/2,b=d*e.ticklen,p=t.w,k=t.h,M=i==="b"?"M0,"+m+"l"+Math.sin(v)*b+","+Math.cos(v)*b:"M"+m+",0l"+Math.cos(v)*b+","+-Math.sin(v)*b,T={a:"M0,0l"+k+",-"+p/2,b:"M0,0l-"+p/2+",-"+k,c:"M0,0l-"+k+","+p/2}[i];z_.drawTicks(r,e,{vals:e.ticks==="inside"?f:c,layer:o,path:M,transFn:h,crisp:!1}),z_.drawGrid(r,e,{vals:f,layer:t.layers[i+"grid"],path:T,transFn:h,crisp:!1}),z_.drawLabels(r,e,{vals:c,layer:o,transFn:h,labelFns:z_.makeLabelFns(e,0,s)})};function Y2t(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var yd=I2e.MINZOOM/2+.87,K2t="m-0.87,.5h"+yd+"v3h-"+(yd+5.2)+"l"+(yd/2+2.6)+",-"+(yd*.87+4.5)+"l2.6,1.5l-"+yd/2+","+yd*.87+"Z",J2t="m0.87,.5h-"+yd+"v3h"+(yd+5.2)+"l-"+(yd/2+2.6)+",-"+(yd*.87+4.5)+"l-2.6,1.5l"+yd/2+","+yd*.87+"Z",$2t="m0,1l"+yd/2+","+yd*.87+"l2.6,-1.5l-"+(yd/2+2.6)+",-"+(yd*.87+4.5)+"l-"+(yd/2+2.6)+","+(yd*.87+4.5)+"l2.6,1.5l"+yd/2+",-"+yd*.87+"Z",Q2t="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",k2e=!0;Gm.clearOutline=function(){Z2t(this.dragOptions),X2t(this.dragOptions.gd)};Gm.initInteractions=function(){var e=this,t=e.layers.plotbg.select("path").node(),r=e.graphDiv,n=r._fullLayout._zoomlayer,i,a;this.dragOptions={element:t,gd:r,plotinfo:{id:e.id,domain:r._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(E,z,q){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],i=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY;var V=e.dragOptions.dragmode=r._fullLayout.dragmode;E2e(V)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,V==="zoom"?(e.dragOptions.moveFn=x,e.dragOptions.clickFn=p,e.dragOptions.doneFn=C,k(E,z,q)):V==="pan"?(e.dragOptions.moveFn=g,e.dragOptions.clickFn=p,e.dragOptions.doneFn=P,S(),e.clearOutline(r)):(H2t(V)||E2e(V))&&j2t(E,z,q,e.dragOptions,V)}};var o,s,l,u,c,f,h,d,v,m;function b(E){var z={};return z[e.id+".aaxis.min"]=E.a,z[e.id+".baxis.min"]=E.b,z[e.id+".caxis.min"]=E.c,z}function p(E,z){var q=r._fullLayout.clickmode;C2e(r),E===2&&(r.emit("plotly_doubleclick",null),NG.call("_guiRelayout",r,b({a:0,b:0,c:0}))),q.indexOf("select")>-1&&E===1&&W2t(z,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),q.indexOf("event")>-1&&M2e.click(r,z,e.id)}function k(E,z,q){var V=t.getBoundingClientRect();o=z-V.left,s=q-V.top,r._fullLayout._calcInverseTransform(r);var G=r._fullLayout._invTransform,Z=Wy.apply3DTransform(G)(o,s);o=Z[0],s=Z[1],l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l,u=e.aaxis.range[1]-l.a,f=V2t(e.graphDiv._fullLayout[e.id].bgcolor).getLuminance(),h="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",d=!1,v=n.append("path").attr("class","zoombox").attr("transform",Vm(e.x0,e.y0)).style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",h),m=n.append("path").attr("class","zoombox-corners").attr("transform",Vm(e.x0,e.y0)).style({fill:XT.background,stroke:XT.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function M(E,z){return 1-z/e.h}function T(E,z){return 1-(E+(e.h-z)/Math.sqrt(3))/e.w}function L(E,z){return(E-(e.h-z)/Math.sqrt(3))/e.w}function x(E,z){var q=o+E*i,V=s+z*a,G=Math.max(0,Math.min(1,M(o,s),M(q,V))),Z=Math.max(0,Math.min(1,T(o,s),T(q,V))),j=Math.max(0,Math.min(1,L(o,s),L(q,V))),N=(G/2+j)*e.w,H=(1-G/2-Z)*e.w,ie=(N+H)/2,ae=H-N,_e=(1-G)*e.h,Ee=_e-ae/WT;ae.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),m.transition().style("opacity",1).duration(200),d=!0),r.emit("plotly_relayouting",b(c))}function C(){C2e(r),c!==l&&(NG.call("_guiRelayout",r,b(c)),k2e&&r.data&&r._context.showTips&&(Wy.notifier(O8(r,"Double-click to zoom back out"),"long",r),k2e=!1))}function S(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function g(E,z){var q=E/e.xaxis._m,V=z/e.yaxis._m;c={a:l.a-V,b:l.b+(q+V)/2,c:l.c-(q-V)/2};var G=[c.a,c.b,c.c].sort(Wy.sorterAsc),Z={a:G.indexOf(c.a),b:G.indexOf(c.b),c:G.indexOf(c.c)};G[0]<0&&(G[1]+G[0]/2<0?(G[2]+=G[0]+G[1],G[0]=G[1]=0):(G[2]+=G[0]/2,G[1]+=G[0]/2,G[0]=0),c={a:G[Z.a],b:G[Z.b],c:G[Z.c]},z=(l.a-c.a)*e.yaxis._m,E=(l.c-c.c-l.b+c.b)*e.xaxis._m);var j=Vm(e.x0+E,e.y0+z);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",j);var N=Vm(-E,-z);e.clipDefRelative.select("path").attr("transform",N),e.aaxis.range=[c.a,e.sum-c.b-c.c],e.baxis.range=[e.sum-c.a-c.c,c.b],e.caxis.range=[e.sum-c.a-c.b,c.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(B8.hideOutsideRangePoints,e),r.emit("plotly_relayouting",b(c))}function P(){NG.call("_guiRelayout",r,b(c))}t.onmousemove=function(E){M2e.hover(r,E,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(E){r._dragging||S2e.unhover(r,E)},S2e.init(this.dragOptions)};function C2e(e){L2e.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var jG=ye((sfr,z2e)=>{"use strict";var ewt=Ih(),twt=Cc().attributes,su=Rd(),rwt=mc().overrideAll,GG=Ao().extendFlat,HG={title:{text:su.title.text,font:su.title.font},color:su.color,tickmode:su.minor.tickmode,nticks:GG({},su.nticks,{dflt:6,min:1}),tick0:su.tick0,dtick:su.dtick,tickvals:su.tickvals,ticktext:su.ticktext,ticks:su.ticks,ticklen:su.ticklen,tickwidth:su.tickwidth,tickcolor:su.tickcolor,ticklabelstep:su.ticklabelstep,showticklabels:su.showticklabels,labelalias:su.labelalias,showtickprefix:su.showtickprefix,tickprefix:su.tickprefix,showticksuffix:su.showticksuffix,ticksuffix:su.ticksuffix,showexponent:su.showexponent,exponentformat:su.exponentformat,minexponent:su.minexponent,separatethousands:su.separatethousands,tickfont:su.tickfont,tickangle:su.tickangle,tickformat:su.tickformat,tickformatstops:su.tickformatstops,hoverformat:su.hoverformat,showline:GG({},su.showline,{dflt:!0}),linecolor:su.linecolor,linewidth:su.linewidth,showgrid:GG({},su.showgrid,{dflt:!0}),gridcolor:su.gridcolor,gridwidth:su.gridwidth,griddash:su.griddash,layer:su.layer,min:{valType:"number",dflt:0,min:0}},N8=z2e.exports=rwt({domain:twt({name:"ternary"}),bgcolor:{valType:"color",dflt:ewt.background},sum:{valType:"number",dflt:1,min:0},aaxis:HG,baxis:HG,caxis:HG},"plot","from-root");N8.uirevision={valType:"any",editType:"none"};N8.aaxis.uirevision=N8.baxis.uirevision=N8.caxis.uirevision={valType:"any",editType:"none"}});var q_=ye((lfr,q2e)=>{"use strict";var iwt=Pr(),nwt=vl(),awt=Cc().defaults;q2e.exports=function(t,r,n,i){var a=i.type,o=i.attributes,s=i.handleDefaults,l=i.partition||"x",u=r._subplots[a],c=u.length,f=c&&u[0].replace(/\d+$/,""),h,d;function v(k,M){return iwt.coerce(h,d,o,k,M)}for(var m=0;m{"use strict";var owt=ka(),swt=vl(),U8=Pr(),lwt=q_(),uwt=s_(),cwt=l_(),fwt=q3(),hwt=Pb(),dwt=c4(),B2e=jG(),O2e=["aaxis","baxis","caxis"];N2e.exports=function(t,r,n){lwt(t,r,n,{type:"ternary",attributes:B2e,handleDefaults:vwt,font:r.font,paper_bgcolor:r.paper_bgcolor})};function vwt(e,t,r,n){var i=r("bgcolor"),a=r("sum");n.bgColor=owt.combine(i,n.paper_bgcolor);for(var o,s,l,u=0;u=a&&(c.min=0,f.min=0,h.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function pwt(e,t,r,n){var i=B2e[t._name];function a(d,v){return U8.coerce(e,t,i,d,v)}a("uirevision",n.uirevision),t.type="linear";var o=a("color"),s=o!==i.color.dflt?o:r.font.color,l=t._name,u=l.charAt(0).toUpperCase(),c="Component "+u,f=a("title.text",c);t._hovertitle=f===c?f:u,U8.coerceFont(a,"title.font",r.font,{overrideDflt:{size:U8.bigFont(r.font.size),color:s}}),a("min"),hwt(e,t,a,"linear"),cwt(e,t,a,"linear"),uwt(e,t,a,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),fwt(e,t,a,{outerTicks:!0});var h=a("showticklabels");h&&(U8.coerceFont(a,"tickfont",r.font,{overrideDflt:{color:s}}),a("tickangle"),a("tickformat")),dwt(e,t,a,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),a("hoverformat"),a("layer")}});var V2e=ye(Z0=>{"use strict";var gwt=F2e(),mwt=Id().getSubplotCalcData,ywt=Pr().counterRegex,ZT="ternary";Z0.name=ZT;var _wt=Z0.attr="subplot";Z0.idRoot=ZT;Z0.idRegex=Z0.attrRegex=ywt(ZT);var xwt=Z0.attributes={};xwt[_wt]={valType:"subplotid",dflt:"ternary",editType:"calc"};Z0.layoutAttributes=jG();Z0.supplyLayoutDefaults=U2e();Z0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[ZT],a=0;a{"use strict";G2e.exports={attributes:qG(),supplyDefaults:h2e(),colorbar:Qd(),formatLabels:v2e(),calc:y2e(),plot:x2e(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:w2e(),selectPoints:xT(),eventData:A2e(),moduleType:"trace",name:"scatterternary",basePlotModule:V2e(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var W2e=ye((hfr,j2e)=>{"use strict";j2e.exports=H2e()});var WG=ye((dfr,Z2e)=>{"use strict";var Oh=C4(),YT=Ao().extendFlat,X2e=vf().axisHoverFormat;Z2e.exports={y:Oh.y,x:Oh.x,x0:Oh.x0,y0:Oh.y0,xhoverformat:X2e("x"),yhoverformat:X2e("y"),name:YT({},Oh.name,{}),orientation:YT({},Oh.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:Oh.fillcolor,points:YT({},Oh.boxpoints,{}),jitter:YT({},Oh.jitter,{}),pointpos:YT({},Oh.pointpos,{}),width:YT({},Oh.width,{}),marker:Oh.marker,text:Oh.text,hovertext:Oh.hovertext,hovertemplate:Oh.hovertemplate,hovertemplatefallback:Oh.hovertemplatefallback,quartilemethod:Oh.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:Oh.offsetgroup,alignmentgroup:Oh.alignmentgroup,selected:Oh.selected,unselected:Oh.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:Oh.zorder}});var YG=ye((vfr,Y2e)=>{"use strict";var XG=L4(),ZG=Pr().extendFlat;Y2e.exports={violinmode:ZG({},XG.boxmode,{}),violingap:ZG({},XG.boxgap,{}),violingroupgap:ZG({},XG.boxgroupgap,{})}});var ewe=ye((pfr,Q2e)=>{"use strict";var K2e=Pr(),bwt=ka(),J2e=I4(),$2e=WG();Q2e.exports=function(t,r,n,i){function a(L,x){return K2e.coerce(t,r,$2e,L,x)}function o(L,x){return K2e.coerce2(t,r,$2e,L,x)}if(J2e.handleSampleDefaults(t,r,a,i),r.visible!==!1){a("bandwidth"),a("side");var s=a("width");s||(a("scalegroup",r.name),a("scalemode"));var l=a("span"),u;Array.isArray(l)&&(u="manual"),a("spanmode",u);var c=a("line.color",(t.marker||{}).color||n),f=a("line.width"),h=a("fillcolor",bwt.addOpacity(r.line.color,.5));J2e.handlePointsDefaults(t,r,a,{prefix:""});var d=o("box.width"),v=o("box.fillcolor",h),m=o("box.line.color",c),b=o("box.line.width",f),p=a("box.visible",!!(d||v||m||b));p||(r.box={visible:!1});var k=o("meanline.color",c),M=o("meanline.width",f),T=a("meanline.visible",!!(k||M));T||(r.meanline={visible:!1}),a("quartilemethod"),a("zorder")}}});var rwe=ye((gfr,twe)=>{"use strict";var wwt=Pr(),Twt=YG(),Awt=QI();twe.exports=function(t,r,n){function i(a,o){return wwt.coerce(t,r,Twt,a,o)}Awt._supply(t,r,n,i,"violin")}});var V8=ye(y2=>{"use strict";var Swt=Pr(),Mwt={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};y2.makeKDE=function(e,t,r){var n=r.length,i=Mwt.gaussian,a=e.bandwidth,o=1/(n*a);return function(s){for(var l=0,u=0;u{"use strict";var KG=Pr(),JG=ho(),Ewt=VV(),iwe=V8(),kwt=fs().BADNUM;nwe.exports=function(t,r){var n=Ewt(t,r);if(n[0].t.empty)return n;for(var i=t._fullLayout,a=JG.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,l=0,u=0,c=0;c{"use strict";var Iwt=t8().setPositionOffset,owe=["v","h"];swe.exports=function(t,r){for(var n=t.calcdata,i=r.xaxis,a=r.yaxis,o=0;o{"use strict";var $G=qa(),QG=Pr(),Rwt=So(),eH=r8(),Dwt=MU(),Fwt=V8();uwe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,l=r.yaxis;function u(c,f){var h=Dwt(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return Rwt.smoothopen(h[0],1)}QG.makeTraceGroups(i,n,"trace violins").each(function(c){var f=$G.select(this),h=c[0],d=h.t,v=h.trace;if(v.visible!==!0||d.empty){f.remove();return}var m=d.bPos,b=d.bdPos,p=r[d.valLetter+"axis"],k=r[d.posLetter+"axis"],M=v.side==="both",T=M||v.side==="positive",L=M||v.side==="negative",x=f.selectAll("path.violin").data(QG.identity);x.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","violin"),x.exit().remove(),x.each(function(V){var G=$G.select(this),Z=V.density,j=Z.length,N=k.c2l(V.pos+m,!0),H=k.l2p(N),ie;if(v.width)ie=d.maxKDE/b;else{var ae=o._violinScaleGroupStats[v.scalegroup];ie=v.scalemode==="count"?ae.maxKDE/b*(ae.maxCount/V.pts.length):ae.maxKDE/b}var _e,Ee,Ce,ge,re,Se,ke;if(T){for(Se=new Array(j),ge=0;ge{"use strict";var fwe=qa(),KT=ka(),zwt=sp().stylePoints;hwe.exports=function(t){var r=fwe.select(t).selectAll("g.trace.violins");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=n[0].trace,a=fwe.select(this),o=i.box||{},s=o.line||{},l=i.meanline||{},u=l.width;a.selectAll("path.violin").style("stroke-width",i.line.width+"px").call(KT.stroke,i.line.color).call(KT.fill,i.fillcolor),a.selectAll("path.box").style("stroke-width",s.width+"px").call(KT.stroke,s.color).call(KT.fill,o.fillcolor);var c={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};a.selectAll("path.mean").style(c).call(KT.stroke,l.color),a.selectAll("path.meanline").style(c).call(KT.stroke,l.color),zwt(a,i,t)})}});var mwe=ye((wfr,gwe)=>{"use strict";var qwt=ka(),tH=Pr(),Owt=ho(),vwe=XV(),pwe=V8();gwe.exports=function(t,r,n,i,a){a||(a={});var o=a.hoverLayer,s=t.cd,l=s[0].trace,u=l.hoveron,c=u.indexOf("violins")!==-1,f=u.indexOf("kde")!==-1,h=[],d,v;if(c||f){var m=vwe.hoverOnBoxes(t,r,n,i);if(f&&m.length>0){var b=t.xa,p=t.ya,k,M,T,L,x;l.orientation==="h"?(x=r,k="y",T=p,M="x",L=b):(x=n,k="x",T=b,M="y",L=p);var C=s[t.index];if(x>=C.span[0]&&x<=C.span[1]){var S=tH.extendFlat({},t),g=L.c2p(x,!0),P=pwe.getKdeValue(C,l,x),E=pwe.getPositionOnKdePath(C,l,g),z=T._offset,q=T._length;S[k+"0"]=E[0],S[k+"1"]=E[1],S[M+"0"]=S[M+"1"]=g,S[M+"Label"]=M+": "+Owt.hoverLabelText(L,x,l[M+"hoverformat"])+", "+s[0].t.labels.kde+" "+P.toFixed(3);for(var V=0,G=0;G{"use strict";ywe.exports={attributes:WG(),layoutAttributes:YG(),supplyDefaults:ewe(),crossTraceDefaults:I4().crossTraceDefaults,supplyLayoutDefaults:rwe(),calc:awe(),crossTraceCalc:lwe(),plot:cwe(),style:dwe(),styleOnSelect:sp().styleOnSelect,hoverPoints:mwe(),selectPoints:ZV(),moduleType:"trace",name:"violin",basePlotModule:mh(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var bwe=ye((Afr,xwe)=>{"use strict";xwe.exports=_we()});var Twe=ye((Sfr,wwe)=>{"use strict";wwe.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var iH=ye((Mfr,Ewe)=>{"use strict";var jc=qm(),rH=pf().line,Bwt=Gl(),Awe=vf().axisHoverFormat,{hovertemplateAttrs:Nwt,texttemplateAttrs:Uwt,templatefallbackAttrs:Swe}=Ll(),Mwe=Twe(),Xy=Ao().extendFlat,Vwt=ka();Ewe.exports={x:jc.x,x0:jc.x0,dx:jc.dx,y:jc.y,y0:jc.y0,dy:jc.dy,xperiod:jc.xperiod,yperiod:jc.yperiod,xperiod0:jc.xperiod0,yperiod0:jc.yperiod0,xperiodalignment:jc.xperiodalignment,yperiodalignment:jc.yperiodalignment,xhoverformat:Awe("x"),yhoverformat:Awe("y"),hovertext:jc.hovertext,hovertemplate:Nwt({},{keys:Mwe.eventDataKeys}),hovertemplatefallback:Swe(),hoverinfo:Xy({},Bwt.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:Uwt({editType:"plot"},{keys:Mwe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:Swe({editType:"plot"}),text:jc.text,textposition:jc.textposition,insidetextanchor:Xy({},jc.insidetextanchor,{dflt:"middle"}),textangle:Xy({},jc.textangle,{dflt:0}),textfont:jc.textfont,insidetextfont:jc.insidetextfont,outsidetextfont:jc.outsidetextfont,constraintext:jc.constraintext,cliponaxis:jc.cliponaxis,orientation:Xy({},jc.orientation,{}),offset:Xy({},jc.offset,{arrayOk:!1}),width:Xy({},jc.width,{arrayOk:!1}),marker:Gwt(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:Xy({},rH.color,{dflt:Vwt.defaultLine}),width:Xy({},rH.width,{dflt:0,editType:"plot"}),dash:rH.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:jc.offsetgroup,alignmentgroup:jc.alignmentgroup,zorder:jc.zorder};function Gwt(){var e=Xy({},jc.marker);return delete e.pattern,delete e.cornerradius,e}});var nH=ye((Efr,kwe)=>{"use strict";kwe.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"}}});var oH=ye((kfr,Lwe)=>{"use strict";var G8=Pr(),Hwt=r2(),jwt=i0().handleText,Wwt=lT(),Xwt=Dg(),Cwe=iH(),aH=ka();function Zwt(e,t,r,n){function i(f,h){return G8.coerce(e,t,Cwe,f,h)}var a=Wwt(e,t,n,i);if(!a){t.visible=!1;return}Xwt(e,t,n,i),i("xhoverformat"),i("yhoverformat"),i("orientation",t.y&&!t.x?"v":"h"),i("offset"),i("width");var o=i("text");i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var s=i("textposition");jwt(e,t,n,i,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&i("textinfo",G8.isArrayOrTypedArray(o)?"text+value":"value");var l=i("marker.color",r);i("marker.line.color",aH.defaultLine),i("marker.line.width");var u=i("connector.visible");if(u){i("connector.fillcolor",Ywt(l));var c=i("connector.line.width");c&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function Ywt(e){var t=G8.isArrayOrTypedArray(e)?"#000":e;return aH.addOpacity(t,.5*aH.opacity(t))}function Kwt(e,t){var r,n;function i(o){return G8.coerce(n._input,n,Cwe,o)}for(var a=0;a{"use strict";var Jwt=Pr(),$wt=nH();Pwe.exports=function(e,t,r){var n=!1;function i(s,l){return Jwt.coerce(e,t,$wt,s,l)}for(var a=0;a{"use strict";var JT=Pr();Rwe.exports=function(t,r){for(var n=0;n{"use strict";var Fwe=ho(),zwe=zg(),Qwt=Dwe(),e3t=q0(),W4=fs().BADNUM;qwe.exports=function(t,r){var n=Fwe.getFromId(t,r.xaxis||"x"),i=Fwe.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c,f,h;r.orientation==="h"?(a=n.makeCalcdata(r,"x"),s=i.makeCalcdata(r,"y"),l=zwe(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=zwe(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;var d=Math.min(o.length,a.length),v=new Array(d);for(r._base=[],f=0;f{"use strict";var Bwe=i2().setGroupPositions;Nwe.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h{"use strict";var H8=qa(),B_=Pr(),Vwe=So(),O_=fs().BADNUM,t3t=p2(),r3t=bv().clearMinTextSize;Hwe.exports=function(t,r,n,i){var a=t._fullLayout;r3t("funnel",a),i3t(t,r,n,i),n3t(t,r,n,i),t3t.plot(t,r,n,i,{mode:a.funnelmode,norm:a.funnelmode,gap:a.funnelgap,groupgap:a.funnelgroupgap})};function i3t(e,t,r,n){var i=t.xaxis,a=t.yaxis;B_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=H8.select(this),l=o[0].trace,u=B_.ensureSingle(s,"g","regions");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.region").data(B_.identity);f.enter().append("g").classed("region",!0),f.exit().remove();var h=f.size();f.each(function(d,v){if(!(v!==h-1&&!d.cNext)){var m=Gwe(d,i,a,c),b=m[0],p=m[1],k="";b[0]!==O_&&p[0]!==O_&&b[1]!==O_&&p[1]!==O_&&b[2]!==O_&&p[2]!==O_&&b[3]!==O_&&p[3]!==O_&&(c?k+="M"+b[0]+","+p[1]+"L"+b[2]+","+p[2]+"H"+b[3]+"L"+b[1]+","+p[1]+"Z":k+="M"+b[1]+","+p[1]+"L"+b[2]+","+p[3]+"V"+p[2]+"L"+b[1]+","+p[0]+"Z"),k===""&&(k="M0,0Z"),B_.ensureSingle(H8.select(this),"path").attr("d",k).call(Vwe.setClipUrl,t.layerClipId,e)}})})}function n3t(e,t,r,n){var i=t.xaxis,a=t.yaxis;B_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=H8.select(this),l=o[0].trace,u=B_.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible||!l.connector.line.width){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.line").data(B_.identity);f.enter().append("g").classed("line",!0),f.exit().remove();var h=f.size();f.each(function(d,v){if(!(v!==h-1&&!d.cNext)){var m=Gwe(d,i,a,c),b=m[0],p=m[1],k="";b[3]!==void 0&&p[3]!==void 0&&(c?(k+="M"+b[0]+","+p[1]+"L"+b[2]+","+p[2],k+="M"+b[1]+","+p[1]+"L"+b[3]+","+p[2]):(k+="M"+b[1]+","+p[1]+"L"+b[2]+","+p[3],k+="M"+b[1]+","+p[0]+"L"+b[2]+","+p[2])),k===""&&(k="M0,0Z"),B_.ensureSingle(H8.select(this),"path").attr("d",k).call(Vwe.setClipUrl,t.layerClipId,e)}})})}function Gwe(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),i[2]=o.c2p(e.nextS0,!0),a[2]=s.c2p(e.nextP0,!0),i[3]=o.c2p(e.nextS1,!0),a[3]=s.c2p(e.nextP1,!0),n?[i,a]:[a,i]}});var Zwe=ye((Dfr,Xwe)=>{"use strict";var X4=qa(),Wwe=So(),lH=ka(),a3t=X1().DESELECTDIM,o3t=V0(),s3t=bv().resizeText,l3t=o3t.styleTextPoints;function u3t(e,t,r){var n=r||X4.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");s3t(e,n,"funnel"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=X4.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o.marker;X4.select(this).call(lH.fill,s.mc||l.color).call(lH.stroke,s.mlc||l.line.color).call(Wwe.dashLine,l.line.dash,s.mlw||l.line.width).style("opacity",o.selectedpoints&&!s.selected?a3t:1)}}),l3t(a,o,e),a.selectAll(".regions").each(function(){X4.select(this).selectAll("path").style("stroke-width",0).call(lH.fill,o.connector.fillcolor)}),a.selectAll(".lines").each(function(){var s=o.connector.line;Wwe.lineGroupStyle(X4.select(this).selectAll("path"),s.width,s.color,s.dash)})})}Xwe.exports={style:u3t}});var Jwe=ye((Ffr,Kwe)=>{"use strict";var Ywe=ka().opacity,c3t=RT().hoverOnBars,uH=Pr().formatPercent;Kwe.exports=function(t,r,n,i,a){var o=c3t(t,r,n,i,a);if(o){var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=o.index,f=s[c],h=u?"x":"y";o[h+"LabelVal"]=f.s,o.percentInitial=f.begR,o.percentInitialLabel=uH(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=uH(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=uH(f.sumR,1);var d=f.hi||l.hoverinfo,v=[];if(d&&d!=="none"&&d!=="skip"){var m=d==="all",b=d.split("+"),p=function(k){return m||b.indexOf(k)!==-1};p("percent initial")&&v.push(o.percentInitialLabel+" of initial"),p("percent previous")&&v.push(o.percentPreviousLabel+" of previous"),p("percent total")&&v.push(o.percentTotalLabel+" of total")}return o.extraText=v.join("
"),o.color=f3t(l,f),[o]}};function f3t(e,t){var r=e.marker,n=t.mc||r.color,i=t.mlc||r.line.color,a=t.mlw||r.line.width;if(Ywe(n))return n;if(Ywe(i)&&a)return i}});var Qwe=ye((zfr,$we)=>{"use strict";$we.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"percentInitial"in r&&(t.percentInitial=r.percentInitial),"percentPrevious"in r&&(t.percentPrevious=r.percentPrevious),"percentTotal"in r&&(t.percentTotal=r.percentTotal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var t3e=ye((qfr,e3e)=>{"use strict";e3e.exports={attributes:iH(),layoutAttributes:nH(),supplyDefaults:oH().supplyDefaults,crossTraceDefaults:oH().crossTraceDefaults,supplyLayoutDefaults:Iwe(),calc:Owe(),crossTraceCalc:Uwe(),plot:jwe(),style:Zwe().style,hoverPoints:Jwe(),eventData:Qwe(),selectPoints:DT(),moduleType:"trace",name:"funnel",basePlotModule:mh(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var i3e=ye((Ofr,r3e)=>{"use strict";r3e.exports=t3e()});var a3e=ye((Bfr,n3e)=>{"use strict";n3e.exports={eventDataKeys:["initial","delta","final"]}});var hH=ye((Nfr,u3e)=>{"use strict";var _c=qm(),cH=pf().line,h3t=Gl(),o3e=vf().axisHoverFormat,{hovertemplateAttrs:d3t,texttemplateAttrs:v3t,templatefallbackAttrs:s3e}=Ll(),l3e=a3e(),$T=Ao().extendFlat,p3t=ka();function fH(e){return{marker:{color:$T({},_c.marker.color,{arrayOk:!1,editType:"style"}),line:{color:$T({},_c.marker.line.color,{arrayOk:!1,editType:"style"}),width:$T({},_c.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}u3e.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:_c.x,x0:_c.x0,dx:_c.dx,y:_c.y,y0:_c.y0,dy:_c.dy,xperiod:_c.xperiod,yperiod:_c.yperiod,xperiod0:_c.xperiod0,yperiod0:_c.yperiod0,xperiodalignment:_c.xperiodalignment,yperiodalignment:_c.yperiodalignment,xhoverformat:o3e("x"),yhoverformat:o3e("y"),hovertext:_c.hovertext,hovertemplate:d3t({},{keys:l3e.eventDataKeys}),hovertemplatefallback:s3e(),hoverinfo:$T({},h3t.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:v3t({editType:"plot"},{keys:l3e.eventDataKeys.concat(["label"])}),texttemplatefallback:s3e({editType:"plot"}),text:_c.text,textposition:_c.textposition,insidetextanchor:_c.insidetextanchor,textangle:_c.textangle,textfont:_c.textfont,insidetextfont:_c.insidetextfont,outsidetextfont:_c.outsidetextfont,constraintext:_c.constraintext,cliponaxis:_c.cliponaxis,orientation:_c.orientation,offset:_c.offset,width:_c.width,increasing:fH("increasing"),decreasing:fH("decreasing"),totals:fH("intermediate sums and total"),connector:{line:{color:$T({},cH.color,{dflt:p3t.defaultLine}),width:$T({},cH.width,{editType:"plot"}),dash:cH.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:_c.offsetgroup,alignmentgroup:_c.alignmentgroup,zorder:_c.zorder}});var dH=ye((Ufr,c3e)=>{"use strict";c3e.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"}}});var QT=ye((Vfr,f3e)=>{"use strict";f3e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var pH=ye((Gfr,p3e)=>{"use strict";var h3e=Pr(),g3t=r2(),m3t=i0().handleText,y3t=lT(),_3t=Dg(),d3e=hH(),x3t=ka(),v3e=QT(),b3t=v3e.INCREASING.COLOR,w3t=v3e.DECREASING.COLOR,T3t="#4499FF";function vH(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",x3t.defaultLine),e(t+".marker.line.width")}function A3t(e,t,r,n){function i(u,c){return h3e.coerce(e,t,d3e,u,c)}var a=y3t(e,t,n,i);if(!a){t.visible=!1;return}_3t(e,t,n,i),i("xhoverformat"),i("yhoverformat"),i("measure"),i("orientation",t.x&&!t.y?"h":"v"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var o=i("textposition");m3t(e,t,n,i,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(i("texttemplate"),i("texttemplatefallback"),t.texttemplate||i("textinfo")),vH(i,"increasing",b3t),vH(i,"decreasing",w3t),vH(i,"totals",T3t);var s=i("connector.visible");if(s){i("connector.mode");var l=i("connector.line.width");l&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function S3t(e,t){var r,n;function i(o){return h3e.coerce(n._input,n,d3e,o)}if(t.waterfallmode==="group")for(var a=0;a{"use strict";var M3t=Pr(),E3t=dH();g3e.exports=function(e,t,r){var n=!1;function i(s,l){return M3t.coerce(e,t,E3t,s,l)}for(var a=0;a{"use strict";var y3e=ho(),_3e=zg(),x3e=Pr().mergeArray,k3t=q0(),b3e=fs().BADNUM;function gH(e){return e==="a"||e==="absolute"}function mH(e){return e==="t"||e==="total"}w3e.exports=function(t,r){var n=y3e.getFromId(t,r.xaxis||"x"),i=y3e.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c;r.orientation==="h"?(a=n.makeCalcdata(r,"x"),s=i.makeCalcdata(r,"y"),l=_3e(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=_3e(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var f=Math.min(o.length,a.length),h=new Array(f),d=0,v,m=!1,b=0;b{"use strict";var A3e=i2().setGroupPositions;S3e.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h{"use strict";var E3e=qa(),j8=Pr(),C3t=So(),eA=fs().BADNUM,L3t=p2(),P3t=bv().clearMinTextSize;k3e.exports=function(t,r,n,i){var a=t._fullLayout;P3t("waterfall",a),L3t.plot(t,r,n,i,{mode:a.waterfallmode,norm:a.waterfallmode,gap:a.waterfallgap,groupgap:a.waterfallgroupgap}),I3t(t,r,n,i)};function I3t(e,t,r,n){var i=t.xaxis,a=t.yaxis;j8.makeTraceGroups(n,r,"trace bars").each(function(o){var s=E3e.select(this),l=o[0].trace,u=j8.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=l.connector.mode,h=u.selectAll("g.line").data(j8.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var d=h.size();h.each(function(v,m){if(!(m!==d-1&&!v.cNext)){var b=R3t(v,i,a,c),p=b[0],k=b[1],M="";p[0]!==eA&&k[0]!==eA&&p[1]!==eA&&k[1]!==eA&&(f==="spanning"&&!v.isSum&&m>0&&(c?M+="M"+p[0]+","+k[1]+"V"+k[0]:M+="M"+p[1]+","+k[0]+"H"+p[0]),f!=="between"&&(v.isSum||m{"use strict";var W8=qa(),L3e=So(),P3e=ka(),D3t=X1().DESELECTDIM,F3t=V0(),z3t=bv().resizeText,q3t=F3t.styleTextPoints;function O3t(e,t,r){var n=r||W8.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");z3t(e,n,"waterfall"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=W8.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;W8.select(this).call(P3e.fill,l.color).call(P3e.stroke,l.line.color).call(L3e.dashLine,l.line.dash,l.line.width).style("opacity",o.selectedpoints&&!s.selected?D3t:1)}}),q3t(a,o,e),a.selectAll(".lines").each(function(){var s=o.connector.line;L3e.lineGroupStyle(W8.select(this).selectAll("path"),s.width,s.color,s.dash)})})}I3e.exports={style:O3t}});var O3e=ye((Yfr,q3e)=>{"use strict";var B3t=ho().hoverLabelText,D3e=ka().opacity,N3t=RT().hoverOnBars,F3e=QT(),z3e={increasing:F3e.INCREASING.SYMBOL,decreasing:F3e.DECREASING.SYMBOL};q3e.exports=function(t,r,n,i,a){var o=N3t(t,r,n,i,a);if(!o)return;var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=u?"x":"y",f=u?t.xa:t.ya;function h(x){return B3t(f,x,l[c+"hoverformat"])}var d=o.index,v=s[d],m=v.isSum?v.b+v.s:v.rawS;o.initial=v.b+v.s-m,o.delta=m,o.final=o.initial+o.delta;var b=h(Math.abs(o.delta));o.deltaLabel=m<0?"("+b+")":b,o.finalLabel=h(o.final),o.initialLabel=h(o.initial);var p=v.hi||l.hoverinfo,k=[];if(p&&p!=="none"&&p!=="skip"){var M=p==="all",T=p.split("+"),L=function(x){return M||T.indexOf(x)!==-1};v.isSum||(L("final")&&(u?!L("x"):!L("y"))&&k.push(o.finalLabel),L("delta")&&(m<0?k.push(o.deltaLabel+" "+z3e.decreasing):k.push(o.deltaLabel+" "+z3e.increasing)),L("initial")&&k.push("Initial: "+o.initialLabel))}return k.length&&(o.extraText=k.join("
")),o.color=U3t(l,v),[o]};function U3t(e,t){var r=e[t.dir].marker,n=r.color,i=r.line.color,a=r.line.width;if(D3e(n))return n;if(D3e(i)&&a)return i}});var N3e=ye((Kfr,B3e)=>{"use strict";B3e.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"initial"in r&&(t.initial=r.initial),"delta"in r&&(t.delta=r.delta),"final"in r&&(t.final=r.final),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var V3e=ye((Jfr,U3e)=>{"use strict";U3e.exports={attributes:hH(),layoutAttributes:dH(),supplyDefaults:pH().supplyDefaults,crossTraceDefaults:pH().crossTraceDefaults,supplyLayoutDefaults:m3e(),calc:T3e(),crossTraceCalc:M3e(),plot:C3e(),style:R3e().style,hoverPoints:O3e(),eventData:N3e(),selectPoints:DT(),moduleType:"trace",name:"waterfall",basePlotModule:mh(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var H3e=ye(($fr,G3e)=>{"use strict";G3e.exports=V3e()});var tA=ye((Qfr,j3e)=>{"use strict";j3e.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%",""]}}}});var yH=ye((ehr,X3e)=>{"use strict";var V3t=Gl(),G3t=pf().zorder,{hovertemplateAttrs:H3t,templatefallbackAttrs:j3t}=Ll(),W3e=Ao().extendFlat,W3t=tA().colormodel,Y4=["rgb","rgba","rgba256","hsl","hsla"],X3t=[],Z3t=[];for(rA=0;rA{"use strict";var Y3t=Pr(),K3t=yH(),Z3e=tA(),J3t=qy().IMAGE_URL_PREFIX;Y3e.exports=function(t,r){function n(o,s){return Y3t.coerce(t,r,K3t,o,s)}n("source"),r.source&&!r.source.match(J3t)&&delete r.source,r._hasSource=!!r.source;var i=n("z");if(r._hasZ=!(i===void 0||!i.length||!i[0]||!i[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}n("x0"),n("y0"),n("dx"),n("dy");var a;r._hasZ?(n("colormodel","rgb"),a=Z3e.colormodel[r.colormodel],n("zmin",a.zminDflt||a.min),n("zmax",a.zmaxDflt||a.max)):r._hasSource&&(r.colormodel="rgba256",a=Z3e.colormodel[r.colormodel],r.zmin=a.zminDflt,r.zmax=a.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),r._length=null,n("zorder")}});var Zy=ye((rhr,_H)=>{typeof Object.create=="function"?_H.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:_H.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var xH=ye((ihr,J3e)=>{J3e.exports=Sb().EventEmitter});var eTe=ye(X8=>{"use strict";X8.byteLength=Q3t;X8.toByteArray=tTt;X8.fromByteArray=nTt;var Hm=[],Y0=[],$3t=typeof Uint8Array!="undefined"?Uint8Array:Array,bH="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(_2=0,$3e=bH.length;_2<$3e;++_2)Hm[_2]=bH[_2],Y0[bH.charCodeAt(_2)]=_2;var _2,$3e;Y0[45]=62;Y0[95]=63;function Q3e(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function Q3t(e){var t=Q3e(e),r=t[0],n=t[1];return(r+n)*3/4-n}function eTt(e,t,r){return(t+r)*3/4-r}function tTt(e){var t,r=Q3e(e),n=r[0],i=r[1],a=new $3t(eTt(e,n,i)),o=0,s=i>0?n-4:n,l;for(l=0;l>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=Y0[e.charCodeAt(l)]<<2|Y0[e.charCodeAt(l+1)]>>4,a[o++]=t&255),i===1&&(t=Y0[e.charCodeAt(l)]<<10|Y0[e.charCodeAt(l+1)]<<4|Y0[e.charCodeAt(l+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function rTt(e){return Hm[e>>18&63]+Hm[e>>12&63]+Hm[e>>6&63]+Hm[e&63]}function iTt(e,t,r){for(var n,i=[],a=t;as?s:o+a));return n===1?(t=e[r-1],i.push(Hm[t>>2]+Hm[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(Hm[t>>10]+Hm[t>>4&63]+Hm[t<<2&63]+"=")),i.join("")}});var tTe=ye(wH=>{wH.read=function(e,t,r,n,i){var a,o,s=i*8-n-1,l=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=a*256+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=o*256+e[t+f],f+=h,c-=8);if(a===0)a=1-u;else{if(a===l)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-u}return(d?-1:1)*o*Math.pow(2,a-n)};wH.write=function(e,t,r,n,i,a){var o,s,l,u=a*8-i-1,c=(1<>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,v=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=s&255,d+=v,s/=256,i-=8);for(o=o<0;e[r+d]=o&255,d+=v,o/=256,u-=8);e[r+d-v]|=m*128}});var b2=ye(oA=>{"use strict";var TH=eTe(),nA=tTe(),rTe=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;oA.Buffer=ra;oA.SlowBuffer=cTt;oA.INSPECT_MAX_BYTES=50;var Z8=2147483647;oA.kMaxLength=Z8;ra.TYPED_ARRAY_SUPPORT=aTt();!ra.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&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 aTt(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(ra.prototype,"parent",{enumerable:!0,get:function(){if(ra.isBuffer(this))return this.buffer}});Object.defineProperty(ra.prototype,"offset",{enumerable:!0,get:function(){if(ra.isBuffer(this))return this.byteOffset}});function Yy(e){if(e>Z8)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,ra.prototype),t}function ra(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return EH(e)}return oTe(e,t,r)}ra.poolSize=8192;function oTe(e,t,r){if(typeof e=="string")return sTt(e,t);if(ArrayBuffer.isView(e))return lTt(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(jm(e,ArrayBuffer)||e&&jm(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(jm(e,SharedArrayBuffer)||e&&jm(e.buffer,SharedArrayBuffer)))return SH(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return ra.from(n,t,r);let i=uTt(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return ra.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}ra.from=function(e,t,r){return oTe(e,t,r)};Object.setPrototypeOf(ra.prototype,Uint8Array.prototype);Object.setPrototypeOf(ra,Uint8Array);function sTe(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function oTt(e,t,r){return sTe(e),e<=0?Yy(e):t!==void 0?typeof r=="string"?Yy(e).fill(t,r):Yy(e).fill(t):Yy(e)}ra.alloc=function(e,t,r){return oTt(e,t,r)};function EH(e){return sTe(e),Yy(e<0?0:kH(e)|0)}ra.allocUnsafe=function(e){return EH(e)};ra.allocUnsafeSlow=function(e){return EH(e)};function sTt(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!ra.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=lTe(e,t)|0,n=Yy(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function AH(e){let t=e.length<0?0:kH(e.length)|0,r=Yy(t);for(let n=0;n=Z8)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Z8.toString(16)+" bytes");return e|0}function cTt(e){return+e!=e&&(e=0),ra.alloc(+e)}ra.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==ra.prototype};ra.compare=function(t,r){if(jm(t,Uint8Array)&&(t=ra.from(t,t.offset,t.byteLength)),jm(r,Uint8Array)&&(r=ra.from(r,r.offset,r.byteLength)),!ra.isBuffer(t)||!ra.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,i=r.length;for(let a=0,o=Math.min(n,i);ai.length?(ra.isBuffer(o)||(o=ra.from(o)),o.copy(i,a)):Uint8Array.prototype.set.call(i,o,a);else if(ra.isBuffer(o))o.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=o.length}return i};function lTe(e,t){if(ra.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||jm(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return MH(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return mTe(e).length;default:if(i)return n?-1:MH(e).length;t=(""+t).toLowerCase(),i=!0}}ra.byteLength=lTe;function fTt(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return bTt(this,t,r);case"utf8":case"utf-8":return cTe(this,t,r);case"ascii":return _Tt(this,t,r);case"latin1":case"binary":return xTt(this,t,r);case"base64":return mTt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wTt(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}ra.prototype._isBuffer=!0;function x2(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}ra.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;rr&&(t+=" ... "),""};rTe&&(ra.prototype[rTe]=ra.prototype.inspect);ra.prototype.compare=function(t,r,n,i,a){if(jm(t,Uint8Array)&&(t=ra.from(t,t.offset,t.byteLength)),!ra.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;let o=a-i,s=n-r,l=Math.min(o,s),u=this.slice(i,a),c=t.slice(r,n);for(let f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,LH(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=ra.from(t,n)),ra.isBuffer(t))return t.length===0?-1:iTe(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):iTe(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function iTe(e,t,r,n,i){let a=1,o=e.length,s=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,r/=2}function l(c,f){return a===1?c[f]:c.readUInt16BE(f*a)}let u;if(i){let c=-1;for(u=r;uo&&(r=o-s),u=r;u>=0;u--){let c=!0;for(let f=0;fi&&(n=i)):n=i;let a=t.length;n>a/2&&(n=a/2);let o;for(o=0;o>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((n===void 0||n>a)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let o=!1;for(;;)switch(i){case"hex":return hTt(this,t,r,n);case"utf8":case"utf-8":return dTt(this,t,r,n);case"ascii":case"latin1":case"binary":return vTt(this,t,r,n);case"base64":return pTt(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gTt(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};ra.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function mTt(e,t,r){return t===0&&r===e.length?TH.fromByteArray(e):TH.fromByteArray(e.slice(t,r))}function cTe(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:a>223?3:a>191?2:1;if(i+s<=r){let l,u,c,f;switch(s){case 1:a<128&&(o=a);break;case 2:l=e[i+1],(l&192)===128&&(f=(a&31)<<6|l&63,f>127&&(o=f));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(f=(a&15)<<12|(l&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(f=(a&15)<<18|(l&63)<<12|(u&63)<<6|c&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=s}return yTt(n)}var nTe=4096;function yTt(e){let t=e.length;if(t<=nTe)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let a=t;an&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}ra.prototype.readUintLE=ra.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||tv(t,r,this.length);let i=this[t],a=1,o=0;for(;++o>>0,r=r>>>0,n||tv(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};ra.prototype.readUint8=ra.prototype.readUInt8=function(t,r){return t=t>>>0,r||tv(t,1,this.length),this[t]};ra.prototype.readUint16LE=ra.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||tv(t,2,this.length),this[t]|this[t+1]<<8};ra.prototype.readUint16BE=ra.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||tv(t,2,this.length),this[t]<<8|this[t+1]};ra.prototype.readUint32LE=ra.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||tv(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};ra.prototype.readUint32BE=ra.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||tv(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};ra.prototype.readBigUInt64LE=N_(function(t){t=t>>>0,aA(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&K4(t,this.length-8);let i=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,a=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(a)<>>0,aA(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&K4(t,this.length-8);let i=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],a=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<>>0,r=r>>>0,n||tv(t,r,this.length);let i=this[t],a=1,o=0;for(;++o=a&&(i-=Math.pow(2,8*r)),i};ra.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||tv(t,r,this.length);let i=r,a=1,o=this[t+--i];for(;i>0&&(a*=256);)o+=this[t+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*r)),o};ra.prototype.readInt8=function(t,r){return t=t>>>0,r||tv(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};ra.prototype.readInt16LE=function(t,r){t=t>>>0,r||tv(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};ra.prototype.readInt16BE=function(t,r){t=t>>>0,r||tv(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};ra.prototype.readInt32LE=function(t,r){return t=t>>>0,r||tv(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};ra.prototype.readInt32BE=function(t,r){return t=t>>>0,r||tv(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};ra.prototype.readBigInt64LE=N_(function(t){t=t>>>0,aA(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&K4(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<>>0,aA(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&K4(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<>>0,r||tv(t,4,this.length),nA.read(this,t,!0,23,4)};ra.prototype.readFloatBE=function(t,r){return t=t>>>0,r||tv(t,4,this.length),nA.read(this,t,!1,23,4)};ra.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||tv(t,8,this.length),nA.read(this,t,!0,52,8)};ra.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||tv(t,8,this.length),nA.read(this,t,!1,52,8)};function Rp(e,t,r,n,i,a){if(!ra.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}ra.prototype.writeUintLE=ra.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Rp(this,t,r,n,s,0)}let a=1,o=0;for(this[r]=t&255;++o>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Rp(this,t,r,n,s,0)}let a=n-1,o=1;for(this[r+a]=t&255;--a>=0&&(o*=256);)this[r+a]=t/o&255;return r+n};ra.prototype.writeUint8=ra.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,1,255,0),this[r]=t&255,r+1};ra.prototype.writeUint16LE=ra.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};ra.prototype.writeUint16BE=ra.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};ra.prototype.writeUint32LE=ra.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};ra.prototype.writeUint32BE=ra.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function fTe(e,t,r,n,i){gTe(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,r}function hTe(e,t,r,n,i){gTe(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a=a>>8,e[r+6]=a,a=a>>8,e[r+5]=a,a=a>>8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o=o>>8,e[r+2]=o,o=o>>8,e[r+1]=o,o=o>>8,e[r]=o,r+8}ra.prototype.writeBigUInt64LE=N_(function(t,r=0){return fTe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});ra.prototype.writeBigUInt64BE=N_(function(t,r=0){return hTe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});ra.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Rp(this,t,r,n,l-1,-l)}let a=0,o=1,s=0;for(this[r]=t&255;++a>0)-s&255;return r+n};ra.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Rp(this,t,r,n,l-1,-l)}let a=n-1,o=1,s=0;for(this[r+a]=t&255;--a>=0&&(o*=256);)t<0&&s===0&&this[r+a+1]!==0&&(s=1),this[r+a]=(t/o>>0)-s&255;return r+n};ra.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};ra.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};ra.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};ra.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};ra.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};ra.prototype.writeBigInt64LE=N_(function(t,r=0){return fTe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});ra.prototype.writeBigInt64BE=N_(function(t,r=0){return hTe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function dTe(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function vTe(e,t,r,n,i){return t=+t,r=r>>>0,i||dTe(e,t,r,4,34028234663852886e22,-34028234663852886e22),nA.write(e,t,r,n,23,4),r+4}ra.prototype.writeFloatLE=function(t,r,n){return vTe(this,t,r,!0,n)};ra.prototype.writeFloatBE=function(t,r,n){return vTe(this,t,r,!1,n)};function pTe(e,t,r,n,i){return t=+t,r=r>>>0,i||dTe(e,t,r,8,17976931348623157e292,-17976931348623157e292),nA.write(e,t,r,n,52,8),r+8}ra.prototype.writeDoubleLE=function(t,r,n){return pTe(this,t,r,!0,n)};ra.prototype.writeDoubleBE=function(t,r,n){return pTe(this,t,r,!1,n)};ra.prototype.copy=function(t,r,n,i){if(!ra.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let a;if(typeof t=="number")for(a=r;a2**32?i=aTe(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=aTe(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function aTe(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function TTt(e,t,r){aA(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&K4(t,e.length-(r+1))}function gTe(e,t,r,n,i,a){if(e>r||e3?t===0||t===BigInt(0)?s=`>= 0${o} and < 2${o} ** ${(a+1)*8}${o}`:s=`>= -(2${o} ** ${(a+1)*8-1}${o}) and < 2 ** ${(a+1)*8-1}${o}`:s=`>= ${t}${o} and <= ${r}${o}`,new iA.ERR_OUT_OF_RANGE("value",s,e)}TTt(n,i,a)}function aA(e,t){if(typeof e!="number")throw new iA.ERR_INVALID_ARG_TYPE(t,"number",e)}function K4(e,t,r){throw Math.floor(e)!==e?(aA(e,r),new iA.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new iA.ERR_BUFFER_OUT_OF_BOUNDS:new iA.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var ATt=/[^+/0-9A-Za-z-_]/g;function STt(e){if(e=e.split("=")[0],e=e.trim().replace(ATt,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function MH(e,t){t=t||1/0;let r,n=e.length,i=null,a=[];for(let o=0;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function MTt(e){let t=[];for(let r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function mTe(e){return TH.toByteArray(STt(e))}function Y8(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function jm(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function LH(e){return e!==e}var kTt=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function N_(e){return typeof BigInt=="undefined"?CTt:e}function CTt(){throw new Error("BigInt not supported")}});var K8=ye((lhr,yTe)=>{"use strict";yTe.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var J4=ye((uhr,_Te)=>{"use strict";var LTt=K8();_Te.exports=function(){return LTt()&&!!Symbol.toStringTag}});var PH=ye((chr,xTe)=>{"use strict";xTe.exports=Object});var wTe=ye((fhr,bTe)=>{"use strict";bTe.exports=Error});var ATe=ye((hhr,TTe)=>{"use strict";TTe.exports=EvalError});var MTe=ye((dhr,STe)=>{"use strict";STe.exports=RangeError});var kTe=ye((vhr,ETe)=>{"use strict";ETe.exports=ReferenceError});var IH=ye((phr,CTe)=>{"use strict";CTe.exports=SyntaxError});var sA=ye((ghr,LTe)=>{"use strict";LTe.exports=TypeError});var ITe=ye((mhr,PTe)=>{"use strict";PTe.exports=URIError});var DTe=ye((yhr,RTe)=>{"use strict";RTe.exports=Math.abs});var zTe=ye((_hr,FTe)=>{"use strict";FTe.exports=Math.floor});var OTe=ye((xhr,qTe)=>{"use strict";qTe.exports=Math.max});var NTe=ye((bhr,BTe)=>{"use strict";BTe.exports=Math.min});var VTe=ye((whr,UTe)=>{"use strict";UTe.exports=Math.pow});var HTe=ye((Thr,GTe)=>{"use strict";GTe.exports=Math.round});var WTe=ye((Ahr,jTe)=>{"use strict";jTe.exports=Number.isNaN||function(t){return t!==t}});var ZTe=ye((Shr,XTe)=>{"use strict";var PTt=WTe();XTe.exports=function(t){return PTt(t)||t===0?t:t<0?-1:1}});var KTe=ye((Mhr,YTe)=>{"use strict";YTe.exports=Object.getOwnPropertyDescriptor});var w2=ye((Ehr,JTe)=>{"use strict";var J8=KTe();if(J8)try{J8([],"length")}catch(e){J8=null}JTe.exports=J8});var $4=ye((khr,$Te)=>{"use strict";var $8=Object.defineProperty||!1;if($8)try{$8({},"a",{value:1})}catch(e){$8=!1}$Te.exports=$8});var tAe=ye((Chr,eAe)=>{"use strict";var QTe=typeof Symbol!="undefined"&&Symbol,ITt=K8();eAe.exports=function(){return typeof QTe!="function"||typeof Symbol!="function"||typeof QTe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ITt()}});var RH=ye((Lhr,rAe)=>{"use strict";rAe.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var DH=ye((Phr,iAe)=>{"use strict";var RTt=PH();iAe.exports=RTt.getPrototypeOf||null});var oAe=ye((Ihr,aAe)=>{"use strict";var DTt="Function.prototype.bind called on incompatible ",FTt=Object.prototype.toString,zTt=Math.max,qTt="[object Function]",nAe=function(t,r){for(var n=[],i=0;i{"use strict";var NTt=oAe();sAe.exports=Function.prototype.bind||NTt});var Q8=ye((Dhr,lAe)=>{"use strict";lAe.exports=Function.prototype.call});var FH=ye((Fhr,uAe)=>{"use strict";uAe.exports=Function.prototype.apply});var fAe=ye((zhr,cAe)=>{"use strict";cAe.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var dAe=ye((qhr,hAe)=>{"use strict";var UTt=lA(),VTt=FH(),GTt=Q8(),HTt=fAe();hAe.exports=HTt||UTt.call(GTt,VTt)});var pAe=ye((Ohr,vAe)=>{"use strict";var jTt=lA(),WTt=sA(),XTt=Q8(),ZTt=dAe();vAe.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new WTt("a function is required");return ZTt(jTt,XTt,t)}});var bAe=ye((Bhr,xAe)=>{"use strict";var YTt=pAe(),gAe=w2(),yAe;try{yAe=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var zH=!!yAe&&gAe&&gAe(Object.prototype,"__proto__"),_Ae=Object,mAe=_Ae.getPrototypeOf;xAe.exports=zH&&typeof zH.get=="function"?YTt([zH.get]):typeof mAe=="function"?function(t){return mAe(t==null?t:_Ae(t))}:!1});var MAe=ye((Nhr,SAe)=>{"use strict";var wAe=RH(),TAe=DH(),AAe=bAe();SAe.exports=wAe?function(t){return wAe(t)}:TAe?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return TAe(t)}:AAe?function(t){return AAe(t)}:null});var kAe=ye((Uhr,EAe)=>{"use strict";var KTt=Function.prototype.call,JTt=Object.prototype.hasOwnProperty,$Tt=lA();EAe.exports=$Tt.call(KTt,JTt)});var rR=ye((Vhr,DAe)=>{"use strict";var lu,QTt=PH(),eAt=wTe(),tAt=ATe(),rAt=MTe(),iAt=kTe(),hA=IH(),fA=sA(),nAt=ITe(),aAt=DTe(),oAt=zTe(),sAt=OTe(),lAt=NTe(),uAt=VTe(),cAt=HTe(),fAt=ZTe(),IAe=Function,qH=function(e){try{return IAe('"use strict"; return ('+e+").constructor;")()}catch(t){}},Q4=w2(),hAt=$4(),OH=function(){throw new fA},dAt=Q4?function(){try{return arguments.callee,OH}catch(e){try{return Q4(arguments,"callee").get}catch(t){return OH}}}():OH,uA=tAe()(),rv=MAe(),vAt=DH(),pAt=RH(),RAe=FH(),eE=Q8(),cA={},gAt=typeof Uint8Array=="undefined"||!rv?lu:rv(Uint8Array),T2={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?lu:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?lu:ArrayBuffer,"%ArrayIteratorPrototype%":uA&&rv?rv([][Symbol.iterator]()):lu,"%AsyncFromSyncIteratorPrototype%":lu,"%AsyncFunction%":cA,"%AsyncGenerator%":cA,"%AsyncGeneratorFunction%":cA,"%AsyncIteratorPrototype%":cA,"%Atomics%":typeof Atomics=="undefined"?lu:Atomics,"%BigInt%":typeof BigInt=="undefined"?lu:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?lu:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?lu:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?lu:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":eAt,"%eval%":eval,"%EvalError%":tAt,"%Float16Array%":typeof Float16Array=="undefined"?lu:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?lu:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?lu:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?lu:FinalizationRegistry,"%Function%":IAe,"%GeneratorFunction%":cA,"%Int8Array%":typeof Int8Array=="undefined"?lu:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?lu:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?lu:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":uA&&rv?rv(rv([][Symbol.iterator]())):lu,"%JSON%":typeof JSON=="object"?JSON:lu,"%Map%":typeof Map=="undefined"?lu:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!uA||!rv?lu:rv(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":QTt,"%Object.getOwnPropertyDescriptor%":Q4,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?lu:Promise,"%Proxy%":typeof Proxy=="undefined"?lu:Proxy,"%RangeError%":rAt,"%ReferenceError%":iAt,"%Reflect%":typeof Reflect=="undefined"?lu:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?lu:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!uA||!rv?lu:rv(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?lu:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":uA&&rv?rv(""[Symbol.iterator]()):lu,"%Symbol%":uA?Symbol:lu,"%SyntaxError%":hA,"%ThrowTypeError%":dAt,"%TypedArray%":gAt,"%TypeError%":fA,"%Uint8Array%":typeof Uint8Array=="undefined"?lu:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?lu:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?lu:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?lu:Uint32Array,"%URIError%":nAt,"%WeakMap%":typeof WeakMap=="undefined"?lu:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?lu:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?lu:WeakSet,"%Function.prototype.call%":eE,"%Function.prototype.apply%":RAe,"%Object.defineProperty%":hAt,"%Object.getPrototypeOf%":vAt,"%Math.abs%":aAt,"%Math.floor%":oAt,"%Math.max%":sAt,"%Math.min%":lAt,"%Math.pow%":uAt,"%Math.round%":cAt,"%Math.sign%":fAt,"%Reflect.getPrototypeOf%":pAt};if(rv)try{null.error}catch(e){CAe=rv(rv(e)),T2["%Error.prototype%"]=CAe}var CAe,mAt=function e(t){var r;if(t==="%AsyncFunction%")r=qH("async function () {}");else if(t==="%GeneratorFunction%")r=qH("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=qH("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&rv&&(r=rv(i.prototype))}return T2[t]=r,r},LAe={__proto__:null,"%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"]},tE=lA(),eR=kAe(),yAt=tE.call(eE,Array.prototype.concat),_At=tE.call(RAe,Array.prototype.splice),PAe=tE.call(eE,String.prototype.replace),tR=tE.call(eE,String.prototype.slice),xAt=tE.call(eE,RegExp.prototype.exec),bAt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,wAt=/\\(\\)?/g,TAt=function(t){var r=tR(t,0,1),n=tR(t,-1);if(r==="%"&&n!=="%")throw new hA("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new hA("invalid intrinsic syntax, expected opening `%`");var i=[];return PAe(t,bAt,function(a,o,s,l){i[i.length]=s?PAe(l,wAt,"$1"):o||a}),i},AAt=function(t,r){var n=t,i;if(eR(LAe,n)&&(i=LAe[n],n="%"+i[0]+"%"),eR(T2,n)){var a=T2[n];if(a===cA&&(a=mAt(n)),typeof a=="undefined"&&!r)throw new fA("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new hA("intrinsic "+t+" does not exist!")};DAe.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new fA("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new fA('"allowMissing" argument must be a boolean');if(xAt(/^%?[^%]*%?$/,t)===null)throw new hA("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=TAt(t),i=n.length>0?n[0]:"",a=AAt("%"+i+"%",r),o=a.name,s=a.value,l=!1,u=a.alias;u&&(i=u[0],_At(n,yAt([0,1],u)));for(var c=1,f=!0;c=n.length){var m=Q4(s,h);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[h]}else f=eR(s,h),s=s[h];f&&!l&&(T2[o]=s)}}return s}});var OAe=ye((Ghr,qAe)=>{"use strict";var FAe=$4(),SAt=IH(),dA=sA(),zAe=w2();qAe.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new dA("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new dA("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new dA("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new dA("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new dA("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new dA("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!zAe&&zAe(t,r);if(FAe)FAe(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:a===null&&l?l.writable:!a});else if(s||!i&&!a&&!o)t[r]=n;else throw new SAt("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var NH=ye((Hhr,NAe)=>{"use strict";var BH=$4(),BAe=function(){return!!BH};BAe.hasArrayLengthDefineBug=function(){if(!BH)return null;try{return BH([],"length",{value:1}).length!==1}catch(t){return!0}};NAe.exports=BAe});var jAe=ye((jhr,HAe)=>{"use strict";var MAt=rR(),UAe=OAe(),EAt=NH()(),VAe=w2(),GAe=sA(),kAt=MAt("%Math.floor%");HAe.exports=function(t,r){if(typeof t!="function")throw new GAe("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||kAt(r)!==r)throw new GAe("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&VAe){var o=VAe(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(EAt?UAe(t,"length",r,!0,!0):UAe(t,"length",r)),t}});var rE=ye((Whr,iR)=>{"use strict";var UH=lA(),nR=rR(),CAt=jAe(),LAt=sA(),ZAe=nR("%Function.prototype.apply%"),YAe=nR("%Function.prototype.call%"),KAe=nR("%Reflect.apply%",!0)||UH.call(YAe,ZAe),WAe=$4(),PAt=nR("%Math.max%");iR.exports=function(t){if(typeof t!="function")throw new LAt("a function is required");var r=KAe(UH,YAe,arguments);return CAt(r,1+PAt(0,t.length-(arguments.length-1)),!0)};var XAe=function(){return KAe(UH,ZAe,arguments)};WAe?WAe(iR.exports,"apply",{value:XAe}):iR.exports.apply=XAe});var vA=ye((Xhr,QAe)=>{"use strict";var JAe=rR(),$Ae=rE(),IAt=$Ae(JAe("String.prototype.indexOf"));QAe.exports=function(t,r){var n=JAe(t,!!r);return typeof n=="function"&&IAt(t,".prototype.")>-1?$Ae(n):n}});var r5e=ye((Zhr,t5e)=>{"use strict";var RAt=J4()(),DAt=vA(),VH=DAt("Object.prototype.toString"),aR=function(t){return RAt&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:VH(t)==="[object Arguments]"},e5e=function(t){return aR(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&VH(t)!=="[object Array]"&&VH(t.callee)==="[object Function]"},FAt=function(){return aR(arguments)}();aR.isLegacyArguments=e5e;t5e.exports=FAt?aR:e5e});var a5e=ye((Yhr,n5e)=>{"use strict";var zAt=Object.prototype.toString,qAt=Function.prototype.toString,OAt=/^\s*(?:function)?\*/,i5e=J4()(),GH=Object.getPrototypeOf,BAt=function(){if(!i5e)return!1;try{return Function("return function*() {}")()}catch(e){}},HH;n5e.exports=function(t){if(typeof t!="function")return!1;if(OAt.test(qAt.call(t)))return!0;if(!i5e){var r=zAt.call(t);return r==="[object GeneratorFunction]"}if(!GH)return!1;if(typeof HH=="undefined"){var n=BAt();HH=n?GH(n):!1}return GH(t)===HH}});var u5e=ye((Khr,l5e)=>{"use strict";var s5e=Function.prototype.toString,pA=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,WH,oR;if(typeof pA=="function"&&typeof Object.defineProperty=="function")try{WH=Object.defineProperty({},"length",{get:function(){throw oR}}),oR={},pA(function(){throw 42},null,WH)}catch(e){e!==oR&&(pA=null)}else pA=null;var NAt=/^\s*class\b/,XH=function(t){try{var r=s5e.call(t);return NAt.test(r)}catch(n){return!1}},jH=function(t){try{return XH(t)?!1:(s5e.call(t),!0)}catch(r){return!1}},sR=Object.prototype.toString,UAt="[object Object]",VAt="[object Function]",GAt="[object GeneratorFunction]",HAt="[object HTMLAllCollection]",jAt="[object HTML document.all class]",WAt="[object HTMLCollection]",XAt=typeof Symbol=="function"&&!!Symbol.toStringTag,ZAt=!(0 in[,]),ZH=function(){return!1};typeof document=="object"&&(o5e=document.all,sR.call(o5e)===sR.call(document.all)&&(ZH=function(t){if((ZAt||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=sR.call(t);return(r===HAt||r===jAt||r===WAt||r===UAt)&&t("")==null}catch(n){}return!1}));var o5e;l5e.exports=pA?function(t){if(ZH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{pA(t,null,WH)}catch(r){if(r!==oR)return!1}return!XH(t)&&jH(t)}:function(t){if(ZH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(XAt)return jH(t);if(XH(t))return!1;var r=sR.call(t);return r!==VAt&&r!==GAt&&!/^\[object HTML/.test(r)?!1:jH(t)}});var YH=ye((Jhr,f5e)=>{"use strict";var YAt=u5e(),KAt=Object.prototype.toString,c5e=Object.prototype.hasOwnProperty,JAt=function(t,r,n){for(var i=0,a=t.length;i=3&&(i=n),KAt.call(t)==="[object Array]"?JAt(t,r,i):typeof t=="string"?$At(t,r,i):QAt(t,r,i)};f5e.exports=e5t});var JH=ye(($hr,h5e)=>{"use strict";var KH=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],t5t=typeof globalThis=="undefined"?window:globalThis;h5e.exports=function(){for(var t=[],r=0;r{"use strict";var uR=YH(),r5t=JH(),d5e=rE(),ej=vA(),lR=w2(),i5t=ej("Object.prototype.toString"),p5e=J4()(),v5e=typeof globalThis=="undefined"?window:globalThis,QH=r5t(),tj=ej("String.prototype.slice"),$H=Object.getPrototypeOf,n5t=ej("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1?r:r!=="Object"?!1:o5t(t)}return lR?a5t(t):null}});var T5e=ye((edr,w5e)=>{"use strict";var y5e=YH(),s5t=JH(),ij=vA(),l5t=ij("Object.prototype.toString"),_5e=J4()(),fR=w2(),u5t=typeof globalThis=="undefined"?window:globalThis,x5e=s5t(),c5t=ij("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1}return fR?h5t(t):!1}});var oj=ye(uu=>{"use strict";var d5t=r5e(),v5t=a5e(),Wg=m5e(),A5e=T5e();function gA(e){return e.call.bind(e)}var S5e=typeof BigInt!="undefined",M5e=typeof Symbol!="undefined",K0=gA(Object.prototype.toString),p5t=gA(Number.prototype.valueOf),g5t=gA(String.prototype.valueOf),m5t=gA(Boolean.prototype.valueOf);S5e&&(E5e=gA(BigInt.prototype.valueOf));var E5e;M5e&&(k5e=gA(Symbol.prototype.valueOf));var k5e;function nE(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}uu.isArgumentsObject=d5t;uu.isGeneratorFunction=v5t;uu.isTypedArray=A5e;function y5t(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}uu.isPromise=y5t;function _5t(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):A5e(e)||L5e(e)}uu.isArrayBufferView=_5t;function x5t(e){return Wg(e)==="Uint8Array"}uu.isUint8Array=x5t;function b5t(e){return Wg(e)==="Uint8ClampedArray"}uu.isUint8ClampedArray=b5t;function w5t(e){return Wg(e)==="Uint16Array"}uu.isUint16Array=w5t;function T5t(e){return Wg(e)==="Uint32Array"}uu.isUint32Array=T5t;function A5t(e){return Wg(e)==="Int8Array"}uu.isInt8Array=A5t;function S5t(e){return Wg(e)==="Int16Array"}uu.isInt16Array=S5t;function M5t(e){return Wg(e)==="Int32Array"}uu.isInt32Array=M5t;function E5t(e){return Wg(e)==="Float32Array"}uu.isFloat32Array=E5t;function k5t(e){return Wg(e)==="Float64Array"}uu.isFloat64Array=k5t;function C5t(e){return Wg(e)==="BigInt64Array"}uu.isBigInt64Array=C5t;function L5t(e){return Wg(e)==="BigUint64Array"}uu.isBigUint64Array=L5t;function hR(e){return K0(e)==="[object Map]"}hR.working=typeof Map!="undefined"&&hR(new Map);function P5t(e){return typeof Map=="undefined"?!1:hR.working?hR(e):e instanceof Map}uu.isMap=P5t;function dR(e){return K0(e)==="[object Set]"}dR.working=typeof Set!="undefined"&&dR(new Set);function I5t(e){return typeof Set=="undefined"?!1:dR.working?dR(e):e instanceof Set}uu.isSet=I5t;function vR(e){return K0(e)==="[object WeakMap]"}vR.working=typeof WeakMap!="undefined"&&vR(new WeakMap);function R5t(e){return typeof WeakMap=="undefined"?!1:vR.working?vR(e):e instanceof WeakMap}uu.isWeakMap=R5t;function aj(e){return K0(e)==="[object WeakSet]"}aj.working=typeof WeakSet!="undefined"&&aj(new WeakSet);function D5t(e){return aj(e)}uu.isWeakSet=D5t;function pR(e){return K0(e)==="[object ArrayBuffer]"}pR.working=typeof ArrayBuffer!="undefined"&&pR(new ArrayBuffer);function C5e(e){return typeof ArrayBuffer=="undefined"?!1:pR.working?pR(e):e instanceof ArrayBuffer}uu.isArrayBuffer=C5e;function gR(e){return K0(e)==="[object DataView]"}gR.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&gR(new DataView(new ArrayBuffer(1),0,1));function L5e(e){return typeof DataView=="undefined"?!1:gR.working?gR(e):e instanceof DataView}uu.isDataView=L5e;var nj=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function iE(e){return K0(e)==="[object SharedArrayBuffer]"}function P5e(e){return typeof nj=="undefined"?!1:(typeof iE.working=="undefined"&&(iE.working=iE(new nj)),iE.working?iE(e):e instanceof nj)}uu.isSharedArrayBuffer=P5e;function F5t(e){return K0(e)==="[object AsyncFunction]"}uu.isAsyncFunction=F5t;function z5t(e){return K0(e)==="[object Map Iterator]"}uu.isMapIterator=z5t;function q5t(e){return K0(e)==="[object Set Iterator]"}uu.isSetIterator=q5t;function O5t(e){return K0(e)==="[object Generator]"}uu.isGeneratorObject=O5t;function B5t(e){return K0(e)==="[object WebAssembly.Module]"}uu.isWebAssemblyCompiledModule=B5t;function I5e(e){return nE(e,p5t)}uu.isNumberObject=I5e;function R5e(e){return nE(e,g5t)}uu.isStringObject=R5e;function D5e(e){return nE(e,m5t)}uu.isBooleanObject=D5e;function F5e(e){return S5e&&nE(e,E5e)}uu.isBigIntObject=F5e;function z5e(e){return M5e&&nE(e,k5e)}uu.isSymbolObject=z5e;function N5t(e){return I5e(e)||R5e(e)||D5e(e)||F5e(e)||z5e(e)}uu.isBoxedPrimitive=N5t;function U5t(e){return typeof Uint8Array!="undefined"&&(C5e(e)||P5e(e))}uu.isAnyArrayBuffer=U5t;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(uu,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var sj=ye((rdr,q5e)=>{q5e.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var dj=ye(cu=>{var O5e=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},i=0;i=i)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),fj(t)?r.showHidden=t:t&&cu._extend(r,t),S2(r.showHidden)&&(r.showHidden=!1),S2(r.depth)&&(r.depth=2),S2(r.colors)&&(r.colors=!1),S2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=G5t),xR(r,e,r.depth)}cu.inspect=U_;U_.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]};U_.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function G5t(e,t){var r=U_.styles[t];return r?"\x1B["+U_.colors[r][0]+"m"+e+"\x1B["+U_.colors[r][1]+"m":e}function H5t(e,t){return e}function j5t(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function xR(e,t,r){if(e.customInspect&&t&&_R(t.inspect)&&t.inspect!==cu.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return TR(n)||(n=xR(e,n,r)),n}var i=W5t(e,t);if(i)return i;var a=Object.keys(t),o=j5t(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),oE(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return lj(t);if(a.length===0){if(_R(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(aE(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(bR(t))return e.stylize(Date.prototype.toString.call(t),"date");if(oE(t))return lj(t)}var l="",u=!1,c=["{","}"];if(N5e(t)&&(u=!0,c=["[","]"]),_R(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(aE(t)&&(l=" "+RegExp.prototype.toString.call(t)),bR(t)&&(l=" "+Date.prototype.toUTCString.call(t)),oE(t)&&(l=" "+lj(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return aE(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=X5t(e,t,r,o,a):h=a.map(function(d){return cj(e,t,r,o,d,u)}),e.seen.pop(),Z5t(h,l,c)}function W5t(e,t){if(S2(t))return e.stylize("undefined","undefined");if(TR(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(U5e(t))return e.stylize(""+t,"number");if(fj(t))return e.stylize(""+t,"boolean");if(wR(t))return e.stylize("null","null")}function lj(e){return"["+Error.prototype.toString.call(e)+"]"}function X5t(e,t,r,n,i){for(var a=[],o=0,s=t.length;o-1&&(a?s=s.split(` +`).map(function(u){return" "+u}).join(` +`).slice(2):s=` +`+s.split(` +`).map(function(u){return" "+u}).join(` +`))):s=e.stylize("[Circular]","special")),S2(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function Z5t(e,t,r){var n=0,i=e.reduce(function(a,o){return n++,o.indexOf(` +`)>=0&&n++,a+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(t===""?"":t+` + `)+" "+e.join(`, + `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}cu.types=oj();function N5e(e){return Array.isArray(e)}cu.isArray=N5e;function fj(e){return typeof e=="boolean"}cu.isBoolean=fj;function wR(e){return e===null}cu.isNull=wR;function Y5t(e){return e==null}cu.isNullOrUndefined=Y5t;function U5e(e){return typeof e=="number"}cu.isNumber=U5e;function TR(e){return typeof e=="string"}cu.isString=TR;function K5t(e){return typeof e=="symbol"}cu.isSymbol=K5t;function S2(e){return e===void 0}cu.isUndefined=S2;function aE(e){return mA(e)&&hj(e)==="[object RegExp]"}cu.isRegExp=aE;cu.types.isRegExp=aE;function mA(e){return typeof e=="object"&&e!==null}cu.isObject=mA;function bR(e){return mA(e)&&hj(e)==="[object Date]"}cu.isDate=bR;cu.types.isDate=bR;function oE(e){return mA(e)&&(hj(e)==="[object Error]"||e instanceof Error)}cu.isError=oE;cu.types.isNativeError=oE;function _R(e){return typeof e=="function"}cu.isFunction=_R;function J5t(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}cu.isPrimitive=J5t;cu.isBuffer=sj();function hj(e){return Object.prototype.toString.call(e)}function uj(e){return e<10?"0"+e.toString(10):e.toString(10)}var $5t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Q5t(){var e=new Date,t=[uj(e.getHours()),uj(e.getMinutes()),uj(e.getSeconds())].join(":");return[e.getDate(),$5t[e.getMonth()],t].join(" ")}cu.log=function(){console.log("%s - %s",Q5t(),cu.format.apply(cu,arguments))};cu.inherits=Zy();cu._extend=function(e,t){if(!t||!mA(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function V5e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var A2=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;cu.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(A2&&t[A2]){var r=t[A2];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,A2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(l,u){n=l,i=u}),o=[],s=0;s{"use strict";function G5e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rSt(e){for(var t=1;t0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return AR.alloc(0);for(var n=AR.allocUnsafe(r>>>0),i=this.head,a=0;i;)uSt(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return ro.length?o.length:r;if(s===o.length?a+=o:a+=o.slice(0,r),r-=s,r===0){s===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(r){var n=AR.allocUnsafe(r),i=this.head,a=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var o=i.data,s=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,s),r-=s,r===0){s===o.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++a}return this.length-=a,n}},{key:lSt,value:function(r,n){return vj(this,rSt({},n,{depth:0,customInspect:!1}))}}]),e}()});var gj=ye((adr,Z5e)=>{"use strict";function cSt(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(pj,this,e)):process.nextTick(pj,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?process.nextTick(SR,r):(r._writableState.errorEmitted=!0,process.nextTick(X5e,r,a)):process.nextTick(X5e,r,a):t?(process.nextTick(SR,r),t(a)):process.nextTick(SR,r)}),this)}function X5e(e,t){pj(e,t),SR(e)}function SR(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function fSt(){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 pj(e,t){e.emit("error",t)}function hSt(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}Z5e.exports={destroy:cSt,undestroy:fSt,errorOrDestroy:hSt}});var M2=ye((odr,J5e)=>{"use strict";function dSt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var K5e={};function J0(e,t,r){r||(r=Error);function n(a,o,s){return typeof t=="string"?t:t(a,o,s)}var i=function(a){dSt(o,a);function o(s,l,u){return a.call(this,n(s,l,u))||this}return o}(r);i.prototype.name=r.name,i.prototype.code=e,K5e[e]=i}function Y5e(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function vSt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function pSt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function gSt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}J0("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);J0("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&vSt(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(pSt(e," argument"))i="The ".concat(e," ").concat(n," ").concat(Y5e(t,"type"));else{var a=gSt(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(Y5e(t,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);J0("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");J0("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});J0("ERR_STREAM_PREMATURE_CLOSE","Premature close");J0("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});J0("ERR_MULTIPLE_CALLBACK","Callback called multiple times");J0("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");J0("ERR_STREAM_WRITE_AFTER_END","write after end");J0("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);J0("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);J0("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");J5e.exports.codes=K5e});var mj=ye((sdr,$5e)=>{"use strict";var mSt=M2().codes.ERR_INVALID_OPT_VALUE;function ySt(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function _St(e,t,r,n){var i=ySt(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?r:"highWaterMark";throw new mSt(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}$5e.exports={getHighWaterMark:_St}});var eSe=ye((ldr,Q5e)=>{Q5e.exports=xSt;function xSt(e,t){if(yj("noDeprecation"))return e;var r=!1;function n(){if(!r){if(yj("throwDeprecation"))throw new Error(t);yj("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function yj(e){try{if(!window.localStorage)return!1}catch(r){return!1}var t=window.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}});var bj=ye((udr,oSe)=>{"use strict";oSe.exports=Bh;function rSe(e){var t=this;this.next=null,this.entry=null,this.finish=function(){XSt(t,e)}}var yA;Bh.WritableState=lE;var bSt={deprecate:eSe()},iSe=xH(),ER=b2().Buffer,wSt=window.Uint8Array||function(){};function TSt(e){return ER.from(e)}function ASt(e){return ER.isBuffer(e)||e instanceof wSt}var xj=gj(),SSt=mj(),MSt=SSt.getHighWaterMark,V_=M2().codes,ESt=V_.ERR_INVALID_ARG_TYPE,kSt=V_.ERR_METHOD_NOT_IMPLEMENTED,CSt=V_.ERR_MULTIPLE_CALLBACK,LSt=V_.ERR_STREAM_CANNOT_PIPE,PSt=V_.ERR_STREAM_DESTROYED,ISt=V_.ERR_STREAM_NULL_VALUES,RSt=V_.ERR_STREAM_WRITE_AFTER_END,DSt=V_.ERR_UNKNOWN_ENCODING,_A=xj.errorOrDestroy;Zy()(Bh,iSe);function FSt(){}function lE(e,t,r){yA=yA||E2(),e=e||{},typeof r!="boolean"&&(r=t instanceof yA),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=MSt(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){VSt(t,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new rSe(this)}lE.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(lE.prototype,"buffer",{get:bSt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var MR;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(MR=Function.prototype[Symbol.hasInstance],Object.defineProperty(Bh,Symbol.hasInstance,{value:function(t){return MR.call(this,t)?!0:this!==Bh?!1:t&&t._writableState instanceof lE}})):MR=function(t){return t instanceof this};function Bh(e){yA=yA||E2();var t=this instanceof yA;if(!t&&!MR.call(Bh,this))return new Bh(e);this._writableState=new lE(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),iSe.call(this)}Bh.prototype.pipe=function(){_A(this,new LSt)};function zSt(e,t){var r=new RSt;_A(e,r),process.nextTick(t,r)}function qSt(e,t,r,n){var i;return r===null?i=new ISt:typeof r!="string"&&!t.objectMode&&(i=new ESt("chunk",["string","Buffer"],r)),i?(_A(e,i),process.nextTick(n,i),!1):!0}Bh.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=!n.objectMode&&ASt(e);return a&&!ER.isBuffer(e)&&(e=TSt(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=FSt),n.ending?zSt(this,r):(a||qSt(this,n,e,r))&&(n.pendingcb++,i=BSt(this,n,a,e,t,r)),i};Bh.prototype.cork=function(){this._writableState.corked++};Bh.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&nSe(this,e))};Bh.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new DSt(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(Bh.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function OSt(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=ER.from(t,r)),t}Object.defineProperty(Bh.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function BSt(e,t,r,n,i,a){if(!r){var o=OSt(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var l=t.length{"use strict";var ZSt=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};lSe.exports=Wm;var sSe=Aj(),Tj=bj();Zy()(Wm,sSe);for(wj=ZSt(Tj.prototype),kR=0;kR{var LR=b2(),Xm=LR.Buffer;function uSe(e,t){for(var r in e)t[r]=e[r]}Xm.from&&Xm.alloc&&Xm.allocUnsafe&&Xm.allocUnsafeSlow?cSe.exports=LR:(uSe(LR,Sj),Sj.Buffer=k2);function k2(e,t,r){return Xm(e,t,r)}k2.prototype=Object.create(Xm.prototype);uSe(Xm,k2);k2.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Xm(e,t,r)};k2.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=Xm(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};k2.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Xm(e)};k2.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return LR.SlowBuffer(e)}});var kj=ye(dSe=>{"use strict";var Ej=fSe().Buffer,hSe=Ej.isEncoding||function(e){switch(e=""+e,e&&e.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 JSt(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function $St(e){var t=JSt(e);if(typeof t!="string"&&(Ej.isEncoding===hSe||!hSe(e)))throw new Error("Unknown encoding: "+e);return t||e}dSe.StringDecoder=uE;function uE(e){this.encoding=$St(e);var t;switch(this.encoding){case"utf16le":this.text=nMt,this.end=aMt,t=4;break;case"utf8":this.fillLast=tMt,t=4;break;case"base64":this.text=oMt,this.end=sMt,t=3;break;default:this.write=lMt,this.end=uMt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ej.allocUnsafe(t)}uE.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function QSt(e,t,r){var n=t.length-1;if(n=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function eMt(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function tMt(e){var t=this.lastTotal-this.lastNeed,r=eMt(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function rMt(e,t){var r=QSt(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function iMt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function nMt(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function aMt(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function oMt(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function sMt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function lMt(e){return e.toString(this.encoding)}function uMt(e){return e&&e.length?this.write(e):""}});var PR=ye((hdr,gSe)=>{"use strict";var vSe=M2().codes.ERR_STREAM_PREMATURE_CLOSE;function cMt(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i{"use strict";var IR;function G_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var dMt=PR(),H_=Symbol("lastResolve"),C2=Symbol("lastReject"),cE=Symbol("error"),RR=Symbol("ended"),L2=Symbol("lastPromise"),Cj=Symbol("handlePromise"),P2=Symbol("stream");function j_(e,t){return{value:e,done:t}}function vMt(e){var t=e[H_];if(t!==null){var r=e[P2].read();r!==null&&(e[L2]=null,e[H_]=null,e[C2]=null,t(j_(r,!1)))}}function pMt(e){process.nextTick(vMt,e)}function gMt(e,t){return function(r,n){e.then(function(){if(t[RR]){r(j_(void 0,!0));return}t[Cj](r,n)},n)}}var mMt=Object.getPrototypeOf(function(){}),yMt=Object.setPrototypeOf((IR={get stream(){return this[P2]},next:function(){var t=this,r=this[cE];if(r!==null)return Promise.reject(r);if(this[RR])return Promise.resolve(j_(void 0,!0));if(this[P2].destroyed)return new Promise(function(o,s){process.nextTick(function(){t[cE]?s(t[cE]):o(j_(void 0,!0))})});var n=this[L2],i;if(n)i=new Promise(gMt(n,this));else{var a=this[P2].read();if(a!==null)return Promise.resolve(j_(a,!1));i=new Promise(this[Cj])}return this[L2]=i,i}},G_(IR,Symbol.asyncIterator,function(){return this}),G_(IR,"return",function(){var t=this;return new Promise(function(r,n){t[P2].destroy(null,function(i){if(i){n(i);return}r(j_(void 0,!0))})})}),IR),mMt),_Mt=function(t){var r,n=Object.create(yMt,(r={},G_(r,P2,{value:t,writable:!0}),G_(r,H_,{value:null,writable:!0}),G_(r,C2,{value:null,writable:!0}),G_(r,cE,{value:null,writable:!0}),G_(r,RR,{value:t._readableState.endEmitted,writable:!0}),G_(r,Cj,{value:function(a,o){var s=n[P2].read();s?(n[L2]=null,n[H_]=null,n[C2]=null,a(j_(s,!1))):(n[H_]=a,n[C2]=o)},writable:!0}),r));return n[L2]=null,dMt(t,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[C2];a!==null&&(n[L2]=null,n[H_]=null,n[C2]=null,a(i)),n[cE]=i;return}var o=n[H_];o!==null&&(n[L2]=null,n[H_]=null,n[C2]=null,o(j_(void 0,!0))),n[RR]=!0}),t.on("readable",pMt.bind(null,n)),n};mSe.exports=_Mt});var xSe=ye((vdr,_Se)=>{_Se.exports=function(){throw new Error("Readable.from is not available in the browser")}});var Aj=ye((gdr,LSe)=>{"use strict";LSe.exports=Bu;var xA;Bu.ReadableState=ASe;var pdr=Sb().EventEmitter,TSe=function(t,r){return t.listeners(r).length},hE=xH(),DR=b2().Buffer,xMt=window.Uint8Array||function(){};function bMt(e){return DR.from(e)}function wMt(e){return DR.isBuffer(e)||e instanceof xMt}var Lj=dj(),nu;Lj&&Lj.debuglog?nu=Lj.debuglog("stream"):nu=function(){};var TMt=W5e(),qj=gj(),AMt=mj(),SMt=AMt.getHighWaterMark,FR=M2().codes,MMt=FR.ERR_INVALID_ARG_TYPE,EMt=FR.ERR_STREAM_PUSH_AFTER_EOF,kMt=FR.ERR_METHOD_NOT_IMPLEMENTED,CMt=FR.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,bA,Pj,Ij;Zy()(Bu,hE);var fE=qj.errorOrDestroy,Rj=["error","close","destroy","pause","resume"];function LMt(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function ASe(e,t,r){xA=xA||E2(),e=e||{},typeof r!="boolean"&&(r=t instanceof xA),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=SMt(this,e,"readableHighWaterMark",r),this.buffer=new TMt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(bA||(bA=kj().StringDecoder),this.decoder=new bA(e.encoding),this.encoding=e.encoding)}function Bu(e){if(xA=xA||E2(),!(this instanceof Bu))return new Bu(e);var t=this instanceof xA;this._readableState=new ASe(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),hE.call(this)}Object.defineProperty(Bu.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});Bu.prototype.destroy=qj.destroy;Bu.prototype._undestroy=qj.undestroy;Bu.prototype._destroy=function(e,t){t(e)};Bu.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=DR.from(e,t),t=""),n=!0),SSe(this,e,t,!1,n)};Bu.prototype.unshift=function(e){return SSe(this,e,null,!0,!1)};function SSe(e,t,r,n,i){nu("readableAddChunk",t);var a=e._readableState;if(t===null)a.reading=!1,RMt(e,a);else{var o;if(i||(o=PMt(a,t)),o)fE(e,o);else if(a.objectMode||t&&t.length>0)if(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==DR.prototype&&(t=bMt(t)),n)a.endEmitted?fE(e,new CMt):Dj(e,a,t,!0);else if(a.ended)fE(e,new EMt);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Dj(e,a,t,!1):zj(e,a)):Dj(e,a,t,!1)}else n||(a.reading=!1,zj(e,a))}return!a.ended&&(a.length=bSe?e=bSe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function wSe(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=IMt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Bu.prototype.read=function(e){nu("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return nu("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Fj(this):zR(this),null;if(e=wSe(e,t),e===0&&t.ended)return t.length===0&&Fj(this),null;var n=t.needReadable;nu("need readable",n),(t.length===0||t.length-e0?i=kSe(e,t):i=null,i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Fj(this)),i!==null&&this.emit("data",i),i};function RMt(e,t){if(nu("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?zR(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,MSe(e)))}}function zR(e){var t=e._readableState;nu("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(nu("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(MSe,e))}function MSe(e){var t=e._readableState;nu("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Oj(e)}function zj(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(DMt,e,t))}function DMt(e,t){for(;!t.reading&&!t.ended&&(t.length1&&CSe(n.pipes,e)!==-1)&&!u&&(nu("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(b){nu("onerror",b),m(),e.removeListener("error",h),TSe(e,"error")===0&&fE(e,b)}LMt(e,"error",h);function d(){e.removeListener("finish",v),m()}e.once("close",d);function v(){nu("onfinish"),e.removeListener("close",d),m()}e.once("finish",v);function m(){nu("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(nu("pipe resume"),r.resume()),e};function FMt(e){return function(){var r=e._readableState;nu("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&TSe(e,"data")&&(r.flowing=!0,Oj(e))}}Bu.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,nu("on readable",n.length,n.reading),n.length?zR(this):n.reading||process.nextTick(zMt,this)),r};Bu.prototype.addListener=Bu.prototype.on;Bu.prototype.removeListener=function(e,t){var r=hE.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(ESe,this),r};Bu.prototype.removeAllListeners=function(e){var t=hE.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(ESe,this),t};function ESe(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function zMt(e){nu("readable nexttick read 0"),e.read(0)}Bu.prototype.resume=function(){var e=this._readableState;return e.flowing||(nu("resume"),e.flowing=!e.readableListening,qMt(this,e)),e.paused=!1,this};function qMt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(OMt,e,t))}function OMt(e,t){nu("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),Oj(e),t.flowing&&!t.reading&&e.read(0)}Bu.prototype.pause=function(){return nu("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(nu("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Oj(e){var t=e._readableState;for(nu("flow",t.flowing);t.flowing&&e.read()!==null;);}Bu.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(nu("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(nu("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(s){return function(){return e[s].apply(e,arguments)}}(i));for(var a=0;a=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Fj(e){var t=e._readableState;nu("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(BMt,t,e))}function BMt(e,t){if(nu("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(Bu.from=function(e,t){return Ij===void 0&&(Ij=xSe()),Ij(Bu,e,t)});function CSe(e,t){for(var r=0,n=e.length;r{"use strict";ISe.exports=Ky;var qR=M2().codes,NMt=qR.ERR_METHOD_NOT_IMPLEMENTED,UMt=qR.ERR_MULTIPLE_CALLBACK,VMt=qR.ERR_TRANSFORM_ALREADY_TRANSFORMING,GMt=qR.ERR_TRANSFORM_WITH_LENGTH_0,OR=E2();Zy()(Ky,OR);function HMt(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new UMt);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{"use strict";DSe.exports=dE;var RSe=Bj();Zy()(dE,RSe);function dE(e){if(!(this instanceof dE))return new dE(e);RSe.call(this,e)}dE.prototype._transform=function(e,t,r){r(null,e)}});var NSe=ye((_dr,BSe)=>{"use strict";var Nj;function WMt(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var OSe=M2().codes,XMt=OSe.ERR_MISSING_ARGS,ZMt=OSe.ERR_STREAM_DESTROYED;function zSe(e){if(e)throw e}function YMt(e){return e.setHeader&&typeof e.abort=="function"}function KMt(e,t,r,n){n=WMt(n);var i=!1;e.on("close",function(){i=!0}),Nj===void 0&&(Nj=PR()),Nj(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var a=!1;return function(o){if(!i&&!a){if(a=!0,YMt(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new ZMt("pipe"))}}}function qSe(e){e()}function JMt(e,t){return e.pipe(t)}function $Mt(e){return!e.length||typeof e[e.length-1]!="function"?zSe:e.pop()}function QMt(){for(var e=arguments.length,t=new Array(e),r=0;r0;return KMt(o,l,u,function(c){i||(i=c),c&&a.forEach(qSe),!l&&(a.forEach(qSe),n(i))})});return t.reduce(JMt)}BSe.exports=QMt});var VSe=ye((xdr,USe)=>{USe.exports=$0;var Uj=Sb().EventEmitter,e4t=Zy();e4t($0,Uj);$0.Readable=Aj();$0.Writable=bj();$0.Duplex=E2();$0.Transform=Bj();$0.PassThrough=FSe();$0.finished=PR();$0.pipeline=NSe();$0.Stream=$0;function $0(){Uj.call(this)}$0.prototype.pipe=function(e,t){var r=this;function n(c){e.writable&&e.write(c)===!1&&r.pause&&r.pause()}r.on("data",n);function i(){r.readable&&r.resume&&r.resume()}e.on("drain",i),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",o),r.on("close",s));var a=!1;function o(){a||(a=!0,e.end())}function s(){a||(a=!0,typeof e.destroy=="function"&&e.destroy())}function l(c){if(u(),Uj.listenerCount(this,"error")===0)throw c}r.on("error",l),e.on("error",l);function u(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",o),r.removeListener("close",s),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}});var TA=ye(fu=>{var GSe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},i=0;i=i)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),jj(t)?r.showHidden=t:t&&fu._extend(r,t),R2(r.showHidden)&&(r.showHidden=!1),R2(r.depth)&&(r.depth=2),R2(r.colors)&&(r.colors=!1),R2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=r4t),VR(r,e,r.depth)}fu.inspect=W_;W_.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]};W_.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function r4t(e,t){var r=W_.styles[t];return r?"\x1B["+W_.colors[r][0]+"m"+e+"\x1B["+W_.colors[r][1]+"m":e}function i4t(e,t){return e}function n4t(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function VR(e,t,r){if(e.customInspect&&t&&UR(t.inspect)&&t.inspect!==fu.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return jR(n)||(n=VR(e,n,r)),n}var i=a4t(e,t);if(i)return i;var a=Object.keys(t),o=n4t(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),pE(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return Vj(t);if(a.length===0){if(UR(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(vE(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(GR(t))return e.stylize(Date.prototype.toString.call(t),"date");if(pE(t))return Vj(t)}var l="",u=!1,c=["{","}"];if(jSe(t)&&(u=!0,c=["[","]"]),UR(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(vE(t)&&(l=" "+RegExp.prototype.toString.call(t)),GR(t)&&(l=" "+Date.prototype.toUTCString.call(t)),pE(t)&&(l=" "+Vj(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return vE(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=o4t(e,t,r,o,a):h=a.map(function(d){return Hj(e,t,r,o,d,u)}),e.seen.pop(),s4t(h,l,c)}function a4t(e,t){if(R2(t))return e.stylize("undefined","undefined");if(jR(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(WSe(t))return e.stylize(""+t,"number");if(jj(t))return e.stylize(""+t,"boolean");if(HR(t))return e.stylize("null","null")}function Vj(e){return"["+Error.prototype.toString.call(e)+"]"}function o4t(e,t,r,n,i){for(var a=[],o=0,s=t.length;o-1&&(a?s=s.split(` +`).map(function(u){return" "+u}).join(` +`).slice(2):s=` +`+s.split(` +`).map(function(u){return" "+u}).join(` +`))):s=e.stylize("[Circular]","special")),R2(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function s4t(e,t,r){var n=0,i=e.reduce(function(a,o){return n++,o.indexOf(` +`)>=0&&n++,a+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(t===""?"":t+` + `)+" "+e.join(`, + `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}fu.types=oj();function jSe(e){return Array.isArray(e)}fu.isArray=jSe;function jj(e){return typeof e=="boolean"}fu.isBoolean=jj;function HR(e){return e===null}fu.isNull=HR;function l4t(e){return e==null}fu.isNullOrUndefined=l4t;function WSe(e){return typeof e=="number"}fu.isNumber=WSe;function jR(e){return typeof e=="string"}fu.isString=jR;function u4t(e){return typeof e=="symbol"}fu.isSymbol=u4t;function R2(e){return e===void 0}fu.isUndefined=R2;function vE(e){return wA(e)&&Wj(e)==="[object RegExp]"}fu.isRegExp=vE;fu.types.isRegExp=vE;function wA(e){return typeof e=="object"&&e!==null}fu.isObject=wA;function GR(e){return wA(e)&&Wj(e)==="[object Date]"}fu.isDate=GR;fu.types.isDate=GR;function pE(e){return wA(e)&&(Wj(e)==="[object Error]"||e instanceof Error)}fu.isError=pE;fu.types.isNativeError=pE;function UR(e){return typeof e=="function"}fu.isFunction=UR;function c4t(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}fu.isPrimitive=c4t;fu.isBuffer=sj();function Wj(e){return Object.prototype.toString.call(e)}function Gj(e){return e<10?"0"+e.toString(10):e.toString(10)}var f4t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function h4t(){var e=new Date,t=[Gj(e.getHours()),Gj(e.getMinutes()),Gj(e.getSeconds())].join(":");return[e.getDate(),f4t[e.getMonth()],t].join(" ")}fu.log=function(){console.log("%s - %s",h4t(),fu.format.apply(fu,arguments))};fu.inherits=Zy();fu._extend=function(e,t){if(!t||!wA(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function XSe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var I2=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;fu.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(I2&&t[I2]){var r=t[I2];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,I2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(l,u){n=l,i=u}),o=[],s=0;s{"use strict";function X_(e){"@babel/helpers - typeof";return X_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},X_(e)}function ZSe(e,t){for(var r=0;r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function A4t(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function S4t(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function M4t(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}gE("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);gE("ERR_INVALID_ARG_TYPE",function(e,t,r){AA===void 0&&(AA=mE()),AA(typeof e=="string","'name' must be a string");var n;typeof t=="string"&&A4t(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(S4t(e," argument"))i="The ".concat(e," ").concat(n," ").concat(YSe(t,"type"));else{var a=M4t(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(YSe(t,"type"))}return i+=". Received type ".concat(X_(r)),i},TypeError);gE("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";Xj===void 0&&(Xj=TA());var n=Xj.inspect(t);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(n)},TypeError,RangeError);gE("ERR_INVALID_RETURN_VALUE",function(e,t,r){var n;return r&&r.constructor&&r.constructor.name?n="instance of ".concat(r.constructor.name):n="type ".concat(X_(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(n,".")},TypeError);gE("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var n="The ",i=t.length;switch(t=t.map(function(a){return'"'.concat(a,'"')}),i){case 1:n+="".concat(t[0]," argument");break;case 2:n+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:n+=t.slice(0,i-1).join(", "),n+=", and ".concat(t[i-1]," arguments");break}return"".concat(n," must be specified")},TypeError);JSe.exports.codes=KSe});var sMe=ye((Tdr,oMe)=>{"use strict";function $Se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function QSe(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}function q4t(e,t){if(t=Math.floor(t),e.length==0||t==0)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var Xg="",yE="",_E="",Tv="",D2={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:"},O4t=10;function rMe(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(n){r[n]=e[n]}),Object.defineProperty(r,"message",{value:e.message}),r}function xE(e){return $j(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function B4t(e,t,r){var n="",i="",a=0,o="",s=!1,l=xE(e),u=l.split(` +`),c=xE(t).split(` +`),f=0,h="";if(r==="strictEqual"&&Dp(e)==="object"&&Dp(t)==="object"&&e!==null&&t!==null&&(r="strictEqualObject"),u.length===1&&c.length===1&&u[0]!==c[0]){var d=u[0].length+c[0].length;if(d<=O4t){if((Dp(e)!=="object"||e===null)&&(Dp(t)!=="object"||t===null)&&(e!==0||t!==0))return"".concat(D2[r],` + +`)+"".concat(u[0]," !== ").concat(c[0],` +`)}else if(r!=="strictEqualObject"){var v=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(d2&&(h=` + `.concat(q4t(" ",f),"^"),f=0)}}}for(var m=u[u.length-1],b=c[c.length-1];m===b&&(f++<2?o=` + `.concat(m).concat(o):n=m,u.pop(),c.pop(),!(u.length===0||c.length===0));)m=u[u.length-1],b=c[c.length-1];var p=Math.max(u.length,c.length);if(p===0){var k=l.split(` +`);if(k.length>30)for(k[26]="".concat(Xg,"...").concat(Tv);k.length>27;)k.pop();return"".concat(D2.notIdentical,` + +`).concat(k.join(` +`),` +`)}f>3&&(o=` +`.concat(Xg,"...").concat(Tv).concat(o),s=!0),n!==""&&(o=` + `.concat(n).concat(o),n="");var M=0,T=D2[r]+` +`.concat(yE,"+ actual").concat(Tv," ").concat(_E,"- expected").concat(Tv),L=" ".concat(Xg,"...").concat(Tv," Lines skipped");for(f=0;f1&&f>2&&(x>4?(i+=` +`.concat(Xg,"...").concat(Tv),s=!0):x>3&&(i+=` + `.concat(c[f-2]),M++),i+=` + `.concat(c[f-1]),M++),a=f,n+=` +`.concat(_E,"-").concat(Tv," ").concat(c[f]),M++;else if(c.length1&&f>2&&(x>4?(i+=` +`.concat(Xg,"...").concat(Tv),s=!0):x>3&&(i+=` + `.concat(u[f-2]),M++),i+=` + `.concat(u[f-1]),M++),a=f,i+=` +`.concat(yE,"+").concat(Tv," ").concat(u[f]),M++;else{var C=c[f],S=u[f],g=S!==C&&(!tMe(S,",")||S.slice(0,-1)!==C);g&&tMe(C,",")&&C.slice(0,-1)===S&&(g=!1,S+=","),g?(x>1&&f>2&&(x>4?(i+=` +`.concat(Xg,"...").concat(Tv),s=!0):x>3&&(i+=` + `.concat(u[f-2]),M++),i+=` + `.concat(u[f-1]),M++),a=f,i+=` +`.concat(yE,"+").concat(Tv," ").concat(S),n+=` +`.concat(_E,"-").concat(Tv," ").concat(C),M+=2):(i+=n,n="",(x===1||f===0)&&(i+=` + `.concat(S),M++))}if(M>20&&f30)for(d[26]="".concat(Xg,"...").concat(Tv);d.length>27;)d.pop();d.length===1?a=r.call(this,"".concat(h," ").concat(d[0])):a=r.call(this,"".concat(h,` + +`).concat(d.join(` +`),` +`))}else{var v=xE(u),m="",b=D2[s];s==="notDeepEqual"||s==="notEqual"?(v="".concat(D2[s],` + +`).concat(v),v.length>1024&&(v="".concat(v.slice(0,1021),"..."))):(m="".concat(xE(c)),v.length>512&&(v="".concat(v.slice(0,509),"...")),m.length>512&&(m="".concat(m.slice(0,509),"...")),s==="deepEqual"||s==="equal"?v="".concat(b,` + +`).concat(v,` + +should equal + +`):m=" ".concat(s," ").concat(m)),a=r.call(this,"".concat(v).concat(m))}return Error.stackTraceLimit=f,a.generatedMessage=!o,Object.defineProperty(Kj(a),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),a.code="ERR_ASSERTION",a.actual=u,a.expected=c,a.operator=s,Error.captureStackTrace&&Error.captureStackTrace(Kj(a),l),a.stack,a.name="AssertionError",nMe(a)}return C4t(n,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(a,o){return $j(this,QSe(QSe({},o),{},{customInspect:!1,depth:0}))}}]),n}(Jj(Error),$j.custom);oMe.exports=N4t});var Qj=ye((Adr,uMe)=>{"use strict";var lMe=Object.prototype.toString;uMe.exports=function(t){var r=lMe.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&lMe.call(t.callee)==="[object Function]"),n}});var yMe=ye((Sdr,mMe)=>{"use strict";var gMe;Object.keys||(TE=Object.prototype.hasOwnProperty,eW=Object.prototype.toString,cMe=Qj(),tW=Object.prototype.propertyIsEnumerable,fMe=!tW.call({toString:null},"toString"),hMe=tW.call(function(){},"prototype"),AE=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],ZR=function(e){var t=e.constructor;return t&&t.prototype===e},dMe={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},vMe=function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!dMe["$"+e]&&TE.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{ZR(window[e])}catch(t){return!0}}catch(t){return!0}return!1}(),pMe=function(e){if(typeof window=="undefined"||!vMe)return ZR(e);try{return ZR(e)}catch(t){return!1}},gMe=function(t){var r=t!==null&&typeof t=="object",n=eW.call(t)==="[object Function]",i=cMe(t),a=r&&eW.call(t)==="[object String]",o=[];if(!r&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var s=hMe&&n;if(a&&t.length>0&&!TE.call(t,0))for(var l=0;l0)for(var u=0;u{"use strict";var U4t=Array.prototype.slice,V4t=Qj(),_Me=Object.keys,YR=_Me?function(t){return _Me(t)}:yMe(),xMe=Object.keys;YR.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return V4t(n)?xMe(U4t.call(n)):xMe(n)})}else Object.keys=YR;return Object.keys||YR};bMe.exports=YR});var EMe=ye((Edr,MMe)=>{"use strict";var G4t=rW(),AMe=K8()(),SMe=vA(),wMe=Object,H4t=SMe("Array.prototype.push"),TMe=SMe("Object.prototype.propertyIsEnumerable"),j4t=AMe?Object.getOwnPropertySymbols:null;MMe.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=wMe(t);if(arguments.length===1)return n;for(var i=1;i{"use strict";var iW=EMe(),W4t=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n{"use strict";var LMe=function(e){return e!==e};PMe.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||LMe(t)&&LMe(r))}});var KR=ye((Ldr,IMe)=>{"use strict";var Z4t=nW();IMe.exports=function(){return typeof Object.is=="function"?Object.is:Z4t}});var SE=ye((Pdr,zMe)=>{"use strict";var Y4t=rW(),K4t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",J4t=Object.prototype.toString,$4t=Array.prototype.concat,RMe=Object.defineProperty,Q4t=function(e){return typeof e=="function"&&J4t.call(e)==="[object Function]"},eEt=NH()(),DMe=RMe&&eEt,tEt=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!Q4t(n)||!n())return}DMe?RMe(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r},FMe=function(e,t){var r=arguments.length>2?arguments[2]:{},n=Y4t(t);K4t&&(n=$4t.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i{"use strict";var rEt=KR(),iEt=SE();qMe.exports=function(){var t=rEt();return iEt(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var VMe=ye((Rdr,UMe)=>{"use strict";var nEt=SE(),aEt=rE(),oEt=nW(),BMe=KR(),sEt=OMe(),NMe=aEt(BMe(),Object);nEt(NMe,{getPolyfill:BMe,implementation:oEt,shim:sEt});UMe.exports=NMe});var aW=ye((Ddr,GMe)=>{"use strict";GMe.exports=function(t){return t!==t}});var oW=ye((Fdr,HMe)=>{"use strict";var lEt=aW();HMe.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:lEt}});var WMe=ye((zdr,jMe)=>{"use strict";var uEt=SE(),cEt=oW();jMe.exports=function(){var t=cEt();return uEt(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var KMe=ye((qdr,YMe)=>{"use strict";var fEt=rE(),hEt=SE(),dEt=aW(),XMe=oW(),vEt=WMe(),ZMe=fEt(XMe(),Number);hEt(ZMe,{getPolyfill:XMe,implementation:dEt,shim:vEt});YMe.exports=ZMe});var g4e=ye((Odr,p4e)=>{"use strict";function JMe(e,t){return yEt(e)||mEt(e,t)||gEt(e,t)||pEt()}function pEt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gEt(e,t){if(e){if(typeof e=="string")return $Me(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $Me(e,t)}}function $Me(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r10)return!0;for(var t=0;t57)return!0}return e.length===10&&e>=Math.pow(2,32)}function QR(e){return Object.keys(e).filter(EEt).concat(tD(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function f4e(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i{"use strict";function Zg(e){"@babel/helpers - typeof";return Zg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zg(e)}function m4e(e,t){for(var r=0;r1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i{var LE=1e3,PE=LE*60,IE=PE*60,RE=IE*24,QEt=RE*365.25;F4e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return ekt(e);if(r==="number"&&isNaN(e)===!1)return t.long?rkt(e):tkt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function ekt(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*QEt;case"days":case"day":case"d":return r*RE;case"hours":case"hour":case"hrs":case"hr":case"h":return r*IE;case"minutes":case"minute":case"mins":case"min":case"m":return r*PE;case"seconds":case"second":case"secs":case"sec":case"s":return r*LE;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function tkt(e){return e>=RE?Math.round(e/RE)+"d":e>=IE?Math.round(e/IE)+"h":e>=PE?Math.round(e/PE)+"m":e>=LE?Math.round(e/LE)+"s":e+"ms"}function rkt(e){return uD(e,RE,"day")||uD(e,IE,"hour")||uD(e,PE,"minute")||uD(e,LE,"second")||e+" ms"}function uD(e,t,r){if(!(e{Lc=q4e.exports=dW.debug=dW.default=dW;Lc.coerce=skt;Lc.disable=akt;Lc.enable=nkt;Lc.enabled=okt;Lc.humanize=z4e();Lc.names=[];Lc.skips=[];Lc.formatters={};var hW;function ikt(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Lc.colors[Math.abs(t)%Lc.colors.length]}function dW(e){function t(){if(t.enabled){var r=t,n=+new Date,i=n-(hW||n);r.diff=i,r.prev=hW,r.curr=n,hW=n;for(var a=new Array(arguments.length),o=0;o{up=N4e.exports=O4e();up.log=ckt;up.formatArgs=ukt;up.save=fkt;up.load=B4e;up.useColors=lkt;up.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:hkt();up.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function lkt(){return typeof window!="undefined"&&window.process&&window.process.type==="renderer"?!0:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}up.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function ukt(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+up.humanize(this.diff),!!t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(a){a!=="%%"&&(n++,a==="%c"&&(i=n))}),e.splice(i,0,r)}}function ckt(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function fkt(e){try{e==null?up.storage.removeItem("debug"):up.storage.debug=e}catch(t){}}function B4e(){var e;try{e=up.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}up.enable(B4e());function hkt(){try{return window.localStorage}catch(e){}}});var Y4e=ye((Udr,Z4e)=>{var MA=mE(),J_=U4e()("stream-parser");Z4e.exports=vkt;var G4e=-1,cD=0,dkt=1,H4e=2;function vkt(e){var t=e&&typeof e._transform=="function",r=e&&typeof e._write=="function";if(!t&&!r)throw new Error("must pass a Writable or Transform stream in");J_("extending Parser into stream"),e._bytes=pkt,e._skipBytes=gkt,t&&(e._passthrough=mkt),t?e._transform=_kt:e._write=ykt}function DE(e){J_("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=G4e,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function pkt(e,t){MA(!this._parserCallback,'there is already a "callback" set!'),MA(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||DE(this),J_("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=cD}function gkt(e,t){MA(!this._parserCallback,'there is already a "callback" set!'),MA(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||DE(this),J_("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=dkt}function mkt(e,t){MA(!this._parserCallback,'There is already a "callback" set!'),MA(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||DE(this),J_("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=H4e}function ykt(e,t,r){this._parserInit||DE(this),J_("write(%o bytes)",e.length),typeof t=="function"&&(r=t),W4e(this,e,null,r)}function _kt(e,t,r){this._parserInit||DE(this),J_("transform(%o bytes)",e.length),typeof t!="function"&&(t=this._parserOutput),W4e(this,e,t,r)}function j4e(e,t,r,n){return e._parserBytesLeft<=0?n(new Error("got data but not currently parsing anything")):t.length<=e._parserBytesLeft?function(){return V4e(e,t,r,n)}:function(){var i=t.slice(0,e._parserBytesLeft);return V4e(e,i,r,function(a){if(a)return n(a);if(t.length>i.length)return function(){return j4e(e,t.slice(i.length),r,n)}})}}function V4e(e,t,r,n){if(e._parserBytesLeft-=t.length,J_("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===cD?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===H4e&&r(t),e._parserBytesLeft===0){var i=e._parserCallback;if(i&&e._parserState===cD&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==cD&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=G4e,e._parserBuffers.splice(0),i){var a=[];t&&a.push(t),r&&a.push(r);var o=i.length>a.length;o&&a.push(X4e(n));var s=i.apply(e,a);if(!o||n===s)return n}}else return n}var W4e=X4e(j4e);function X4e(e){return function(){for(var t=e.apply(this,arguments);typeof t=="function";)t=t();return t}}});var rc=ye(Jy=>{"use strict";var K4e=VSe().Transform,xkt=Y4e();function FE(){K4e.call(this,{readableObjectMode:!0})}FE.prototype=Object.create(K4e.prototype);FE.prototype.constructor=FE;xkt(FE.prototype);Jy.ParserStream=FE;Jy.sliceEq=function(e,t,r){for(var n=t,i=0;i{"use strict";var EA=rc().readUInt16BE,pW=rc().readUInt32BE;function zE(e,t){if(e.length<4+t)return null;var r=pW(e,t);return e.length>4&15,n=e[4]&15,i=e[5]>>4&15,a=EA(e,6),o=8,s=0;sa.width||i.width===a.width&&i.height>a.height?i:a}),r=e.reduce(function(i,a){return i.height>a.height||i.height===a.height&&i.width>a.width?i:a}),n;return t.width>r.height||t.width===r.height&&t.height>r.width?n=t:n=r,n}hD.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(Skt(e,t),!!t.sizes.length){var r=Mkt(t.sizes),n=1;t.transforms.forEach(function(a){var o={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},s={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(a.type==="imir"&&(a.value===0?n=s[n]:(n=s[n],n=o[n],n=o[n])),a.type==="irot")for(var l=0;l{"use strict";function dD(e,t){var r=new Error(e);return r.code=t,r}function Ekt(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function $y(e,t,r){this.input=e.subarray(t,r),this.start=t;var n=String.fromCharCode.apply(null,this.input.subarray(0,4));if(n!=="II*\0"&&n!=="MM\0*")throw dD("invalid TIFF signature","EBADDATA");this.big_endian=n[0]==="M"}$y.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}};$y.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw dD("unexpected EOF","EBADDATA");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};$y.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw dD("unexpected EOF","EBADDATA");return this.big_endian?t[e]*16777216+t[e+1]*65536+t[e+2]*256+t[e+3]:t[e]+t[e+1]*256+t[e+2]*65536+t[e+3]*16777216};$y.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};$y.prototype.exif_format_length=function(e){switch(e){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}};$y.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t],r;case 6:return r=this.input[t],r|(r&128)*33554430;case 3:return r=this.read_uint16(t),r;case 8:return r=this.read_uint16(t),r|(r&32768)*131070;case 4:return r=this.read_uint32(t),r;case 9:return r=this.read_uint32(t),r|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}};$y.prototype.scan_ifd=function(e,t,r){var n=this.read_uint16(t);t+=2;for(var i=0;ithis.input.length)throw dD("unexpected EOF","EBADDATA");for(var h=[],d=c,v=0;v0&&(this.ifds_to_read.push({id:a,offset:h[0]}),f=!0);var b={is_big_endian:this.big_endian,ifd:e,tag:a,format:o,count:s,entry_offset:t+this.start,data_length:u,data_offset:c+this.start,value:h,is_subifd_link:f};if(r(b)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};gW.exports.ExifParser=$y;gW.exports.get_orientation=function(e){var t=0;try{return new $y(e,0,e.length).each(function(r){if(r.ifd===0&&r.tag===274&&Array.isArray(r.value))return t=r.value[0],!1}),t}catch(r){return-1}}});var Q4e=ye((jdr,$4e)=>{"use strict";var kkt=rc().str2arr,Ckt=rc().sliceEq,Lkt=rc().readUInt32BE,pD=J4e(),Pkt=vD(),Ikt=kkt("ftyp");$4e.exports=function(e){if(Ckt(e,4,Ikt)){var t=pD.unbox(e,0);if(t){var r=pD.getMimeType(t.data);if(r){for(var n,i=t.end;;){var a=pD.unbox(e,i);if(!a)break;if(i=a.end,a.boxtype==="mdat")return;if(a.boxtype==="meta"){n=a.data;break}}if(n){var o=pD.readSizeFromMeta(n);if(o){var s={width:o.width,height:o.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(o.variants.length>1&&(s.variants=o.variants),o.orientation&&(s.orientation=o.orientation),o.exif_location&&o.exif_location.offset+o.exif_location.length<=e.length){var l=Lkt(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+l+4,o.exif_location.offset+o.exif_location.length),c=Pkt.get_orientation(u);c>0&&(s.orientation=c)}return s}}}}}}});var rEe=ye((Wdr,tEe)=>{"use strict";var Rkt=rc().str2arr,Dkt=rc().sliceEq,eEe=rc().readUInt16LE,Fkt=Rkt("BM");tEe.exports=function(e){if(!(e.length<26)&&Dkt(e,0,Fkt))return{width:eEe(e,18),height:eEe(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}});var sEe=ye((Xdr,oEe)=>{"use strict";var aEe=rc().str2arr,iEe=rc().sliceEq,nEe=rc().readUInt16LE,zkt=aEe("GIF87a"),qkt=aEe("GIF89a");oEe.exports=function(e){if(!(e.length<10)&&!(!iEe(e,0,zkt)&&!iEe(e,0,qkt)))return{width:nEe(e,6),height:nEe(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var cEe=ye((Zdr,uEe)=>{"use strict";var mW=rc().readUInt16LE,Okt=0,Bkt=1,lEe=16;uEe.exports=function(e){var t=mW(e,0),r=mW(e,2),n=mW(e,4);if(!(t!==Okt||r!==Bkt||!n)){for(var i=[],a={width:0,height:0},o=0;oa.width||l>a.height)&&(a=u)}return{width:a.width,height:a.height,variants:i,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}});var hEe=ye((Ydr,fEe)=>{"use strict";var yW=rc().readUInt16BE,Nkt=rc().str2arr,Ukt=rc().sliceEq,Vkt=vD(),Gkt=Nkt("Exif\0\0");fEe.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var r=e[t++],n;r===255;)r=e[t++];if(208<=r&&r<=217||r===1)n=0;else if(192<=r&&r<=254){if(e.length-t<2)return;n=yW(e,t)-2,t+=2}else return;if(r===217||r===218)return;var i;if(r===225&&n>=10&&Ukt(e,t,Gkt)&&(i=Vkt.get_orientation(e.slice(t+6,t+n))),n>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(e.length-t0&&(a.orientation=i),a}t+=n}}});var mEe=ye((Kdr,gEe)=>{"use strict";var pEe=rc().str2arr,dEe=rc().sliceEq,vEe=rc().readUInt32BE,Hkt=pEe(`\x89PNG\r + +`),jkt=pEe("IHDR");gEe.exports=function(e){if(!(e.length<24)&&dEe(e,0,Hkt)&&dEe(e,12,jkt))return{width:vEe(e,16),height:vEe(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var xEe=ye((Jdr,_Ee)=>{"use strict";var Wkt=rc().str2arr,Xkt=rc().sliceEq,yEe=rc().readUInt32BE,Zkt=Wkt("8BPS\0");_Ee.exports=function(e){if(!(e.length<22)&&Xkt(e,0,Zkt))return{width:yEe(e,18),height:yEe(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var TEe=ye(($dr,wEe)=>{"use strict";function Ykt(e){return e===32||e===9||e===13||e===10}function kA(e){return typeof e=="number"&&isFinite(e)&&e>0}function Kkt(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t]*>/,$kt=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,Qkt=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,eCt=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,tCt=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,bEe=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function rCt(e){var t=e.match(Qkt),r=e.match(eCt),n=e.match(tCt);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function Zm(e){return bEe.test(e)?e.match(bEe)[0]:"px"}wEe.exports=function(e){if(Kkt(e)){for(var t="",r=0;r{"use strict";var MEe=rc().str2arr,AEe=rc().sliceEq,iCt=rc().readUInt16LE,nCt=rc().readUInt16BE,aCt=rc().readUInt32LE,oCt=rc().readUInt32BE,sCt=MEe("II*\0"),lCt=MEe("MM\0*");function gD(e,t,r){return r?nCt(e,t):iCt(e,t)}function _W(e,t,r){return r?oCt(e,t):aCt(e,t)}function SEe(e,t,r){var n=gD(e,t+2,r),i=_W(e,t+4,r);return i!==1||n!==3&&n!==4?null:n===3?gD(e,t+8,r):_W(e,t+8,r)}EEe.exports=function(e){if(!(e.length<8)&&!(!AEe(e,0,sCt)&&!AEe(e,0,lCt))){var t=e[0]===77,r=_W(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var i=gD(e,n+0,t)*12;if(!(i<=0)&&(n+=2,!(e.length-n{"use strict";var PEe=rc().str2arr,CEe=rc().sliceEq,LEe=rc().readUInt16LE,xW=rc().readUInt32LE,uCt=vD(),cCt=PEe("RIFF"),fCt=PEe("WEBP");function hCt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:LEe(e,t+6)&16383,height:LEe(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function dCt(e,t){if(e[t]===47){var r=xW(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function vCt(e,t){return{width:(e[t+6]<<16|e[t+5]<<8|e[t+4])+1,height:(e[t+9]<e.length)){for(;t+8=10?r=r||hCt(e,t+8):a==="VP8L"&&o>=9?r=r||dCt(e,t+8):a==="VP8X"&&o>=10?r=r||vCt(e,t+8):a==="EXIF"&&(n=uCt.get_orientation(e.slice(t+8,t+8+o)),t=1/0),t+=8+o}if(r)return n>0&&(r.orientation=n),r}}}});var FEe=ye((tvr,DEe)=>{"use strict";DEe.exports={avif:Q4e(),bmp:rEe(),gif:sEe(),ico:cEe(),jpeg:hEe(),png:mEe(),psd:xEe(),svg:TEe(),tiff:kEe(),webp:REe()}});var zEe=ye((rvr,wW)=>{"use strict";var bW=FEe();function pCt(e){for(var t=Object.keys(bW),r=0;r{"use strict";var gCt=zEe(),mCt=qy().IMAGE_URL_PREFIX,yCt=b2().Buffer;qEe.getImageSize=function(e){var t=e.replace(mCt,""),r=new yCt(t,"base64");return gCt(r)}});var UEe=ye((nvr,NEe)=>{"use strict";var BEe=Pr(),_Ct=tA(),xCt=Eo(),mD=ho(),bCt=Pr().maxRowLength,wCt=OEe().getImageSize;NEe.exports=function(t,r){var n,i;if(r._hasZ)n=r.z.length,i=bCt(r.z);else if(r._hasSource){var a=wCt(r.source);n=a.height,i=a.width}var o=mD.getFromId(t,r.xaxis||"x"),s=mD.getFromId(t,r.yaxis||"y"),l=o.d2c(r.x0)-r.dx/2,u=s.d2c(r.y0)-r.dy/2,c,f=[l,l+i*r.dx],h=[u,u+n*r.dy];if(o&&o.type==="log")for(c=0;c{"use strict";var MCt=qa(),F2=Pr(),VEe=F2.strTranslate,ECt=Wp(),kCt=tA(),CCt=lG(),LCt=m8().STYLE;GEe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&CCt();F2.makeTraceGroups(i,n,"im").each(function(l){var u=MCt.select(this),c=l[0],f=c.trace,h=(f.zsmooth==="fast"||f.zsmooth===!1&&s)&&!f._hasZ&&f._hasSource&&a.type==="linear"&&o.type==="linear";f._realImage=h;var d=c.z,v=c.x0,m=c.y0,b=c.w,p=c.h,k=f.dx,M=f.dy,T,L,x,C,S,g;for(g=0;T===void 0&&g0;)L=a.c2p(v+g*k),g--;for(g=0;C===void 0&&g0;)S=o.c2p(m+g*M),g--;if(LH[0];if(ie||ae){var _e=T+E/2,Ee=C+z/2;j+="transform:"+VEe(_e+"px",Ee+"px")+"scale("+(ie?-1:1)+","+(ae?-1:1)+")"+VEe(-_e+"px",-Ee+"px")+";"}}Z.attr("style",j);var Ce=new Promise(function(ge){if(f._hasZ)ge();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===b&&f._canvas.el.height===p&&f._canvas.source===f.source)ge();else{var re=document.createElement("canvas");re.width=b,re.height=p;var Se=re.getContext("2d",{willReadFrequently:!0});f._image=f._image||new Image;var ke=f._image;ke.onload=function(){Se.drawImage(ke,0,0),f._canvas={el:re,source:f.source},ge()},ke.setAttribute("src",f.source)}}).then(function(){var ge,re;if(f._hasZ)re=G(function(be,Be){var Le=d[Be][be];return F2.isTypedArray(Le)&&(Le=Array.from(Le)),Le}),ge=re.toDataURL("image/png");else if(f._hasSource)if(h)ge=f.source;else{var Se=f._canvas.el.getContext("2d",{willReadFrequently:!0}),ke=Se.getImageData(0,0,b,p).data;re=G(function(be,Be){var Le=4*(Be*b+be);return[ke[Le],ke[Le+1],ke[Le+2],ke[Le+3]]}),ge=re.toDataURL("image/png")}Z.attr({"xlink:href":ge,height:z,width:E,x:T,y:C})});t._promises.push(Ce)})}});var WEe=ye((ovr,jEe)=>{"use strict";var PCt=qa();jEe.exports=function(t){PCt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var KEe=ye((svr,YEe)=>{"use strict";var XEe=ef(),ZEe=Pr(),yD=ZEe.isArrayOrTypedArray,ICt=tA();YEe.exports=function(t,r,n){var i=t.cd[0],a=i.trace,o=t.xa,s=t.ya;if(!(XEe.inbox(r-i.x0,r-(i.x0+i.w*a.dx),0)>0||XEe.inbox(n-i.y0,n-(i.y0+i.h*a.dy),0)>0)){var l=Math.floor((r-i.x0)/a.dx),u=Math.floor(Math.abs(n-i.y0)/a.dy),c;if(a._hasZ?c=i.z[u][l]:a._hasSource&&(c=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,u,1,1).data),!!c){var f=i.hi||a.hoverinfo,h;if(f){var d=f.split("+");d.indexOf("all")!==-1&&(d=["color"]),d.indexOf("color")!==-1&&(h=!0)}var v=ICt.colormodel[a.colormodel],m=v.colormodel||a.colormodel,b=m.length,p=a._scaler(c),k=v.suffix,M=[];(a.hovertemplate||h)&&(M.push("["+[p[0]+k[0],p[1]+k[1],p[2]+k[2]].join(", ")),b===4&&M.push(", "+p[3]+k[3]),M.push("]"),M=M.join(""),t.extraText=m.toUpperCase()+": "+M);var T;yD(a.hovertext)&&yD(a.hovertext[u])?T=a.hovertext[u][l]:yD(a.text)&&yD(a.text[u])&&(T=a.text[u][l]);var L=s.c2p(i.y0+(u+.5)*a.dy),x=i.x0+(l+.5)*a.dx,C=i.y0+(u+.5)*a.dy,S="["+c.slice(0,a.colormodel.length).join(", ")+"]";return[ZEe.extendFlat(t,{index:[u,l],x0:o.c2p(i.x0+l*a.dx),x1:o.c2p(i.x0+(l+1)*a.dx),y0:L,y1:L,color:p,xVal:x,xLabelVal:x,yVal:C,yLabelVal:C,zLabelVal:S,text:T,hovertemplateLabels:{zLabel:S,colorLabel:M,"color[0]Label":p[0]+k[0],"color[1]Label":p[1]+k[1],"color[2]Label":p[2]+k[2],"color[3]Label":p[3]+k[3]}})]}}}});var $Ee=ye((lvr,JEe)=>{"use strict";JEe.exports=function(t,r){return"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t.color=r.color,t.colormodel=r.trace.colormodel,t.z||(t.z=r.color),t}});var eke=ye((uvr,QEe)=>{"use strict";QEe.exports={attributes:yH(),supplyDefaults:K3e(),calc:UEe(),plot:HEe(),style:WEe(),hoverPoints:KEe(),eventData:$Ee(),moduleType:"trace",name:"image",basePlotModule:mh(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var rke=ye((cvr,tke)=>{"use strict";tke.exports=eke()});var z2=ye((fvr,nke)=>{"use strict";var _D=Gl(),RCt=Cc().attributes,DCt=ec(),FCt=Ih(),{hovertemplateAttrs:zCt,texttemplateAttrs:qCt,templatefallbackAttrs:ike}=Ll(),$_=Ao().extendFlat,OCt=Pd().pattern,xD=DCt({editType:"plot",arrayOk:!0,colorEditType:"plot"});nke.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:FCt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:OCt,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:$_({},_D.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:zCt({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:ike(),texttemplate:qCt({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:ike({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:$_({},xD,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:$_({},xD,{}),outsidetextfont:$_({},xD,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:$_({},_D.showlegend,{arrayOk:!0}),legend:$_({},_D.legend,{arrayOk:!0}),legendrank:$_({},_D.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:$_({},xD,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:RCt({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"}}});var q2=ye((hvr,ske)=>{"use strict";var BCt=Eo(),qE=Pr(),NCt=z2(),UCt=Cc().defaults,VCt=i0().handleText,GCt=Pr().coercePattern;function ake(e,t){var r=qE.isArrayOrTypedArray(e),n=qE.isArrayOrTypedArray(t),i=Math.min(r?e.length:1/0,n?t.length:1/0);if(isFinite(i)||(i=0),i&&n){for(var a,o=0;o0){a=!0;break}}a||(i=0)}return{hasLabels:r,hasValues:n,len:i}}function oke(e,t,r,n,i){var a=n("marker.line.width");a&&n("marker.line.color",i?void 0:r.paper_bgcolor);var o=n("marker.colors");GCt(n,"marker.pattern",o),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}function HCt(e,t,r,n){function i(k,M){return qE.coerce(e,t,NCt,k,M)}var a=i("labels"),o=i("values"),s=ake(a,o),l=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(i("label0"),i("dlabel")),!l){t.visible=!1;return}t._length=l,oke(e,t,n,i,!0),i("scalegroup");var u=i("text"),c=i("texttemplate");i("texttemplatefallback");var f;if(c||(f=i("textinfo",qE.isArrayOrTypedArray(u)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),c||f&&f!=="none"){var h=i("textposition");VCt(e,t,n,i,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h==="auto",v=d||h==="outside";v&&i("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&i("insidetextorientation")}else f==="none"&&i("textposition","none");UCt(t,n,i);var m=i("hole"),b=i("title.text");if(b){var p=i("title.position",m?"middle center":"top center");!m&&p==="middle center"&&(t.title.position="top center"),qE.coerceFont(i,"title.font",n.font)}i("sort"),i("direction"),i("rotation"),i("pull")}ske.exports={handleLabelsAndValues:ake,handleMarkerDefaults:oke,supplyDefaults:HCt}});var bD=ye((dvr,lke)=>{"use strict";lke.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var cke=ye((vvr,uke)=>{"use strict";var jCt=Pr(),WCt=bD();uke.exports=function(t,r){function n(i,a){return jCt.coerce(t,r,WCt,i,a)}n("hiddenlabels"),n("piecolorway",r.colorway),n("extendpiecolors")}});var CA=ye((pvr,dke)=>{"use strict";var XCt=Eo(),TW=fd(),ZCt=ka(),YCt={};function KCt(e,t){var r=[],n=e._fullLayout,i=n.hiddenlabels||[],a=t.labels,o=t.marker.colors||[],s=t.values,l=t._length,u=t._hasValues&&l,c,f;if(t.dlabel)for(a=new Array(l),c=0;c=0});var T=t.type==="funnelarea"?m:t.sort;return T&&r.sort(function(L,x){return x.v-L.v}),r[0]&&(r[0].vTotal=v),r}function fke(e){return function(r,n){return!r||(r=TW(r),!r.isValid())?!1:(r=ZCt.addOpacity(r,r.getAlpha()),e[n]||(e[n]=r),r)}}function JCt(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,i=e.calcdata,a=n[r+"colorway"],o=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(a=hke(a,YCt));for(var s=0,l=0;l{"use strict";var $Ct=ip().appendArrayMultiPointValues;vke.exports=function(t,r){var n={curveNumber:r.index,pointNumbers:t.pts,data:r._input,fullData:r,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return t.pts.length===1&&(n.pointNumber=n.i=t.pts[0]),$Ct(n,r,t.pts),r.type==="funnelarea"&&(delete n.v,delete n.i),n}});var SD=ye((mvr,zke)=>{"use strict";var Fp=qa(),QCt=Mc(),wD=ef(),bke=ka(),Qy=So(),iv=Pr(),e6t=iv.strScale,gke=iv.strTranslate,AW=Zl(),wke=bv(),t6t=wke.recordMinTextSize,r6t=wke.clearMinTextSize,Tke=A_().TEXTPAD,ns=g_(),TD=pke(),mke=Pr().isValidTextValue;function i6t(e,t){var r=e._context.staticPlot,n=e._fullLayout,i=n._size;r6t("pie",n),Mke(t,e),Rke(t,i);var a=iv.makeTraceGroups(n._pielayer,t,"trace").each(function(o){var s=Fp.select(this),l=o[0],u=l.trace;h6t(o),s.attr("stroke-linejoin","round"),s.each(function(){var c=Fp.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var f=[[[],[]],[[],[]]],h=!1;c.each(function(T,L){if(T.hidden){Fp.select(this).selectAll("path,g").remove();return}T.pointNumber=T.i,T.curveNumber=u.index,f[T.pxmid[1]<0?0:1][T.pxmid[0]<0?0:1].push(T);var x=l.cx,C=l.cy,S=Fp.select(this),g=S.selectAll("path.surface").data([T]);if(g.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),S.call(Ake,e,o),u.pull){var P=+ns.castOption(u.pull,T.pts)||0;P>0&&(x+=P*T.pxmid[0],C+=P*T.pxmid[1])}T.cxFinal=x,T.cyFinal=C;function E(N,H,ie,ae){var _e=ae*(H[0]-N[0]),Ee=ae*(H[1]-N[1]);return"a"+ae*l.r+","+ae*l.r+" 0 "+T.largeArc+(ie?" 1 ":" 0 ")+_e+","+Ee}var z=u.hole;if(T.v===l.vTotal){var q="M"+(x+T.px0[0])+","+(C+T.px0[1])+E(T.px0,T.pxmid,!0,1)+E(T.pxmid,T.px0,!0,1)+"Z";z?g.attr("d","M"+(x+z*T.px0[0])+","+(C+z*T.px0[1])+E(T.px0,T.pxmid,!1,z)+E(T.pxmid,T.px0,!1,z)+"Z"+q):g.attr("d",q)}else{var V=E(T.px0,T.px1,!0,1);if(z){var G=1-z;g.attr("d","M"+(x+z*T.px1[0])+","+(C+z*T.px1[1])+E(T.px1,T.px0,!1,z)+"l"+G*T.px0[0]+","+G*T.px0[1]+V+"Z")}else g.attr("d","M"+x+","+C+"l"+T.px0[0]+","+T.px0[1]+V+"Z")}Dke(e,T,l);var Z=ns.castOption(u.textposition,T.pts),j=S.selectAll("g.slicetext").data(T.text&&Z!=="none"?[0]:[]);j.enter().append("g").classed("slicetext",!0),j.exit().remove(),j.each(function(){var N=iv.ensureSingle(Fp.select(this),"text","",function(re){re.attr("data-notex",1)}),H=iv.ensureUniformFontSize(e,Z==="outside"?a6t(u,T,n.font):Ske(u,T,n.font));N.text(T.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(Qy.font,H).call(AW.convertToTspans,e);var ie=Qy.bBox(N.node()),ae;if(Z==="outside")ae=xke(ie,T);else if(ae=Eke(ie,T,l),Z==="auto"&&ae.scale<1){var _e=iv.ensureUniformFontSize(e,u.outsidetextfont);N.call(Qy.font,_e),ie=Qy.bBox(N.node()),ae=xke(ie,T)}var Ee=ae.textPosAngle,Ce=Ee===void 0?T.pxmid:AD(l.r,Ee);if(ae.targetX=x+Ce[0]*ae.rCenter+(ae.x||0),ae.targetY=C+Ce[1]*ae.rCenter+(ae.y||0),Fke(ae,ie),ae.outside){var ge=ae.targetY;T.yLabelMin=ge-ie.height/2,T.yLabelMid=ge,T.yLabelMax=ge+ie.height/2,T.labelExtraX=0,T.labelExtraY=0,h=!0}ae.fontSize=H.size,t6t(u.type,ae,n),o[L].transform=ae,iv.setTransormAndDisplay(N,ae)})});var d=Fp.select(this).selectAll("g.titletext").data(u.title.text?[0]:[]);if(d.enter().append("g").classed("titletext",!0),d.exit().remove(),d.each(function(){var T=iv.ensureSingle(Fp.select(this),"text","",function(C){C.attr("data-notex",1)}),L=u.title.text;u._meta&&(L=iv.templateString(L,u._meta)),T.text(L).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(Qy.font,u.title.font).call(AW.convertToTspans,e);var x;u.title.position==="middle center"?x=l6t(l):x=Pke(l,i),T.attr("transform",gke(x.x,x.y)+e6t(Math.min(1,x.scale))+gke(x.tx,x.ty))}),h&&c6t(f,u),n6t(c,u),h&&u.automargin){var v=Qy.bBox(s.node()),m=u.domain,b=i.w*(m.x[1]-m.x[0]),p=i.h*(m.y[1]-m.y[0]),k=(.5*b-l.r)/i.w,M=(.5*p-l.r)/i.h;QCt.autoMargin(e,"pie."+u.uid+".automargin",{xl:m.x[0]-k,xr:m.x[1]+k,yb:m.y[0]-M,yt:m.y[1]+M,l:Math.max(l.cx-l.r-v.left,0),r:Math.max(v.right-(l.cx+l.r),0),b:Math.max(v.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-v.top,0),pad:5})}})});setTimeout(function(){a.selectAll("tspan").each(function(){var o=Fp.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function n6t(e,t){e.each(function(r){var n=Fp.select(this);if(!r.labelExtraX&&!r.labelExtraY){n.select("path.textline").remove();return}var i=n.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,iv.setTransormAndDisplay(i,r.transform);var a=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s="M"+a+","+o,l=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var u=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(u)>Math.abs(c)?s+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(a+r.labelExtraX+l):s+="l"+r.labelExtraX+","+u+"v"+(c-u)+"h"+l}else s+="V"+(r.yLabelMid+r.labelExtraY)+"h"+l;iv.ensureSingle(n,"path","textline").call(bke.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function Ake(e,t,r){var n=r[0],i=n.cx,a=n.cy,o=n.trace,s=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),e.on("mouseover",function(l){var u=t._fullLayout,c=t._fullData[o.index];if(!(t._dragging||u.hovermode===!1)){var f=c.hoverinfo;if(Array.isArray(f)&&(f=wD.castHoverinfo({hoverinfo:[ns.castOption(f,l.pts)],_module:o._module},u,0)),f==="all"&&(f="label+text+value+percent+name"),c.hovertemplate||f!=="none"&&f!=="skip"&&f){var h=l.rInscribed||0,d=i+l.pxmid[0]*(1-h),v=a+l.pxmid[1]*(1-h),m=u.separators,b=[];if(f&&f.indexOf("label")!==-1&&b.push(l.label),l.text=ns.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf("text")!==-1){var p=l.text;iv.isValidTextValue(p)&&b.push(p)}l.value=l.v,l.valueLabel=ns.formatPieValue(l.v,m),f&&f.indexOf("value")!==-1&&b.push(l.valueLabel),l.percent=l.v/n.vTotal,l.percentLabel=ns.formatPiePercent(l.percent,m),f&&f.indexOf("percent")!==-1&&b.push(l.percentLabel);var k=c.hoverlabel,M=k.font,T=[];wD.loneHover({trace:o,x0:d-h*n.r,x1:d+h*n.r,y:v,_x0:s?i+l.TL[0]:d-h*n.r,_x1:s?i+l.TR[0]:d+h*n.r,_y0:s?a+l.TL[1]:v-h*n.r,_y1:s?a+l.BL[1]:v+h*n.r,text:b.join("
"),name:c.hovertemplate||f.indexOf("name")!==-1?c.name:void 0,idealAlign:l.pxmid[0]<0?"left":"right",color:ns.castOption(k.bgcolor,l.pts)||l.color,borderColor:ns.castOption(k.bordercolor,l.pts),fontFamily:ns.castOption(M.family,l.pts),fontSize:ns.castOption(M.size,l.pts),fontColor:ns.castOption(M.color,l.pts),nameLength:ns.castOption(k.namelength,l.pts),textAlign:ns.castOption(k.align,l.pts),hovertemplate:ns.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[TD(l,c)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:t,inOut_bbox:T}),l.bbox=T[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[TD(l,c)],event:Fp.event})}}),e.on("mouseout",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=Fp.select(this).datum();o._hasHoverEvent&&(l.originalEvent=Fp.event,t.emit("plotly_unhover",{points:[TD(f,c)],event:Fp.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(wD.loneUnhover(u._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on("click",function(l){var u=t._fullLayout,c=t._fullData[o.index];t._dragging||u.hovermode===!1||(t._hoverdata=[TD(l,c)],wD.click(t,Fp.event))})}function a6t(e,t,r){var n=ns.castOption(e.outsidetextfont.color,t.pts)||ns.castOption(e.textfont.color,t.pts)||r.color,i=ns.castOption(e.outsidetextfont.family,t.pts)||ns.castOption(e.textfont.family,t.pts)||r.family,a=ns.castOption(e.outsidetextfont.size,t.pts)||ns.castOption(e.textfont.size,t.pts)||r.size,o=ns.castOption(e.outsidetextfont.weight,t.pts)||ns.castOption(e.textfont.weight,t.pts)||r.weight,s=ns.castOption(e.outsidetextfont.style,t.pts)||ns.castOption(e.textfont.style,t.pts)||r.style,l=ns.castOption(e.outsidetextfont.variant,t.pts)||ns.castOption(e.textfont.variant,t.pts)||r.variant,u=ns.castOption(e.outsidetextfont.textcase,t.pts)||ns.castOption(e.textfont.textcase,t.pts)||r.textcase,c=ns.castOption(e.outsidetextfont.lineposition,t.pts)||ns.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=ns.castOption(e.outsidetextfont.shadow,t.pts)||ns.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n,family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function Ske(e,t,r){var n=ns.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=ns.castOption(e._input.textfont.color,t.pts));var i=ns.castOption(e.insidetextfont.family,t.pts)||ns.castOption(e.textfont.family,t.pts)||r.family,a=ns.castOption(e.insidetextfont.size,t.pts)||ns.castOption(e.textfont.size,t.pts)||r.size,o=ns.castOption(e.insidetextfont.weight,t.pts)||ns.castOption(e.textfont.weight,t.pts)||r.weight,s=ns.castOption(e.insidetextfont.style,t.pts)||ns.castOption(e.textfont.style,t.pts)||r.style,l=ns.castOption(e.insidetextfont.variant,t.pts)||ns.castOption(e.textfont.variant,t.pts)||r.variant,u=ns.castOption(e.insidetextfont.textcase,t.pts)||ns.castOption(e.textfont.textcase,t.pts)||r.textcase,c=ns.castOption(e.insidetextfont.lineposition,t.pts)||ns.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=ns.castOption(e.insidetextfont.shadow,t.pts)||ns.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||bke.contrast(t.color),family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function Mke(e,t){for(var r,n,i=0;i=-4;k-=2)p(Math.PI*k,"tan");for(k=4;k>=-4;k-=2)p(Math.PI*(k+1),"tan")}if(f||d){for(k=4;k>=-4;k-=2)p(Math.PI*(k+1.5),"rad");for(k=4;k>=-4;k-=2)p(Math.PI*(k+.5),"rad")}}if(s||v||f){var M=Math.sqrt(e.width*e.width+e.height*e.height);if(b={scale:i*n*2/M,rCenter:1-i,rotate:0},b.textPosAngle=(t.startangle+t.stopangle)/2,b.scale>=1)return b;m.push(b)}(v||d)&&(b=yke(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,m.push(b)),(v||h)&&(b=_ke(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,m.push(b));for(var T=0,L=0,x=0;x=1)break}return m[T]}function o6t(e,t){var r=e.startangle,n=e.stopangle;return r>t&&t>n||r0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function l6t(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function Pke(e,t){var r=1,n=1,i,a=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=Ike(a),a.title.position.indexOf("top")!==-1?(o.y-=(1+i)*e.r,s.ty-=e.titleBox.height):a.title.position.indexOf("bottom")!==-1&&(o.y+=(1+i)*e.r);var l=u6t(e.r,e.trace.aspectratio),u=t.w*(a.domain.x[1]-a.domain.x[0])/2;return a.title.position.indexOf("left")!==-1?(u=u+l,o.x-=(1+i)*l,s.tx+=e.titleBox.width/2):a.title.position.indexOf("center")!==-1?u*=2:a.title.position.indexOf("right")!==-1&&(u=u+l,o.x+=(1+i)*l,s.tx-=e.titleBox.width/2),r=u/e.titleBox.width,n=SW(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function u6t(e,t){return e/(t===void 0?1:t)}function SW(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function Ike(e){var t=e.pull;if(!t)return 0;var r;if(iv.isArrayOrTypedArray(t))for(t=0,r=0;rt&&(t=e.pull[r]);return t}function c6t(e,t){var r,n,i,a,o,s,l,u,c,f,h,d,v;function m(M,T){return M.pxmid[1]-T.pxmid[1]}function b(M,T){return T.pxmid[1]-M.pxmid[1]}function p(M,T){T||(T={});var L=T.labelExtraY+(n?T.yLabelMax:T.yLabelMin),x=n?M.yLabelMin:M.yLabelMax,C=n?M.yLabelMax:M.yLabelMin,S=M.cyFinal+o(M.px0[1],M.px1[1]),g=L-x,P,E,z,q,V,G;if(g*l>0&&(M.labelExtraY=g),!!iv.isArrayOrTypedArray(t.pull))for(E=0;E=(ns.castOption(t.pull,z.pts)||0))&&((M.pxmid[1]-z.pxmid[1])*l>0?(q=z.cyFinal+o(z.px0[1],z.px1[1]),g=q-x-M.labelExtraY,g*l>0&&(M.labelExtraY+=g)):(C+M.labelExtraY-S)*l>0&&(P=3*s*Math.abs(E-f.indexOf(M)),V=z.cxFinal+a(z.px0[0],z.px1[0]),G=V+P-(M.cxFinal+M.pxmid[0])-M.labelExtraX,G*s>0&&(M.labelExtraX+=G)))}for(n=0;n<2;n++)for(i=n?m:b,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,u=e[n][r],u.sort(i),c=e[1-n][r],f=c.concat(u),d=[],h=0;h1?(u=r.r,c=u/i.aspectratio):(c=r.r,u=c*i.aspectratio),u*=(1+i.baseratio)/2,l=u*c}o=Math.min(o,l/r.vTotal)}for(n=0;nt.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/t.vTotal,.5),u.ring=1-n.hole,u.rInscribed=s6t(u,t))}function AD(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function Dke(e,t,r){var n=e._fullLayout,i=r.trace,a=i.texttemplate,o=i.textinfo;if(!a&&o&&o!=="none"){var s=o.split("+"),l=function(T){return s.indexOf(T)!==-1},u=l("label"),c=l("text"),f=l("value"),h=l("percent"),d=n.separators,v;if(v=u?[t.label]:[],c){var m=ns.getFirstFilled(i.text,t.pts);mke(m)&&v.push(m)}f&&v.push(ns.formatPieValue(t.v,d)),h&&v.push(ns.formatPiePercent(t.v/r.vTotal,d)),t.text=v.join("
")}function b(T){return{label:T.label,value:T.v,valueLabel:ns.formatPieValue(T.v,n.separators),percent:T.v/r.vTotal,percentLabel:ns.formatPiePercent(T.v/r.vTotal,n.separators),color:T.color,text:T.text,customdata:iv.castOption(i,T.i,"customdata")}}if(a){var p=iv.castOption(i,t.i,"texttemplate");if(!p)t.text="";else{var k=b(t),M=ns.getFirstFilled(i.text,t.pts);(mke(M)||M==="")&&(k.text=M),t.text=iv.texttemplateString({data:[k,i._meta],fallback:i.texttemplatefallback,labels:k,locale:e._fullLayout._d3locale,template:p})}}}function Fke(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*n-o*i,e.textY=a*i+o*n,e.noCenter=!0}zke.exports={plot:i6t,formatSliceLabel:Dke,transformInsideText:Eke,determineInsideTextFont:Ske,positionTitleOutside:Pke,prerenderTitles:Mke,layoutAreas:Rke,attachFxHandlers:Ake,computeTransform:Fke}});var Bke=ye((yvr,Oke)=>{"use strict";var qke=qa(),d6t=Y3(),v6t=bv().resizeText;Oke.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");v6t(t,r,"pie"),r.each(function(n){var i=n[0],a=i.trace,o=qke.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){qke.select(this).call(d6t,s,a,t)})})}});var Uke=ye(LA=>{"use strict";var Nke=Mc();LA.name="pie";LA.plot=function(e,t,r,n){Nke.plotBasePlot(LA.name,e,t,r,n)};LA.clean=function(e,t,r,n){Nke.cleanBasePlot(LA.name,e,t,r,n)}});var Gke=ye((xvr,Vke)=>{"use strict";Vke.exports={attributes:z2(),supplyDefaults:q2().supplyDefaults,supplyLayoutDefaults:cke(),layoutAttributes:bD(),calc:CA().calc,crossTraceCalc:CA().crossTraceCalc,plot:SD().plot,style:Bke(),styleOne:Y3(),moduleType:"trace",name:"pie",basePlotModule:Uke(),categories:["pie-like","pie","showLegend"],meta:{}}});var jke=ye((bvr,Hke)=>{"use strict";Hke.exports=Gke()});var Xke=ye(PA=>{"use strict";var Wke=Mc();PA.name="sunburst";PA.plot=function(e,t,r,n){Wke.plotBasePlot(PA.name,e,t,r,n)};PA.clean=function(e,t,r,n){Wke.cleanBasePlot(PA.name,e,t,r,n)}});var MW=ye((Tvr,Zke)=>{"use strict";Zke.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var BE=ye((Avr,Jke)=>{"use strict";var p6t=Gl(),{hovertemplateAttrs:g6t,texttemplateAttrs:m6t,templatefallbackAttrs:Yke}=Ll(),y6t=Tu(),_6t=Cc().attributes,e1=z2(),Kke=MW(),OE=Ao().extendFlat,x6t=Pd().pattern;Jke.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:OE({colors:{valType:"data_array",editType:"calc"},line:{color:OE({},e1.marker.line.color,{dflt:null}),width:OE({},e1.marker.line.width,{dflt:1}),editType:"calc"},pattern:x6t,editType:"calc"},y6t("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:e1.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:m6t({editType:"plot"},{keys:Kke.eventDataKeys.concat(["label","value"])}),texttemplatefallback:Yke({editType:"plot"}),hovertext:e1.hovertext,hoverinfo:OE({},p6t.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:g6t({},{keys:Kke.eventDataKeys}),hovertemplatefallback:Yke(),textfont:e1.textfont,insidetextorientation:e1.insidetextorientation,insidetextfont:e1.insidetextfont,outsidetextfont:OE({},e1.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:e1.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:_6t({name:"sunburst",trace:!0,editType:"calc"})}});var EW=ye((Svr,$ke)=>{"use strict";$ke.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var rCe=ye((Mvr,tCe)=>{"use strict";var Qke=Pr(),b6t=BE(),w6t=Cc().defaults,T6t=i0().handleText,A6t=q2().handleMarkerDefaults,eCe=tc(),S6t=eCe.hasColorscale,M6t=eCe.handleDefaults;tCe.exports=function(t,r,n,i){function a(h,d){return Qke.coerce(t,r,b6t,h,d)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),A6t(t,r,i,a);var u=r._hasColorscale=S6t(t,"marker","colors")||(t.marker||{}).coloraxis;u&&M6t(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",u?1:.7);var c=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",Qke.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f="auto";T6t(t,r,i,a,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("insidetextorientation"),a("sort"),a("rotation"),a("root.color"),w6t(r,i,a),r._length=null}});var nCe=ye((Evr,iCe)=>{"use strict";var E6t=Pr(),k6t=EW();iCe.exports=function(t,r){function n(i,a){return E6t.coerce(t,r,k6t,i,a)}n("sunburstcolorway",r.colorway),n("extendsunburstcolors")}});var NE=ye((MD,aCe)=>{(function(e,t){typeof MD=="object"&&typeof aCe!="undefined"?t(MD):(e=e||self,t(e.d3=e.d3||{}))})(MD,function(e){"use strict";function t(We,et){return We.parent===et.parent?1:2}function r(We){return We.reduce(n,0)/We.length}function n(We,et){return We+et.x}function i(We){return 1+We.reduce(a,0)}function a(We,et){return Math.max(We,et.y)}function o(We){for(var et;et=We.children;)We=et[0];return We}function s(We){for(var et;et=We.children;)We=et[et.length-1];return We}function l(){var We=t,et=1,xt=1,At=!1;function Kt(Qt){var Mr,Gr=0;Qt.eachAfter(function(ai){var mi=ai.children;mi?(ai.x=r(mi),ai.y=i(mi)):(ai.x=Mr?Gr+=We(ai,Mr):0,ai.y=0,Mr=ai)});var Ir=o(Qt),Yr=s(Qt),_i=Ir.x-We(Ir,Yr)/2,Pi=Yr.x+We(Yr,Ir)/2;return Qt.eachAfter(At?function(ai){ai.x=(ai.x-Qt.x)*et,ai.y=(Qt.y-ai.y)*xt}:function(ai){ai.x=(ai.x-_i)/(Pi-_i)*et,ai.y=(1-(Qt.y?ai.y/Qt.y:1))*xt})}return Kt.separation=function(Qt){return arguments.length?(We=Qt,Kt):We},Kt.size=function(Qt){return arguments.length?(At=!1,et=+Qt[0],xt=+Qt[1],Kt):At?null:[et,xt]},Kt.nodeSize=function(Qt){return arguments.length?(At=!0,et=+Qt[0],xt=+Qt[1],Kt):At?[et,xt]:null},Kt}function u(We){var et=0,xt=We.children,At=xt&&xt.length;if(!At)et=1;else for(;--At>=0;)et+=xt[At].value;We.value=et}function c(){return this.eachAfter(u)}function f(We){var et=this,xt,At=[et],Kt,Qt,Mr;do for(xt=At.reverse(),At=[];et=xt.pop();)if(We(et),Kt=et.children,Kt)for(Qt=0,Mr=Kt.length;Qt=0;--Kt)xt.push(At[Kt]);return this}function d(We){for(var et=this,xt=[et],At=[],Kt,Qt,Mr;et=xt.pop();)if(At.push(et),Kt=et.children,Kt)for(Qt=0,Mr=Kt.length;Qt=0;)xt+=At[Kt].value;et.value=xt})}function m(We){return this.eachBefore(function(et){et.children&&et.children.sort(We)})}function b(We){for(var et=this,xt=p(et,We),At=[et];et!==xt;)et=et.parent,At.push(et);for(var Kt=At.length;We!==xt;)At.splice(Kt,0,We),We=We.parent;return At}function p(We,et){if(We===et)return We;var xt=We.ancestors(),At=et.ancestors(),Kt=null;for(We=xt.pop(),et=At.pop();We===et;)Kt=We,We=xt.pop(),et=At.pop();return Kt}function k(){for(var We=this,et=[We];We=We.parent;)et.push(We);return et}function M(){var We=[];return this.each(function(et){We.push(et)}),We}function T(){var We=[];return this.eachBefore(function(et){et.children||We.push(et)}),We}function L(){var We=this,et=[];return We.each(function(xt){xt!==We&&et.push({source:xt.parent,target:xt})}),et}function x(We,et){var xt=new E(We),At=+We.value&&(xt.value=We.value),Kt,Qt=[xt],Mr,Gr,Ir,Yr;for(et==null&&(et=S);Kt=Qt.pop();)if(At&&(Kt.value=+Kt.data.value),(Gr=et(Kt.data))&&(Yr=Gr.length))for(Kt.children=new Array(Yr),Ir=Yr-1;Ir>=0;--Ir)Qt.push(Mr=Kt.children[Ir]=new E(Gr[Ir])),Mr.parent=Kt,Mr.depth=Kt.depth+1;return xt.eachBefore(P)}function C(){return x(this).eachBefore(g)}function S(We){return We.children}function g(We){We.data=We.data.data}function P(We){var et=0;do We.height=et;while((We=We.parent)&&We.height<++et)}function E(We){this.data=We,this.depth=this.height=0,this.parent=null}E.prototype=x.prototype={constructor:E,count:c,each:f,eachAfter:d,eachBefore:h,sum:v,sort:m,path:b,ancestors:k,descendants:M,leaves:T,links:L,copy:C};var z=Array.prototype.slice;function q(We){for(var et=We.length,xt,At;et;)At=Math.random()*et--|0,xt=We[et],We[et]=We[At],We[At]=xt;return We}function V(We){for(var et=0,xt=(We=q(z.call(We))).length,At=[],Kt,Qt;et0&&xt*xt>At*At+Kt*Kt}function N(We,et){for(var xt=0;xtIr?(Kt=(Yr+Ir-Qt)/(2*Yr),Gr=Math.sqrt(Math.max(0,Ir/Yr-Kt*Kt)),xt.x=We.x-Kt*At-Gr*Mr,xt.y=We.y-Kt*Mr+Gr*At):(Kt=(Yr+Qt-Ir)/(2*Yr),Gr=Math.sqrt(Math.max(0,Qt/Yr-Kt*Kt)),xt.x=et.x+Kt*At-Gr*Mr,xt.y=et.y+Kt*Mr+Gr*At)):(xt.x=et.x+xt.r,xt.y=et.y)}function Ce(We,et){var xt=We.r+et.r-1e-6,At=et.x-We.x,Kt=et.y-We.y;return xt>0&&xt*xt>At*At+Kt*Kt}function ge(We){var et=We._,xt=We.next._,At=et.r+xt.r,Kt=(et.x*xt.r+xt.x*et.r)/At,Qt=(et.y*xt.r+xt.y*et.r)/At;return Kt*Kt+Qt*Qt}function re(We){this._=We,this.next=null,this.previous=null}function Se(We){if(!(Kt=We.length))return 0;var et,xt,At,Kt,Qt,Mr,Gr,Ir,Yr,_i,Pi;if(et=We[0],et.x=0,et.y=0,!(Kt>1))return et.r;if(xt=We[1],et.x=-xt.r,xt.x=et.r,xt.y=0,!(Kt>2))return et.r+xt.r;Ee(xt,et,At=We[2]),et=new re(et),xt=new re(xt),At=new re(At),et.next=At.previous=xt,xt.next=et.previous=At,At.next=xt.previous=et;e:for(Gr=3;Gr0)throw new Error("cycle");return Gr}return xt.id=function(At){return arguments.length?(We=Be(At),xt):We},xt.parentId=function(At){return arguments.length?(et=Be(At),xt):et},xt}function Ae(We,et){return We.parent===et.parent?1:2}function rt(We){var et=We.children;return et?et[0]:We.t}function St(We){var et=We.children;return et?et[et.length-1]:We.t}function Tt(We,et,xt){var At=xt/(et.i-We.i);et.c-=At,et.s+=xt,We.c+=At,et.z+=xt,et.m+=xt}function dt(We){for(var et=0,xt=0,At=We.children,Kt=At.length,Qt;--Kt>=0;)Qt=At[Kt],Qt.z+=et,Qt.m+=et,et+=Qt.s+(xt+=Qt.c)}function Et(We,et,xt){return We.a.parent===et.parent?We.a:xt}function pt(We,et){this._=We,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=et}pt.prototype=Object.create(E.prototype);function jt(We){for(var et=new pt(We,0),xt,At=[et],Kt,Qt,Mr,Gr;xt=At.pop();)if(Qt=xt._.children)for(xt.children=new Array(Gr=Qt.length),Mr=Gr-1;Mr>=0;--Mr)At.push(Kt=xt.children[Mr]=new pt(Qt[Mr],Mr)),Kt.parent=xt;return(et.parent=new pt(null,0)).children=[et],et}function or(){var We=Ae,et=1,xt=1,At=null;function Kt(Yr){var _i=jt(Yr);if(_i.eachAfter(Qt),_i.parent.m=-_i.z,_i.eachBefore(Mr),At)Yr.eachBefore(Ir);else{var Pi=Yr,ai=Yr,mi=Yr;Yr.eachBefore(function(Qn){Qn.xai.x&&(ai=Qn),Qn.depth>mi.depth&&(mi=Qn)});var un=Pi===ai?1:We(Pi,ai)/2,Fn=un-Pi.x,An=et/(ai.x+un+Fn),Hn=xt/(mi.depth||1);Yr.eachBefore(function(Qn){Qn.x=(Qn.x+Fn)*An,Qn.y=Qn.depth*Hn})}return Yr}function Qt(Yr){var _i=Yr.children,Pi=Yr.parent.children,ai=Yr.i?Pi[Yr.i-1]:null;if(_i){dt(Yr);var mi=(_i[0].z+_i[_i.length-1].z)/2;ai?(Yr.z=ai.z+We(Yr._,ai._),Yr.m=Yr.z-mi):Yr.z=mi}else ai&&(Yr.z=ai.z+We(Yr._,ai._));Yr.parent.A=Gr(Yr,ai,Yr.parent.A||Pi[0])}function Mr(Yr){Yr._.x=Yr.z+Yr.parent.m,Yr.m+=Yr.parent.m}function Gr(Yr,_i,Pi){if(_i){for(var ai=Yr,mi=Yr,un=_i,Fn=ai.parent.children[0],An=ai.m,Hn=mi.m,Qn=un.m,Vi=Fn.m,Kn;un=St(un),ai=rt(ai),un&&ai;)Fn=rt(Fn),mi=St(mi),mi.a=Yr,Kn=un.z+Qn-ai.z-An+We(un._,ai._),Kn>0&&(Tt(Et(un,Yr,Pi),Yr,Kn),An+=Kn,Hn+=Kn),Qn+=un.m,An+=ai.m,Vi+=Fn.m,Hn+=mi.m;un&&!St(mi)&&(mi.t=un,mi.m+=Qn-Hn),ai&&!rt(Fn)&&(Fn.t=ai,Fn.m+=An-Vi,Pi=Yr)}return Pi}function Ir(Yr){Yr.x*=et,Yr.y=Yr.depth*xt}return Kt.separation=function(Yr){return arguments.length?(We=Yr,Kt):We},Kt.size=function(Yr){return arguments.length?(At=!1,et=+Yr[0],xt=+Yr[1],Kt):At?null:[et,xt]},Kt.nodeSize=function(Yr){return arguments.length?(At=!0,et=+Yr[0],xt=+Yr[1],Kt):At?[et,xt]:null},Kt}function mr(We,et,xt,At,Kt){for(var Qt=We.children,Mr,Gr=-1,Ir=Qt.length,Yr=We.value&&(Kt-xt)/We.value;++GrQn&&(Qn=Yr),Gt=An*An*Jn,Vi=Math.max(Qn/Gt,Gt/Hn),Vi>Kn){An-=Yr;break}Kn=Vi}Mr.push(Ir={value:An,dice:mi1?At:1)},xt}(Ar);function jr(){var We=qr,et=!1,xt=1,At=1,Kt=[0],Qt=Le,Mr=Le,Gr=Le,Ir=Le,Yr=Le;function _i(ai){return ai.x0=ai.y0=0,ai.x1=xt,ai.y1=At,ai.eachBefore(Pi),Kt=[0],et&&ai.eachBefore(Ht),ai}function Pi(ai){var mi=Kt[ai.depth],un=ai.x0+mi,Fn=ai.y0+mi,An=ai.x1-mi,Hn=ai.y1-mi;An=ai-1){var Qn=Qt[Pi];Qn.x0=un,Qn.y0=Fn,Qn.x1=An,Qn.y1=Hn;return}for(var Vi=Yr[Pi],Kn=mi/2+Vi,Jn=Pi+1,Gt=ai-1;Jn>>1;Yr[wt]Hn-Fn){var wr=(un*ir+An*tr)/mi;_i(Pi,Jn,tr,un,Fn,wr,Hn),_i(Jn,ai,ir,wr,Fn,An,Hn)}else{var Xr=(Fn*ir+Hn*tr)/mi;_i(Pi,Jn,tr,un,Fn,An,Xr),_i(Jn,ai,ir,un,Xr,An,Hn)}}}function Ge(We,et,xt,At,Kt){(We.depth&1?mr:at)(We,et,xt,At,Kt)}var Je=function We(et){function xt(At,Kt,Qt,Mr,Gr){if((Ir=At._squarify)&&Ir.ratio===et)for(var Ir,Yr,_i,Pi,ai=-1,mi,un=Ir.length,Fn=At.value;++ai1?At:1)},xt}(Ar);e.cluster=l,e.hierarchy=x,e.pack=ce,e.packEnclose=V,e.packSiblings=ke,e.partition=ct,e.stratify=Ue,e.tree=or,e.treemap=jr,e.treemapBinary=gt,e.treemapDice=at,e.treemapResquarify=Je,e.treemapSlice=mr,e.treemapSliceDice=Ge,e.treemapSquarify=qr,Object.defineProperty(e,"__esModule",{value:!0})})});var VE=ye(UE=>{"use strict";var oCe=NE(),C6t=Eo(),IA=Pr(),L6t=tc().makeColorScaleFuncFromTrace,P6t=CA().makePullColorFn,I6t=CA().generateExtendedColors,R6t=tc().calc,D6t=fs().ALMOST_EQUAL,F6t={},z6t={},q6t={};UE.calc=function(e,t){var r=e._fullLayout,n=t.ids,i=IA.isArrayOrTypedArray(n),a=t.labels,o=t.parents,s=t.values,l=IA.isArrayOrTypedArray(s),u=[],c={},f={},h=function(j,N){c[j]?c[j].push(N):c[j]=[N],f[N]=1},d=function(j){return j||typeof j=="number"},v=function(j){return!l||C6t(s[j])&&s[j]>=0},m,b,p;i?(m=Math.min(n.length,o.length),b=function(j){return d(n[j])&&v(j)},p=function(j){return String(n[j])}):(m=Math.min(a.length,o.length),b=function(j){return d(a[j])&&v(j)},p=function(j){return String(a[j])}),l&&(m=Math.min(m,s.length));for(var k=0;k1){for(var S=IA.randstr(),g=0;g{});function Km(){}function uCe(){return this.rgb().formatHex()}function j6t(){return this.rgb().formatHex8()}function W6t(){return gCe(this).formatHsl()}function cCe(){return this.rgb().formatRgb()}function tx(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=O6t.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?fCe(t):r===3?new _d(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?kD(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?kD(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=B6t.exec(e))?new _d(t[1],t[2],t[3],1):(t=N6t.exec(e))?new _d(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=U6t.exec(e))?kD(t[1],t[2],t[3],t[4]):(t=V6t.exec(e))?kD(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=G6t.exec(e))?vCe(t[1],t[2]/100,t[3]/100,1):(t=H6t.exec(e))?vCe(t[1],t[2]/100,t[3]/100,t[4]):lCe.hasOwnProperty(e)?fCe(lCe[e]):e==="transparent"?new _d(NaN,NaN,NaN,0):null}function fCe(e){return new _d(e>>16&255,e>>8&255,e&255,1)}function kD(e,t,r,n){return n<=0&&(e=t=r=NaN),new _d(e,t,r,n)}function HE(e){return e instanceof Km||(e=tx(e)),e?(e=e.rgb(),new _d(e.r,e.g,e.b,e.opacity)):new _d}function DA(e,t,r,n){return arguments.length===1?HE(e):new _d(e,t,r,n==null?1:n)}function _d(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function hCe(){return`#${O2(this.r)}${O2(this.g)}${O2(this.b)}`}function X6t(){return`#${O2(this.r)}${O2(this.g)}${O2(this.b)}${O2((isNaN(this.opacity)?1:this.opacity)*255)}`}function dCe(){let e=LD(this.opacity);return`${e===1?"rgb(":"rgba("}${B2(this.r)}, ${B2(this.g)}, ${B2(this.b)}${e===1?")":`, ${e})`}`}function LD(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function B2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function O2(e){return e=B2(e),(e<16?"0":"")+e.toString(16)}function vCe(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Kg(e,t,r,n)}function gCe(e){if(e instanceof Kg)return new Kg(e.h,e.s,e.l,e.opacity);if(e instanceof Km||(e=tx(e)),!e)return new Kg;if(e instanceof Kg)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r0&&l<1?0:o,new Kg(o,s,l,e.opacity)}function jE(e,t,r,n){return arguments.length===1?gCe(e):new Kg(e,t,r,n==null?1:n)}function Kg(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function pCe(e){return e=(e||0)%360,e<0?e+360:e}function CD(e){return Math.max(0,Math.min(1,e||0))}function kW(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var ex,N2,RA,GE,Ym,O6t,B6t,N6t,U6t,V6t,G6t,H6t,lCe,PD=gu(()=>{ED();ex=.7,N2=1/ex,RA="\\s*([+-]?\\d+)\\s*",GE="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ym="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",O6t=/^#([0-9a-f]{3,8})$/,B6t=new RegExp(`^rgb\\(${RA},${RA},${RA}\\)$`),N6t=new RegExp(`^rgb\\(${Ym},${Ym},${Ym}\\)$`),U6t=new RegExp(`^rgba\\(${RA},${RA},${RA},${GE}\\)$`),V6t=new RegExp(`^rgba\\(${Ym},${Ym},${Ym},${GE}\\)$`),G6t=new RegExp(`^hsl\\(${GE},${Ym},${Ym}\\)$`),H6t=new RegExp(`^hsla\\(${GE},${Ym},${Ym},${GE}\\)$`),lCe={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};t1(Km,tx,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:uCe,formatHex:uCe,formatHex8:j6t,formatHsl:W6t,formatRgb:cCe,toString:cCe});t1(_d,DA,Q_(Km,{brighter(e){return e=e==null?N2:Math.pow(N2,e),new _d(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ex:Math.pow(ex,e),new _d(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _d(B2(this.r),B2(this.g),B2(this.b),LD(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:hCe,formatHex:hCe,formatHex8:X6t,formatRgb:dCe,toString:dCe}));t1(Kg,jE,Q_(Km,{brighter(e){return e=e==null?N2:Math.pow(N2,e),new Kg(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ex:Math.pow(ex,e),new Kg(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new _d(kW(e>=240?e-240:e+120,i,n),kW(e,i,n),kW(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Kg(pCe(this.h),CD(this.s),CD(this.l),LD(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=LD(this.opacity);return`${e===1?"hsl(":"hsla("}${pCe(this.h)}, ${CD(this.s)*100}%, ${CD(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var ID,RD,CW=gu(()=>{ID=Math.PI/180,RD=180/Math.PI});function wCe(e){if(e instanceof Jm)return new Jm(e.l,e.a,e.b,e.opacity);if(e instanceof r1)return TCe(e);e instanceof _d||(e=HE(e));var t=RW(e.r),r=RW(e.g),n=RW(e.b),i=LW((.2225045*t+.7168786*r+.0606169*n)/yCe),a,o;return t===r&&r===n?a=o=i:(a=LW((.4360747*t+.3850649*r+.1430804*n)/mCe),o=LW((.0139322*t+.0971045*r+.7141733*n)/_Ce)),new Jm(116*i-16,500*(a-i),200*(i-o),e.opacity)}function zA(e,t,r,n){return arguments.length===1?wCe(e):new Jm(e,t,r,n==null?1:n)}function Jm(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function LW(e){return e>Z6t?Math.pow(e,1/3):e/bCe+xCe}function PW(e){return e>FA?e*e*e:bCe*(e-xCe)}function IW(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function RW(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Y6t(e){if(e instanceof r1)return new r1(e.h,e.c,e.l,e.opacity);if(e instanceof Jm||(e=wCe(e)),e.a===0&&e.b===0)return new r1(NaN,0{ED();PD();CW();DD=18,mCe=.96422,yCe=1,_Ce=.82521,xCe=4/29,FA=6/29,bCe=3*FA*FA,Z6t=FA*FA*FA;t1(Jm,zA,Q_(Km,{brighter(e){return new Jm(this.l+DD*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new Jm(this.l-DD*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=mCe*PW(t),e=yCe*PW(e),r=_Ce*PW(r),new _d(IW(3.1338561*t-1.6168667*e-.4906146*r),IW(-.9787684*t+1.9161415*e+.033454*r),IW(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));t1(r1,WE,Q_(Km,{brighter(e){return new r1(this.h,this.c,this.l+DD*(e==null?1:e),this.opacity)},darker(e){return new r1(this.h,this.c,this.l-DD*(e==null?1:e),this.opacity)},rgb(){return TCe(this).rgb()}}))});function K6t(e){if(e instanceof U2)return new U2(e.h,e.s,e.l,e.opacity);e instanceof _d||(e=HE(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(ECe*n+SCe*t-MCe*r)/(ECe+SCe-MCe),a=n-i,o=(XE*(r-i)-FW*a)/FD,s=Math.sqrt(o*o+a*a)/(XE*i*(1-i)),l=s?Math.atan2(o,a)*RD-120:NaN;return new U2(l<0?l+360:l,s,i,e.opacity)}function qA(e,t,r,n){return arguments.length===1?K6t(e):new U2(e,t,r,n==null?1:n)}function U2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var kCe,DW,FW,FD,XE,SCe,MCe,ECe,CCe=gu(()=>{ED();PD();CW();kCe=-.14861,DW=1.78277,FW=-.29227,FD=-.90649,XE=1.97294,SCe=XE*FD,MCe=XE*DW,ECe=DW*FW-FD*kCe;t1(U2,qA,Q_(Km,{brighter(e){return e=e==null?N2:Math.pow(N2,e),new U2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ex:Math.pow(ex,e),new U2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*ID,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new _d(255*(t+r*(kCe*n+DW*i)),255*(t+r*(FW*n+FD*i)),255*(t+r*(XE*n)),this.opacity)}}))});var V2=gu(()=>{PD();ACe();CCe()});function zW(e,t,r,n,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*r+(1+3*e+3*a-3*o)*n+o*i)/6}function zD(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],o=n>0?e[n-1]:2*i-a,s=n{});function OD(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],a=e[n%t],o=e[(n+1)%t],s=e[(n+2)%t];return zW((r-n/t)*t,i,a,o,s)}}var qW=gu(()=>{qD()});var OA,OW=gu(()=>{OA=e=>()=>e});function LCe(e,t){return function(r){return e+r*t}}function J6t(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function rx(e,t){var r=t-e;return r?LCe(e,r>180||r<-180?r-360*Math.round(r/360):r):OA(isNaN(e)?t:e)}function PCe(e){return(e=+e)==1?$f:function(t,r){return r-t?J6t(t,r,e):OA(isNaN(t)?r:t)}}function $f(e,t){var r=t-e;return r?LCe(e,r):OA(isNaN(e)?t:e)}var G2=gu(()=>{OW()});function ICe(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),o,s;for(o=0;o{V2();qD();qW();G2();ZE=function e(t){var r=PCe(t);function n(i,a){var o=r((i=DA(i)).r,(a=DA(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=$f(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return n.gamma=e,n}(1);RCe=ICe(zD),DCe=ICe(OD)});function BA(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i{});function FCe(e,t){return(BD(t)?BA:NW)(e,t)}function NW(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o{YE();ND()});function UD(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var VW=gu(()=>{});function zp(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var KE=gu(()=>{});function VD(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=ix(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var GW=gu(()=>{YE()});function $6t(e){return function(){return e}}function Q6t(e){return function(t){return e(t)+""}}function GD(e,t){var r=jW.lastIndex=HW.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=jW.exec(e))&&(i=HW.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:zp(n,i)})),r=HW.lastIndex;return r{KE();jW=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,HW=new RegExp(jW.source,"g")});function ix(e,t){var r=typeof t,n;return t==null||r==="boolean"?OA(t):(r==="number"?zp:r==="string"?(n=tx(t))?(t=n,ZE):GD:t instanceof tx?ZE:t instanceof Date?UD:BD(t)?BA:Array.isArray(t)?NW:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?VD:zp)(e,t)}var YE=gu(()=>{V2();BW();UW();VW();KE();GW();WW();OW();ND()});function zCe(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var qCe=gu(()=>{});function OCe(e,t){var r=rx(+e,+t);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}var BCe=gu(()=>{G2()});function NCe(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var UCe=gu(()=>{});function XW(e,t,r,n,i,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n{VCe=180/Math.PI,HD={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function HCe(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?HD:XW(t.a,t.b,t.c,t.d,t.e,t.f)}function jCe(e){return e==null?HD:(jD||(jD=document.createElementNS("http://www.w3.org/2000/svg","g")),jD.setAttribute("transform",e),(e=jD.transform.baseVal.consolidate())?(e=e.matrix,XW(e.a,e.b,e.c,e.d,e.e,e.f)):HD)}var jD,WCe=gu(()=>{GCe()});function XCe(e,t,r,n){function i(u){return u.length?u.pop()+" ":""}function a(u,c,f,h,d,v){if(u!==f||c!==h){var m=d.push("translate(",null,t,null,r);v.push({i:m-4,x:zp(u,f)},{i:m-2,x:zp(c,h)})}else(f||h)&&d.push("translate("+f+t+h+r)}function o(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,n)-2,x:zp(u,c)})):c&&f.push(i(f)+"rotate("+c+n)}function s(u,c,f,h){u!==c?h.push({i:f.push(i(f)+"skewX(",null,n)-2,x:zp(u,c)}):c&&f.push(i(f)+"skewX("+c+n)}function l(u,c,f,h,d,v){if(u!==f||c!==h){var m=d.push(i(d)+"scale(",null,",",null,")");v.push({i:m-4,x:zp(u,f)},{i:m-2,x:zp(c,h)})}else(f!==1||h!==1)&&d.push(i(d)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,f,h),o(u.rotate,c.rotate,f,h),s(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(d){for(var v=-1,m=h.length,b;++v{KE();WCe();ZCe=XCe(HCe,"px, ","px)","deg)"),YCe=XCe(jCe,", ",")",")")});function JCe(e){return((e=Math.exp(e))+1/e)/2}function tLt(e){return((e=Math.exp(e))-1/e)/2}function rLt(e){return((e=Math.exp(2*e))-1)/(e+1)}var eLt,$Ce,QCe=gu(()=>{eLt=1e-12;$Ce=function e(t,r,n){function i(a,o){var s=a[0],l=a[1],u=a[2],c=o[0],f=o[1],h=o[2],d=c-s,v=f-l,m=d*d+v*v,b,p;if(m{V2();G2();t6e=e6e(rx),r6e=e6e($f)});function ZW(e,t){var r=$f((e=zA(e)).l,(t=zA(t)).l),n=$f(e.a,t.a),i=$f(e.b,t.b),a=$f(e.opacity,t.opacity);return function(o){return e.l=r(o),e.a=n(o),e.b=i(o),e.opacity=a(o),e+""}}var n6e=gu(()=>{V2();G2()});function a6e(e){return function(t,r){var n=e((t=WE(t)).h,(r=WE(r)).h),i=$f(t.c,r.c),a=$f(t.l,r.l),o=$f(t.opacity,r.opacity);return function(s){return t.h=n(s),t.c=i(s),t.l=a(s),t.opacity=o(s),t+""}}}var o6e,s6e,l6e=gu(()=>{V2();G2();o6e=a6e(rx),s6e=a6e($f)});function u6e(e){return function t(r){r=+r;function n(i,a){var o=e((i=qA(i)).h,(a=qA(a)).h),s=$f(i.s,a.s),l=$f(i.l,a.l),u=$f(i.opacity,a.opacity);return function(c){return i.h=o(c),i.s=s(c),i.l=l(Math.pow(c,r)),i.opacity=u(c),i+""}}return n.gamma=t,n}(1)}var c6e,f6e,h6e=gu(()=>{V2();G2();c6e=u6e(rx),f6e=u6e($f)});function YW(e,t){t===void 0&&(t=e,e=ix);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r{YE()});function v6e(e,t){for(var r=new Array(t),n=0;n{});var H2={};yee(H2,{interpolate:()=>ix,interpolateArray:()=>FCe,interpolateBasis:()=>zD,interpolateBasisClosed:()=>OD,interpolateCubehelix:()=>c6e,interpolateCubehelixLong:()=>f6e,interpolateDate:()=>UD,interpolateDiscrete:()=>zCe,interpolateHcl:()=>o6e,interpolateHclLong:()=>s6e,interpolateHsl:()=>t6e,interpolateHslLong:()=>r6e,interpolateHue:()=>OCe,interpolateLab:()=>ZW,interpolateNumber:()=>zp,interpolateNumberArray:()=>BA,interpolateObject:()=>VD,interpolateRgb:()=>ZE,interpolateRgbBasis:()=>RCe,interpolateRgbBasisClosed:()=>DCe,interpolateRound:()=>NCe,interpolateString:()=>GD,interpolateTransformCss:()=>ZCe,interpolateTransformSvg:()=>YCe,interpolateZoom:()=>$Ce,piecewise:()=>YW,quantize:()=>v6e});var j2=gu(()=>{YE();UW();qD();qW();VW();qCe();BCe();KE();ND();GW();UCe();WW();KCe();QCe();BW();i6e();n6e();l6e();h6e();d6e();p6e()});var WD=ye((m0r,g6e)=>{"use strict";var iLt=So(),nLt=ka();g6e.exports=function(t,r,n,i,a){var o=r.data.data,s=o.i,l=a||o.color;if(s>=0){r.i=o.i;var u=n.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=l,r.color=l):(u.color=l,r.color=l),iLt.pointStyle(t,n,i,r)}else nLt.fill(t,l)}});var KW=ye((y0r,b6e)=>{"use strict";var m6e=qa(),y6e=ka(),_6e=Pr(),aLt=bv().resizeText,oLt=WD();function sLt(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");aLt(e,t,"sunburst"),t.each(function(r){var n=m6e.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){m6e.select(this).call(x6e,o,a,e)})})}function x6e(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=_6e.castOption(r,o,"marker.line.color")||y6e.defaultLine,l=_6e.castOption(r,o,"marker.line.width")||0;e.call(oLt,t,r,n).style("stroke-width",l).call(y6e.stroke,s).style("opacity",a?r.leaf.opacity:null)}b6e.exports={style:sLt,styleOne:x6e}});var i1=ye(Bs=>{"use strict";var W2=Pr(),lLt=ka(),uLt=Eg(),w6e=g_();Bs.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(n){if(Bs.getPtId(n)===t)return r=n.copy()}),r||e};Bs.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(n){for(var i=n.children||[],a=0;a0)};Bs.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};Bs.isHeader=function(e,t){return!(Bs.isLeaf(e)||e.depth===t._maxDepth-1)};function T6e(e){return e.data.data.pid}Bs.getParent=function(e,t){return Bs.findEntryWithLevel(e,T6e(t))};Bs.listPath=function(e,t){var r=e.parent;if(!r)return[];var n=t?[r.data[t]]:[r];return Bs.listPath(r,t).concat(n)};Bs.getPath=function(e){return Bs.listPath(e,"label").join("/")+"/"};Bs.formatValue=w6e.formatPieValue;Bs.formatPercent=function(e,t){var r=W2.formatPercent(e,0);return r==="0%"&&(r=w6e.formatPiePercent(e,t)),r}});var QE=ye((x0r,M6e)=>{"use strict";var NA=qa(),A6e=Oa(),hLt=ip().appendArrayPointValue,JE=ef(),S6e=Pr(),dLt=L3(),id=i1(),vLt=g_(),pLt=vLt.formatPieValue;M6e.exports=function(t,r,n,i,a){var o=i[0],s=o.trace,l=o.hierarchy,u=s.type==="sunburst",c=s.type==="treemap"||s.type==="icicle";"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1);var f=function(v){var m=n._fullLayout;if(!(n._dragging||m.hovermode===!1)){var b=n._fullData[s.index],p=v.data.data,k=p.i,M=id.isHierarchyRoot(v),T=id.getParent(l,v),L=id.getValue(v),x=function(Ee){return S6e.castOption(b,k,Ee)},C=x("hovertemplate"),S=JE.castHoverinfo(b,m,k),g=m.separators,P;if(C||S&&S!=="none"&&S!=="skip"){var E,z;u&&(E=o.cx+v.pxmid[0]*(1-v.rInscribed),z=o.cy+v.pxmid[1]*(1-v.rInscribed)),c&&(E=v._hoverX,z=v._hoverY);var q={},V=[],G=[],Z=function(Ee){return V.indexOf(Ee)!==-1};S&&(V=S==="all"?b._module.attributes.hoverinfo.flags:S.split("+")),q.label=p.label,Z("label")&&q.label&&G.push(q.label),p.hasOwnProperty("v")&&(q.value=p.v,q.valueLabel=pLt(q.value,g),Z("value")&&G.push(q.valueLabel)),q.currentPath=v.currentPath=id.getPath(v.data),Z("current path")&&!M&&G.push(q.currentPath);var j,N=[],H=function(){N.indexOf(j)===-1&&(G.push(j),N.push(j))};q.percentParent=v.percentParent=L/id.getValue(T),q.parent=v.parentString=id.getPtLabel(T),Z("percent parent")&&(j=id.formatPercent(q.percentParent,g)+" of "+q.parent,H()),q.percentEntry=v.percentEntry=L/id.getValue(r),q.entry=v.entry=id.getPtLabel(r),Z("percent entry")&&!M&&!v.onPathbar&&(j=id.formatPercent(q.percentEntry,g)+" of "+q.entry,H()),q.percentRoot=v.percentRoot=L/id.getValue(l),q.root=v.root=id.getPtLabel(l),Z("percent root")&&!M&&(j=id.formatPercent(q.percentRoot,g)+" of "+q.root,H()),q.text=x("hovertext")||x("text"),Z("text")&&(j=q.text,S6e.isValidTextValue(j)&&G.push(j)),P=[$E(v,b,a.eventDataKeys)];var ie={trace:b,y:z,_x0:v._x0,_x1:v._x1,_y0:v._y0,_y1:v._y1,text:G.join("
"),name:C||Z("name")?b.name:void 0,color:x("hoverlabel.bgcolor")||p.color,borderColor:x("hoverlabel.bordercolor"),fontFamily:x("hoverlabel.font.family"),fontSize:x("hoverlabel.font.size"),fontColor:x("hoverlabel.font.color"),fontWeight:x("hoverlabel.font.weight"),fontStyle:x("hoverlabel.font.style"),fontVariant:x("hoverlabel.font.variant"),nameLength:x("hoverlabel.namelength"),textAlign:x("hoverlabel.align"),hovertemplate:C,hovertemplateLabels:q,eventData:P};u&&(ie.x0=E-v.rInscribed*v.rpx1,ie.x1=E+v.rInscribed*v.rpx1,ie.idealAlign=v.pxmid[0]<0?"left":"right"),c&&(ie.x=E,ie.idealAlign=E<0?"left":"right");var ae=[];JE.loneHover(ie,{container:m._hoverlayer.node(),outerContainer:m._paper.node(),gd:n,inOut_bbox:ae}),P[0].bbox=ae[0],s._hasHoverLabel=!0}if(c){var _e=t.select("path.surface");a.styleOne(_e,v,b,n,{hovered:!0})}s._hasHoverEvent=!0,n.emit("plotly_hover",{points:P||[$E(v,b,a.eventDataKeys)],event:NA.event})}},h=function(v){var m=n._fullLayout,b=n._fullData[s.index],p=NA.select(this).datum();if(s._hasHoverEvent&&(v.originalEvent=NA.event,n.emit("plotly_unhover",{points:[$E(p,b,a.eventDataKeys)],event:NA.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(JE.loneUnhover(m._hoverlayer.node()),s._hasHoverLabel=!1),c){var k=t.select("path.surface");a.styleOne(k,p,b,n,{hovered:!1})}},d=function(v){var m=n._fullLayout,b=n._fullData[s.index],p=u&&(id.isHierarchyRoot(v)||id.isLeaf(v)),k=id.getPtId(v),M=id.isEntry(v)?id.findEntryWithChild(l,k):id.findEntryWithLevel(l,k),T=id.getPtId(M),L={points:[$E(v,b,a.eventDataKeys)],event:NA.event};p||(L.nextLevel=T);var x=dLt.triggerHandler(n,"plotly_"+s.type+"click",L);if(x!==!1&&m.hovermode&&(n._hoverdata=[$E(v,b,a.eventDataKeys)],JE.click(n,NA.event)),!p&&x!==!1&&!n._dragging&&!n._transitioning){A6e.call("_storeDirectGUIEdit",b,m._tracePreGUI[b.uid],{level:b.level});var C={data:[{level:T}],traces:[s.index]},S={frame:{redraw:!1,duration:a.transitionTime},transition:{duration:a.transitionTime,easing:a.transitionEasing},mode:"immediate",fromcurrent:!0};JE.loneUnhover(m._hoverlayer.node()),A6e.call("animate",n,C,S)}};t.on("mouseover",f),t.on("mouseout",h),t.on("click",d)};function $E(e,t,r){for(var n=e.data.data,i={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},a=0;a{"use strict";var ek=qa(),gLt=NE(),Jg=(j2(),gb(H2)).interpolate,E6e=So(),Av=Pr(),mLt=Zl(),P6e=bv(),k6e=P6e.recordMinTextSize,yLt=P6e.clearMinTextSize,I6e=SD(),_Lt=g_().getRotationAngle,xLt=I6e.computeTransform,bLt=I6e.transformInsideText,wLt=KW().styleOne,TLt=V0().resizeText,ALt=QE(),JW=MW(),Rl=i1();XD.plot=function(e,t,r,n){var i=e._fullLayout,a=i._sunburstlayer,o,s,l=!r,u=!i.uniformtext.mode&&Rl.hasTransition(r);if(yLt("sunburst",i),o=a.selectAll("g.trace.sunburst").data(t,function(f){return f[0].trace.uid}),o.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),u){n&&(s=n());var c=ek.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});c.each(function(){a.selectAll("g.trace").each(function(f){C6e(e,f,this,r)})})}else o.each(function(f){C6e(e,f,this,r)}),i.uniformtext.mode&&TLt(e,i._sunburstlayer.selectAll(".trace"),"sunburst");l&&o.exit().remove()};function C6e(e,t,r,n){var i=e._context.staticPlot,a=e._fullLayout,o=!a.uniformtext.mode&&Rl.hasTransition(n),s=ek.select(r),l=s.selectAll("g.slice"),u=t[0],c=u.trace,f=u.hierarchy,h=Rl.findEntryWithLevel(f,c.level),d=Rl.getMaxDepth(c),v=a._size,m=c.domain,b=v.w*(m.x[1]-m.x[0]),p=v.h*(m.y[1]-m.y[0]),k=.5*Math.min(b,p),M=u.cx=v.l+v.w*(m.x[1]+m.x[0])/2,T=u.cy=v.t+v.h*(1-m.y[0])-p/2;if(!h)return l.remove();var L=null,x={};o&&l.each(function(ge){x[Rl.getPtId(ge)]={rpx0:ge.rpx0,rpx1:ge.rpx1,x0:ge.x0,x1:ge.x1,transform:ge.transform},!L&&Rl.isEntry(ge)&&(L=ge)});var C=SLt(h).descendants(),S=h.height+1,g=0,P=d;u.hasMultipleRoots&&Rl.isHierarchyRoot(h)&&(C=C.slice(1),S-=1,g=1,P+=1),C=C.filter(function(ge){return ge.y1<=P});var E=_Lt(c.rotation);E&&C.forEach(function(ge){ge.x0+=E,ge.x1+=E});var z=Math.min(S,d),q=function(ge){return(ge-g)/z*k},V=function(ge,re){return[ge*Math.cos(re),-ge*Math.sin(re)]},G=function(ge){return Av.pathAnnulus(ge.rpx0,ge.rpx1,ge.x0,ge.x1,M,T)},Z=function(ge){return M+L6e(ge)[0]*(ge.transform.rCenter||0)+(ge.transform.x||0)},j=function(ge){return T+L6e(ge)[1]*(ge.transform.rCenter||0)+(ge.transform.y||0)};l=l.data(C,Rl.getPtId),l.enter().append("g").classed("slice",!0),o?l.exit().transition().each(function(){var ge=ek.select(this),re=ge.select("path.surface");re.transition().attrTween("d",function(ke){var be=ae(ke);return function(Be){return G(be(Be))}});var Se=ge.select("g.slicetext");Se.attr("opacity",0)}).remove():l.exit().remove(),l.order();var N=null;if(o&&L){var H=Rl.getPtId(L);l.each(function(ge){N===null&&Rl.getPtId(ge)===H&&(N=ge.x1)})}var ie=l;o&&(ie=ie.transition().each("end",function(){var ge=ek.select(this);Rl.setSliceCursor(ge,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),ie.each(function(ge){var re=ek.select(this),Se=Av.ensureSingle(re,"path","surface",function(Pe){Pe.style("pointer-events",i?"none":"all")});ge.rpx0=q(ge.y0),ge.rpx1=q(ge.y1),ge.xmid=(ge.x0+ge.x1)/2,ge.pxmid=V(ge.rpx1,ge.xmid),ge.midangle=-(ge.xmid-Math.PI/2),ge.startangle=-(ge.x0-Math.PI/2),ge.stopangle=-(ge.x1-Math.PI/2),ge.halfangle=.5*Math.min(Av.angleDelta(ge.x0,ge.x1)||Math.PI,Math.PI),ge.ring=1-ge.rpx0/ge.rpx1,ge.rInscribed=MLt(ge,c),o?Se.transition().attrTween("d",function(Pe){var ce=_e(Pe);return function(He){return G(ce(He))}}):Se.attr("d",G),re.call(ALt,h,e,t,{eventDataKeys:JW.eventDataKeys,transitionTime:JW.CLICK_TRANSITION_TIME,transitionEasing:JW.CLICK_TRANSITION_EASING}).call(Rl.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),Se.call(wLt,ge,c,e);var ke=Av.ensureSingle(re,"g","slicetext"),be=Av.ensureSingle(ke,"text","",function(Pe){Pe.attr("data-notex",1)}),Be=Av.ensureUniformFontSize(e,Rl.determineTextFont(c,ge,a.font));be.text(XD.formatSliceLabel(ge,h,c,t,a)).classed("slicetext",!0).attr("text-anchor","middle").call(E6e.font,Be).call(mLt.convertToTspans,e);var Le=E6e.bBox(be.node());ge.transform=bLt(Le,ge,u),ge.transform.targetX=Z(ge),ge.transform.targetY=j(ge);var me=function(Pe,ce){var He=Pe.transform;return xLt(He,ce),He.fontSize=Be.size,k6e(c.type,He,a),Av.getTextTransform(He)};o?be.transition().attrTween("transform",function(Pe){var ce=Ee(Pe);return function(He){return me(ce(He),Le)}}):be.attr("transform",me(ge,Le))});function ae(ge){var re=Rl.getPtId(ge),Se=x[re],ke=x[Rl.getPtId(h)],be;if(ke){var Be=(ge.x1>ke.x1?2*Math.PI:0)+E;be=ge.rpx1N?2*Math.PI:0)+E;Se={x0:be,x1:be}}else Se={rpx0:k,rpx1:k},Av.extendFlat(Se,Ce(ge));else Se={rpx0:0,rpx1:0};else Se={x0:E,x1:E};return Jg(Se,ke)}function Ee(ge){var re=x[Rl.getPtId(ge)],Se,ke=ge.transform;if(re)Se=re;else if(Se={rpx1:ge.rpx1,transform:{textPosAngle:ke.textPosAngle,scale:0,rotate:ke.rotate,rCenter:ke.rCenter,x:ke.x,y:ke.y}},L)if(ge.parent)if(N){var be=ge.x1>N?2*Math.PI:0;Se.x0=Se.x1=be}else Av.extendFlat(Se,Ce(ge));else Se.x0=Se.x1=E;else Se.x0=Se.x1=E;var Be=Jg(Se.transform.textPosAngle,ge.transform.textPosAngle),Le=Jg(Se.rpx1,ge.rpx1),me=Jg(Se.x0,ge.x0),Pe=Jg(Se.x1,ge.x1),ce=Jg(Se.transform.scale,ke.scale),He=Jg(Se.transform.rotate,ke.rotate),lt=ke.rCenter===0?3:Se.transform.rCenter===0?1/3:1,mt=Jg(Se.transform.rCenter,ke.rCenter),Ht=function(at){return mt(Math.pow(at,lt))};return function(at){var ct=Le(at),ar=me(at),Vt=Pe(at),rr=Ht(at),tt=V(ct,(ar+Vt)/2),je=Be(at),Ue={pxmid:tt,rpx1:ct,transform:{textPosAngle:je,rCenter:rr,x:ke.x,y:ke.y}};return k6e(c.type,ke,a),{transform:{targetX:Z(Ue),targetY:j(Ue),scale:ce(at),rotate:He(at),rCenter:rr}}}}function Ce(ge){var re=ge.parent,Se=x[Rl.getPtId(re)],ke={};if(Se){var be=re.children,Be=be.indexOf(ge),Le=be.length,me=Jg(Se.x0,Se.x1);ke.x0=me(Be/Le),ke.x1=me(Be/Le)}else ke.x0=ke.x1=0;return ke}}function SLt(e){return gLt.partition().size([2*Math.PI,e.height+1])(e)}XD.formatSliceLabel=function(e,t,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!a&&(!o||o==="none"))return"";var s=i.separators,l=n[0],u=e.data.data,c=l.hierarchy,f=Rl.isHierarchyRoot(e),h=Rl.getParent(c,e),d=Rl.getValue(e);if(!a){var v=o.split("+"),m=function(g){return v.indexOf(g)!==-1},b=[],p;if(m("label")&&u.label&&b.push(u.label),u.hasOwnProperty("v")&&m("value")&&b.push(Rl.formatValue(u.v,s)),!f){m("current path")&&b.push(Rl.getPath(e.data));var k=0;m("percent parent")&&k++,m("percent entry")&&k++,m("percent root")&&k++;var M=k>1;if(k){var T,L=function(g){p=Rl.formatPercent(T,s),M&&(p+=" of "+g),b.push(p)};m("percent parent")&&!f&&(T=d/Rl.getValue(h),L("parent")),m("percent entry")&&(T=d/Rl.getValue(t),L("entry")),m("percent root")&&(T=d/Rl.getValue(c),L("root"))}}return m("text")&&(p=Av.castOption(r,u.i,"text"),Av.isValidTextValue(p)&&b.push(p)),b.join("
")}var x=Av.castOption(r,u.i,"texttemplate");if(!x)return"";var C={};u.label&&(C.label=u.label),u.hasOwnProperty("v")&&(C.value=u.v,C.valueLabel=Rl.formatValue(u.v,s)),C.currentPath=Rl.getPath(e.data),f||(C.percentParent=d/Rl.getValue(h),C.percentParentLabel=Rl.formatPercent(C.percentParent,s),C.parent=Rl.getPtLabel(h)),C.percentEntry=d/Rl.getValue(t),C.percentEntryLabel=Rl.formatPercent(C.percentEntry,s),C.entry=Rl.getPtLabel(t),C.percentRoot=d/Rl.getValue(c),C.percentRootLabel=Rl.formatPercent(C.percentRoot,s),C.root=Rl.getPtLabel(c),u.hasOwnProperty("color")&&(C.color=u.color);var S=Av.castOption(r,u.i,"text");return(Av.isValidTextValue(S)||S==="")&&(C.text=S),C.customdata=Av.castOption(r,u.i,"customdata"),Av.texttemplateString({data:[C,r._meta],fallback:r.texttemplatefallback,labels:C,locale:i._d3locale,template:x})};function MLt(e){return e.rpx0===0&&Av.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function L6e(e){return ELt(e.rpx1,e.transform.textPosAngle)}function ELt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var D6e=ye((w0r,R6e)=>{"use strict";R6e.exports={moduleType:"trace",name:"sunburst",basePlotModule:Xke(),categories:[],animatable:!0,attributes:BE(),layoutAttributes:EW(),supplyDefaults:rCe(),supplyLayoutDefaults:nCe(),calc:VE().calc,crossTraceCalc:VE().crossTraceCalc,plot:ZD().plot,style:KW().style,colorbar:Qd(),meta:{}}});var z6e=ye((T0r,F6e)=>{"use strict";F6e.exports=D6e()});var O6e=ye(UA=>{"use strict";var q6e=Mc();UA.name="treemap";UA.plot=function(e,t,r,n){q6e.plotBasePlot(UA.name,e,t,r,n)};UA.clean=function(e,t,r,n){q6e.cleanBasePlot(UA.name,e,t,r,n)}});var X2=ye((S0r,B6e)=>{"use strict";B6e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var YD=ye((M0r,V6e)=>{"use strict";var{hovertemplateAttrs:kLt,texttemplateAttrs:CLt,templatefallbackAttrs:N6e}=Ll(),LLt=Tu(),PLt=Cc().attributes,Z2=z2(),tg=BE(),U6e=X2(),$W=Ao().extendFlat,ILt=Pd().pattern;V6e.exports={labels:tg.labels,parents:tg.parents,values:tg.values,branchvalues:tg.branchvalues,count:tg.count,level:tg.level,maxdepth:tg.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:$W({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:tg.marker.colors,pattern:ILt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:tg.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},LLt("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:$W({},Z2.textfont,{}),editType:"calc"},text:Z2.text,textinfo:tg.textinfo,texttemplate:CLt({editType:"plot"},{keys:U6e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:N6e({editType:"plot"}),hovertext:Z2.hovertext,hoverinfo:tg.hoverinfo,hovertemplate:kLt({},{keys:U6e.eventDataKeys}),hovertemplatefallback:N6e(),textfont:Z2.textfont,insidetextfont:Z2.insidetextfont,outsidetextfont:$W({},Z2.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:Z2.sort,root:tg.root,domain:PLt({name:"treemap",trace:!0,editType:"calc"})}});var QW=ye((E0r,G6e)=>{"use strict";G6e.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var X6e=ye((k0r,W6e)=>{"use strict";var H6e=Pr(),RLt=YD(),DLt=ka(),FLt=Cc().defaults,zLt=i0().handleText,qLt=A_().TEXTPAD,OLt=q2().handleMarkerDefaults,j6e=tc(),BLt=j6e.hasColorscale,NLt=j6e.handleDefaults;W6e.exports=function(t,r,n,i){function a(b,p){return H6e.coerce(t,r,RLt,b,p)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth");var u=a("tiling.packing");u==="squarify"&&a("tiling.squarifyratio"),a("tiling.flip"),a("tiling.pad");var c=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",H6e.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("pathbar.visible"),h="auto";zLt(t,r,i,a,h,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition");var d=r.textposition.indexOf("bottom")!==-1;OLt(t,r,i,a);var v=r._hasColorscale=BLt(t,"marker","colors")||(t.marker||{}).coloraxis;v?NLt(t,r,i,a,{prefix:"marker.",cLetter:"c"}):a("marker.depthfade",!(r.marker.colors||[]).length);var m=r.textfont.size*2;a("marker.pad.t",d?m/4:m),a("marker.pad.l",m/4),a("marker.pad.r",m/4),a("marker.pad.b",d?m:m/4),a("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:DLt.contrast(i.paper_bgcolor)}}},f&&(a("pathbar.thickness",r.pathbar.textfont.size+2*qLt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),FLt(r,i,a),r._length=null}});var Y6e=ye((C0r,Z6e)=>{"use strict";var ULt=Pr(),VLt=QW();Z6e.exports=function(t,r){function n(i,a){return ULt.coerce(t,r,VLt,i,a)}n("treemapcolorway",r.colorway),n("extendtreemapcolors")}});var tX=ye(eX=>{"use strict";var K6e=VE();eX.calc=function(e,t){return K6e.calc(e,t)};eX.crossTraceCalc=function(e){return K6e._runCrossTraceCalc("treemap",e)}});var rX=ye((P0r,J6e)=>{"use strict";J6e.exports=function e(t,r,n){var i;n.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),n.flipX&&(i=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-i),n.flipY&&(i=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-i);var a=t.children;if(a)for(var o=0;o{"use strict";var VA=NE(),GLt=rX();$6e.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.packing==="dice-slice",s=n.pad[a?"bottom":"top"],l=n.pad[i?"right":"left"],u=n.pad[i?"left":"right"],c=n.pad[a?"top":"bottom"],f;o&&(f=l,l=s,s=f,f=u,u=c,c=f);var h=VA.treemap().tile(HLt(n.packing,n.squarifyratio)).paddingInner(n.pad.inner).paddingLeft(l).paddingRight(u).paddingTop(s).paddingBottom(c).size(o?[r[1],r[0]]:r)(t);return(o||i||a)&&GLt(h,r,{swapXY:o,flipX:i,flipY:a}),h};function HLt(e,t){switch(e){case"squarify":return VA.treemapSquarify.ratio(t);case"binary":return VA.treemapBinary;case"dice":return VA.treemapDice;case"slice":return VA.treemapSlice;default:return VA.treemapSliceDice}}});var KD=ye((R0r,rLe)=>{"use strict";var Q6e=qa(),GA=ka(),eLe=Pr(),nX=i1(),jLt=bv().resizeText,WLt=WD();function XLt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");jLt(e,t,"treemap"),t.each(function(r){var n=Q6e.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){Q6e.select(this).call(tLe,o,a,e,{hovered:!1})})})}function tLe(e,t,r,n,i){var a=(i||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=nX.isHierarchyRoot(t),h=1;if(a)l=r._hovered.marker.line.color,u=r._hovered.marker.line.width;else if(f&&c===r.root.color)h=100,l="rgba(0,0,0,0)",u=0;else if(l=eLe.castOption(r,s,"marker.line.color")||GA.defaultLine,u=eLe.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var d=r.marker.depthfade;if(d){var v=GA.combine(GA.addOpacity(r._backgroundColor,.75),c),m;if(d===!0){var b=nX.getMaxDepth(r);isFinite(b)?nX.isLeaf(t)?m=0:m=r._maxVisibleLayers-(t.data.depth-r._entryDepth):m=t.data.height+1}else m=t.data.depth-r._entryDepth,r._atRootLevel||m++;if(m>0)for(var p=0;p{"use strict";var iLe=qa(),JD=Pr(),nLe=So(),ZLt=Zl(),YLt=iX(),aLe=KD().styleOne,aX=X2(),HA=i1(),KLt=QE(),oX=!0;oLe.exports=function(t,r,n,i,a){var o=a.barDifY,s=a.width,l=a.height,u=a.viewX,c=a.viewY,f=a.pathSlice,h=a.toMoveInsideSlice,d=a.strTransform,v=a.hasTransition,m=a.handleSlicesExit,b=a.makeUpdateSliceInterpolator,p=a.makeUpdateTextInterpolator,k={},M=t._context.staticPlot,T=t._fullLayout,L=r[0],x=L.trace,C=L.hierarchy,S=s/x._entryDepth,g=HA.listPath(n.data,"id"),P=YLt(C.copy(),[s,l],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();P=P.filter(function(z){var q=g.indexOf(z.data.id);return q===-1?!1:(z.x0=S*q,z.x1=S*(q+1),z.y0=o,z.y1=o+l,z.onPathbar=!0,!0)}),P.reverse(),i=i.data(P,HA.getPtId),i.enter().append("g").classed("pathbar",!0),m(i,oX,k,[s,l],f),i.order();var E=i;v&&(E=E.transition().each("end",function(){var z=iLe.select(this);HA.setSliceCursor(z,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),E.each(function(z){z._x0=u(z.x0),z._x1=u(z.x1),z._y0=c(z.y0),z._y1=c(z.y1),z._hoverX=u(z.x1-Math.min(s,l)/2),z._hoverY=c(z.y1-l/2);var q=iLe.select(this),V=JD.ensureSingle(q,"path","surface",function(N){N.style("pointer-events",M?"none":"all")});v?V.transition().attrTween("d",function(N){var H=b(N,oX,k,[s,l]);return function(ie){return f(H(ie))}}):V.attr("d",f),q.call(KLt,n,t,r,{styleOne:aLe,eventDataKeys:aX.eventDataKeys,transitionTime:aX.CLICK_TRANSITION_TIME,transitionEasing:aX.CLICK_TRANSITION_EASING}).call(HA.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),V.call(aLe,z,x,t,{hovered:!1}),z._text=(HA.getPtLabel(z)||"").split("
").join(" ")||"";var G=JD.ensureSingle(q,"g","slicetext"),Z=JD.ensureSingle(G,"text","",function(N){N.attr("data-notex",1)}),j=JD.ensureUniformFontSize(t,HA.determineTextFont(x,z,T.font,{onPathbar:!0}));Z.text(z._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(nLe.font,j).call(ZLt.convertToTspans,t),z.textBB=nLe.bBox(Z.node()),z.transform=h(z,{fontSize:j.size,onPathbar:!0}),z.transform.fontSize=j.size,v?Z.transition().attrTween("transform",function(N){var H=p(N,oX,k,[s,l]);return function(ie){return d(H(ie))}}):Z.attr("transform",d(z))})}});var fLe=ye((F0r,cLe)=>{"use strict";var lLe=qa(),sX=(j2(),gb(H2)).interpolate,nx=i1(),tk=Pr(),uLe=A_().TEXTPAD,JLt=p2(),$Lt=JLt.toMoveInsideBar,QLt=bv(),lX=QLt.recordMinTextSize,ePt=X2(),tPt=sLe();function Y2(e){return nx.isHierarchyRoot(e)?"":nx.getPtId(e)}cLe.exports=function(t,r,n,i,a){var o=t._fullLayout,s=r[0],l=s.trace,u=l.type,c=u==="icicle",f=s.hierarchy,h=nx.findEntryWithLevel(f,l.level),d=lLe.select(n),v=d.selectAll("g.pathbar"),m=d.selectAll("g.slice");if(!h){v.remove(),m.remove();return}var b=nx.isHierarchyRoot(h),p=!o.uniformtext.mode&&nx.hasTransition(i),k=nx.getMaxDepth(l),M=function(Ae){return Ae.data.depth-h.data.depth-1?C+P:-(g+P):0,z={x0:S,x1:S,y0:E,y1:E+g},q=function(Ae,rt,St){var Tt=l.tiling.pad,dt=function(or){return or-Tt<=rt.x0},Et=function(or){return or+Tt>=rt.x1},pt=function(or){return or-Tt<=rt.y0},jt=function(or){return or+Tt>=rt.y1};return Ae.x0===rt.x0&&Ae.x1===rt.x1&&Ae.y0===rt.y0&&Ae.y1===rt.y1?{x0:Ae.x0,x1:Ae.x1,y0:Ae.y0,y1:Ae.y1}:{x0:dt(Ae.x0-Tt)?0:Et(Ae.x0-Tt)?St[0]:Ae.x0,x1:dt(Ae.x1+Tt)?0:Et(Ae.x1+Tt)?St[0]:Ae.x1,y0:pt(Ae.y0-Tt)?0:jt(Ae.y0-Tt)?St[1]:Ae.y0,y1:pt(Ae.y1+Tt)?0:jt(Ae.y1+Tt)?St[1]:Ae.y1}},V=null,G={},Z={},j=null,N=function(Ae,rt){return rt?G[Y2(Ae)]:Z[Y2(Ae)]},H=function(Ae,rt,St,Tt){if(rt)return G[Y2(f)]||z;var dt=Z[l.level]||St;return M(Ae)?q(Ae,dt,Tt):{}};s.hasMultipleRoots&&b&&k++,l._maxDepth=k,l._backgroundColor=o.paper_bgcolor,l._entryDepth=h.data.depth,l._atRootLevel=b;var ie=-x/2+T.l+T.w*(L.x[1]+L.x[0])/2,ae=-C/2+T.t+T.h*(1-(L.y[1]+L.y[0])/2),_e=function(Ae){return ie+Ae},Ee=function(Ae){return ae+Ae},Ce=Ee(0),ge=_e(0),re=function(Ae){return ge+Ae},Se=function(Ae){return Ce+Ae};function ke(Ae,rt){return Ae+","+rt}var be=re(0),Be=function(Ae){Ae.x=Math.max(be,Ae.x)},Le=l.pathbar.edgeshape,me=function(Ae){var rt=re(Math.max(Math.min(Ae.x0,Ae.x0),0)),St=re(Math.min(Math.max(Ae.x1,Ae.x1),S)),Tt=Se(Ae.y0),dt=Se(Ae.y1),Et=g/2,pt={},jt={};pt.x=rt,jt.x=St,pt.y=jt.y=(Tt+dt)/2;var or={x:rt,y:Tt},mr={x:St,y:Tt},Ar={x:St,y:dt},ei={x:rt,y:dt};return Le===">"?(or.x-=Et,mr.x-=Et,Ar.x-=Et,ei.x-=Et):Le==="/"?(Ar.x-=Et,ei.x-=Et,pt.x-=Et/2,jt.x-=Et/2):Le==="\\"?(or.x-=Et,mr.x-=Et,pt.x-=Et/2,jt.x-=Et/2):Le==="<"&&(pt.x-=Et,jt.x-=Et),Be(or),Be(ei),Be(pt),Be(mr),Be(Ar),Be(jt),"M"+ke(or.x,or.y)+"L"+ke(mr.x,mr.y)+"L"+ke(jt.x,jt.y)+"L"+ke(Ar.x,Ar.y)+"L"+ke(ei.x,ei.y)+"L"+ke(pt.x,pt.y)+"Z"},Pe=l[c?"tiling":"marker"].pad,ce=function(Ae){return l.textposition.indexOf(Ae)!==-1},He=ce("top"),lt=ce("left"),mt=ce("right"),Ht=ce("bottom"),at=function(Ae){var rt=_e(Ae.x0),St=_e(Ae.x1),Tt=Ee(Ae.y0),dt=Ee(Ae.y1),Et=St-rt,pt=dt-Tt;if(!Et||!pt)return"";var jt=l.marker.cornerradius||0,or=Math.min(jt,Et/2,pt/2);or&&Ae.data&&Ae.data.data&&Ae.data.data.label&&(He&&(or=Math.min(or,Pe.t)),lt&&(or=Math.min(or,Pe.l)),mt&&(or=Math.min(or,Pe.r)),Ht&&(or=Math.min(or,Pe.b)));var mr=function(Ar,ei){return or?"a"+ke(or,or)+" 0 0 1 "+ke(Ar,ei):""};return"M"+ke(rt,Tt+or)+mr(or,-or)+"L"+ke(St-or,Tt)+mr(or,or)+"L"+ke(St,dt-or)+mr(-or,or)+"L"+ke(rt+or,dt)+mr(-or,-or)+"Z"},ct=function(Ae,rt){var St=Ae.x0,Tt=Ae.x1,dt=Ae.y0,Et=Ae.y1,pt=Ae.textBB,jt=He||rt.isHeader&&!Ht,or=jt?"start":Ht?"end":"middle",mr=ce("right"),Ar=ce("left")||rt.onPathbar,ei=Ar?-1:mr?1:0;if(rt.isHeader){if(St+=(c?Pe:Pe.l)-uLe,Tt-=(c?Pe:Pe.r)-uLe,St>=Tt){var qr=(St+Tt)/2;St=qr,Tt=qr}var jr;Ht?(jr=Et-(c?Pe:Pe.b),dt{"use strict";var rPt=qa(),iPt=i1(),nPt=bv(),aPt=nPt.clearMinTextSize,oPt=V0().resizeText,hLe=fLe();dLe.exports=function(t,r,n,i,a){var o=a.type,s=a.drawDescendants,l=t._fullLayout,u=l["_"+o+"layer"],c,f,h=!n;if(aPt(o,l),c=u.selectAll("g.trace."+o).data(r,function(v){return v[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!l.uniformtext.mode&&iPt.hasTransition(n)){i&&(f=i());var d=rPt.transition().duration(n.duration).ease(n.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()});d.each(function(){u.selectAll("g.trace").each(function(v){hLe(t,v,this,n,s)})})}else c.each(function(v){hLe(t,v,this,n,s)}),l.uniformtext.mode&&oPt(t,u.selectAll(".trace"),o);h&&c.exit().remove()}});var yLe=ye((q0r,mLe)=>{"use strict";var vLe=qa(),$D=Pr(),pLe=So(),sPt=Zl(),lPt=iX(),gLe=KD().styleOne,cX=X2(),ax=i1(),uPt=QE(),cPt=ZD().formatSliceLabel,fX=!1;mLe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,v=a.handleSlicesExit,m=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,p=a.prevEntry,k={},M=t._context.staticPlot,T=t._fullLayout,L=r[0],x=L.trace,C=x.textposition.indexOf("left")!==-1,S=x.textposition.indexOf("right")!==-1,g=x.textposition.indexOf("bottom")!==-1,P=!g&&!x.marker.pad.t||g&&!x.marker.pad.b,E=lPt(n,[o,s],{packing:x.tiling.packing,squarifyratio:x.tiling.squarifyratio,flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1,pad:{inner:x.tiling.pad,top:x.marker.pad.t,left:x.marker.pad.l,right:x.marker.pad.r,bottom:x.marker.pad.b}}),z=E.descendants(),q=1/0,V=-1/0;z.forEach(function(H){var ie=H.depth;ie>=x._maxDepth?(H.x0=H.x1=(H.x0+H.x1)/2,H.y0=H.y1=(H.y0+H.y1)/2):(q=Math.min(q,ie),V=Math.max(V,ie))}),i=i.data(z,ax.getPtId),x._maxVisibleLayers=isFinite(V)?V-q+1:0,i.enter().append("g").classed("slice",!0),v(i,fX,k,[o,s],c),i.order();var G=null;if(d&&p){var Z=ax.getPtId(p);i.each(function(H){G===null&&ax.getPtId(H)===Z&&(G={x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1})})}var j=function(){return G||{x0:0,x1:o,y0:0,y1:s}},N=i;return d&&(N=N.transition().each("end",function(){var H=vLe.select(this);ax.setSliceCursor(H,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),N.each(function(H){var ie=ax.isHeader(H,x);H._x0=l(H.x0),H._x1=l(H.x1),H._y0=u(H.y0),H._y1=u(H.y1),H._hoverX=l(H.x1-x.marker.pad.r),H._hoverY=u(g?H.y1-x.marker.pad.b/2:H.y0+x.marker.pad.t/2);var ae=vLe.select(this),_e=$D.ensureSingle(ae,"path","surface",function(ke){ke.style("pointer-events",M?"none":"all")});d?_e.transition().attrTween("d",function(ke){var be=m(ke,fX,j(),[o,s]);return function(Be){return c(be(Be))}}):_e.attr("d",c),ae.call(uPt,n,t,r,{styleOne:gLe,eventDataKeys:cX.eventDataKeys,transitionTime:cX.CLICK_TRANSITION_TIME,transitionEasing:cX.CLICK_TRANSITION_EASING}).call(ax.setSliceCursor,t,{isTransitioning:t._transitioning}),_e.call(gLe,H,x,t,{hovered:!1}),H.x0===H.x1||H.y0===H.y1?H._text="":ie?H._text=P?"":ax.getPtLabel(H)||"":H._text=cPt(H,n,x,r,T)||"";var Ee=$D.ensureSingle(ae,"g","slicetext"),Ce=$D.ensureSingle(Ee,"text","",function(ke){ke.attr("data-notex",1)}),ge=$D.ensureUniformFontSize(t,ax.determineTextFont(x,H,T.font)),re=H._text||" ",Se=ie&&re.indexOf("
")===-1;Ce.text(re).classed("slicetext",!0).attr("text-anchor",S?"end":C||Se?"start":"middle").call(pLe.font,ge).call(sPt.convertToTspans,t),H.textBB=pLe.bBox(Ce.node()),H.transform=f(H,{fontSize:ge.size,isHeader:ie}),H.transform.fontSize=ge.size,d?Ce.transition().attrTween("transform",function(ke){var be=b(ke,fX,j(),[o,s]);return function(Be){return h(be(Be))}}):Ce.attr("transform",h(H))}),G}});var xLe=ye((O0r,_Le)=>{"use strict";var fPt=uX(),hPt=yLe();_Le.exports=function(t,r,n,i){return fPt(t,r,n,i,{type:"treemap",drawDescendants:hPt})}});var wLe=ye((B0r,bLe)=>{"use strict";bLe.exports={moduleType:"trace",name:"treemap",basePlotModule:O6e(),categories:[],animatable:!0,attributes:YD(),layoutAttributes:QW(),supplyDefaults:X6e(),supplyLayoutDefaults:Y6e(),calc:tX().calc,crossTraceCalc:tX().crossTraceCalc,plot:xLe(),style:KD().style,colorbar:Qd(),meta:{}}});var ALe=ye((N0r,TLe)=>{"use strict";TLe.exports=wLe()});var MLe=ye(jA=>{"use strict";var SLe=Mc();jA.name="icicle";jA.plot=function(e,t,r,n){SLe.plotBasePlot(jA.name,e,t,r,n)};jA.clean=function(e,t,r,n){SLe.cleanBasePlot(jA.name,e,t,r,n)}});var hX=ye((V0r,CLe)=>{"use strict";var{hovertemplateAttrs:dPt,texttemplateAttrs:vPt,templatefallbackAttrs:ELe}=Ll(),pPt=Tu(),gPt=Cc().attributes,rk=z2(),s0=BE(),QD=YD(),kLe=X2(),mPt=Ao().extendFlat,yPt=Pd().pattern;CLe.exports={labels:s0.labels,parents:s0.parents,values:s0.values,branchvalues:s0.branchvalues,count:s0.count,level:s0.level,maxdepth:s0.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:QD.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:mPt({colors:s0.marker.colors,line:s0.marker.line,pattern:yPt,editType:"calc"},pPt("marker",{colorAttr:"colors",anim:!1})),leaf:s0.leaf,pathbar:QD.pathbar,text:rk.text,textinfo:s0.textinfo,texttemplate:vPt({editType:"plot"},{keys:kLe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:ELe({editType:"plot"}),hovertext:rk.hovertext,hoverinfo:s0.hoverinfo,hovertemplate:dPt({},{keys:kLe.eventDataKeys}),hovertemplatefallback:ELe(),textfont:rk.textfont,insidetextfont:rk.insidetextfont,outsidetextfont:QD.outsidetextfont,textposition:QD.textposition,sort:rk.sort,root:s0.root,domain:gPt({name:"icicle",trace:!0,editType:"calc"})}});var dX=ye((G0r,LLe)=>{"use strict";LLe.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var DLe=ye((H0r,RLe)=>{"use strict";var PLe=Pr(),_Pt=hX(),xPt=ka(),bPt=Cc().defaults,wPt=i0().handleText,TPt=A_().TEXTPAD,APt=q2().handleMarkerDefaults,ILe=tc(),SPt=ILe.hasColorscale,MPt=ILe.handleDefaults;RLe.exports=function(t,r,n,i){function a(d,v){return PLe.coerce(t,r,_Pt,d,v)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),a("tiling.orientation"),a("tiling.flip"),a("tiling.pad");var u=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",PLe.isArrayOrTypedArray(u)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var c=a("pathbar.visible"),f="auto";wPt(t,r,i,a,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition"),APt(t,r,i,a);var h=r._hasColorscale=SPt(t,"marker","colors")||(t.marker||{}).coloraxis;h&&MPt(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",h?1:.7),r._hovered={marker:{line:{width:2,color:xPt.contrast(i.paper_bgcolor)}}},c&&(a("pathbar.thickness",r.pathbar.textfont.size+2*TPt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),bPt(r,i,a),r._length=null}});var zLe=ye((j0r,FLe)=>{"use strict";var EPt=Pr(),kPt=dX();FLe.exports=function(t,r){function n(i,a){return EPt.coerce(t,r,kPt,i,a)}n("iciclecolorway",r.colorway),n("extendiciclecolors")}});var pX=ye(vX=>{"use strict";var qLe=VE();vX.calc=function(e,t){return qLe.calc(e,t)};vX.crossTraceCalc=function(e){return qLe._runCrossTraceCalc("icicle",e)}});var BLe=ye((X0r,OLe)=>{"use strict";var CPt=NE(),LPt=rX();OLe.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.orientation==="h",s=n.maxDepth,l=r[0],u=r[1];s&&(l=(t.height+1)*r[0]/Math.min(t.height+1,s),u=(t.height+1)*r[1]/Math.min(t.height+1,s));var c=CPt.partition().padding(n.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||i||a)&&LPt(c,r,{swapXY:o,flipX:i,flipY:a}),c}});var gX=ye((Z0r,HLe)=>{"use strict";var NLe=qa(),ULe=ka(),VLe=Pr(),PPt=bv().resizeText,IPt=WD();function RPt(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");PPt(e,t,"icicle"),t.each(function(r){var n=NLe.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){NLe.select(this).call(GLe,o,a,e)})})}function GLe(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=VLe.castOption(r,o,"marker.line.color")||ULe.defaultLine,l=VLe.castOption(r,o,"marker.line.width")||0;e.call(IPt,t,r,n).style("stroke-width",l).call(ULe.stroke,s).style("opacity",a?r.leaf.opacity:null)}HLe.exports={style:RPt,styleOne:GLe}});var YLe=ye((Y0r,ZLe)=>{"use strict";var jLe=qa(),eF=Pr(),WLe=So(),DPt=Zl(),FPt=BLe(),XLe=gX().styleOne,mX=X2(),WA=i1(),zPt=QE(),qPt=ZD().formatSliceLabel,yX=!1;ZLe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,v=a.handleSlicesExit,m=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,p=a.prevEntry,k={},M=t._context.staticPlot,T=t._fullLayout,L=r[0],x=L.trace,C=x.textposition.indexOf("left")!==-1,S=x.textposition.indexOf("right")!==-1,g=x.textposition.indexOf("bottom")!==-1,P=FPt(n,[o,s],{flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1,orientation:x.tiling.orientation,pad:{inner:x.tiling.pad},maxDepth:x._maxDepth}),E=P.descendants(),z=1/0,q=-1/0;E.forEach(function(N){var H=N.depth;H>=x._maxDepth?(N.x0=N.x1=(N.x0+N.x1)/2,N.y0=N.y1=(N.y0+N.y1)/2):(z=Math.min(z,H),q=Math.max(q,H))}),i=i.data(E,WA.getPtId),x._maxVisibleLayers=isFinite(q)?q-z+1:0,i.enter().append("g").classed("slice",!0),v(i,yX,k,[o,s],c),i.order();var V=null;if(d&&p){var G=WA.getPtId(p);i.each(function(N){V===null&&WA.getPtId(N)===G&&(V={x0:N.x0,x1:N.x1,y0:N.y0,y1:N.y1})})}var Z=function(){return V||{x0:0,x1:o,y0:0,y1:s}},j=i;return d&&(j=j.transition().each("end",function(){var N=jLe.select(this);WA.setSliceCursor(N,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),j.each(function(N){N._x0=l(N.x0),N._x1=l(N.x1),N._y0=u(N.y0),N._y1=u(N.y1),N._hoverX=l(N.x1-x.tiling.pad),N._hoverY=u(g?N.y1-x.tiling.pad/2:N.y0+x.tiling.pad/2);var H=jLe.select(this),ie=eF.ensureSingle(H,"path","surface",function(Ce){Ce.style("pointer-events",M?"none":"all")});d?ie.transition().attrTween("d",function(Ce){var ge=m(Ce,yX,Z(),[o,s],{orientation:x.tiling.orientation,flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1});return function(re){return c(ge(re))}}):ie.attr("d",c),H.call(zPt,n,t,r,{styleOne:XLe,eventDataKeys:mX.eventDataKeys,transitionTime:mX.CLICK_TRANSITION_TIME,transitionEasing:mX.CLICK_TRANSITION_EASING}).call(WA.setSliceCursor,t,{isTransitioning:t._transitioning}),ie.call(XLe,N,x,t,{hovered:!1}),N.x0===N.x1||N.y0===N.y1?N._text="":N._text=qPt(N,n,x,r,T)||"";var ae=eF.ensureSingle(H,"g","slicetext"),_e=eF.ensureSingle(ae,"text","",function(Ce){Ce.attr("data-notex",1)}),Ee=eF.ensureUniformFontSize(t,WA.determineTextFont(x,N,T.font));_e.text(N._text||" ").classed("slicetext",!0).attr("text-anchor",S?"end":C?"start":"middle").call(WLe.font,Ee).call(DPt.convertToTspans,t),N.textBB=WLe.bBox(_e.node()),N.transform=f(N,{fontSize:Ee.size}),N.transform.fontSize=Ee.size,d?_e.transition().attrTween("transform",function(Ce){var ge=b(Ce,yX,Z(),[o,s]);return function(re){return h(ge(re))}}):_e.attr("transform",h(N))}),V}});var JLe=ye((K0r,KLe)=>{"use strict";var OPt=uX(),BPt=YLe();KLe.exports=function(t,r,n,i){return OPt(t,r,n,i,{type:"icicle",drawDescendants:BPt})}});var QLe=ye((J0r,$Le)=>{"use strict";$Le.exports={moduleType:"trace",name:"icicle",basePlotModule:MLe(),categories:[],animatable:!0,attributes:hX(),layoutAttributes:dX(),supplyDefaults:DLe(),supplyLayoutDefaults:zLe(),calc:pX().calc,crossTraceCalc:pX().crossTraceCalc,plot:JLe(),style:gX().style,colorbar:Qd(),meta:{}}});var tPe=ye(($0r,ePe)=>{"use strict";ePe.exports=QLe()});var iPe=ye(XA=>{"use strict";var rPe=Mc();XA.name="funnelarea";XA.plot=function(e,t,r,n){rPe.plotBasePlot(XA.name,e,t,r,n)};XA.clean=function(e,t,r,n){rPe.cleanBasePlot(XA.name,e,t,r,n)}});var _X=ye((egr,aPe)=>{"use strict";var nv=z2(),NPt=Gl(),UPt=Cc().attributes,{hovertemplateAttrs:VPt,texttemplateAttrs:GPt,templatefallbackAttrs:nPe}=Ll(),K2=Ao().extendFlat;aPe.exports={labels:nv.labels,label0:nv.label0,dlabel:nv.dlabel,values:nv.values,marker:{colors:nv.marker.colors,line:{color:K2({},nv.marker.line.color,{dflt:null}),width:K2({},nv.marker.line.width,{dflt:1}),editType:"calc"},pattern:nv.marker.pattern,editType:"calc"},text:nv.text,hovertext:nv.hovertext,scalegroup:K2({},nv.scalegroup,{}),textinfo:K2({},nv.textinfo,{flags:["label","text","value","percent"]}),texttemplate:GPt({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:nPe({editType:"plot"}),hoverinfo:K2({},NPt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:VPt({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:nPe(),textposition:K2({},nv.textposition,{values:["inside","none"],dflt:"inside"}),textfont:nv.textfont,insidetextfont:nv.insidetextfont,title:{text:nv.title.text,font:nv.title.font,position:K2({},nv.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:UPt({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"}}});var xX=ye((tgr,oPe)=>{"use strict";var HPt=bD().hiddenlabels;oPe.exports={hiddenlabels:HPt,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var uPe=ye((rgr,lPe)=>{"use strict";var sPe=Pr(),jPt=_X(),WPt=Cc().defaults,XPt=i0().handleText,ZPt=q2().handleLabelsAndValues,YPt=q2().handleMarkerDefaults;lPe.exports=function(t,r,n,i){function a(m,b){return sPe.coerce(t,r,jPt,m,b)}var o=a("labels"),s=a("values"),l=ZPt(o,s),u=l.len;if(r._hasLabels=l.hasLabels,r._hasValues=l.hasValues,!r._hasLabels&&r._hasValues&&(a("label0"),a("dlabel")),!u){r.visible=!1;return}r._length=u,YPt(t,r,i,a),a("scalegroup");var c=a("text"),f=a("texttemplate");a("texttemplatefallback");var h;if(f||(h=a("textinfo",Array.isArray(c)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),f||h&&h!=="none"){var d=a("textposition");XPt(t,r,i,a,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h==="none"&&a("textposition","none");WPt(r,i,a);var v=a("title.text");v&&(a("title.position"),sPe.coerceFont(a,"title.font",i.font)),a("aspectratio"),a("baseratio")}});var fPe=ye((igr,cPe)=>{"use strict";var KPt=Pr(),JPt=xX();cPe.exports=function(t,r){function n(i,a){return KPt.coerce(t,r,JPt,i,a)}n("hiddenlabels"),n("funnelareacolorway",r.colorway),n("extendfunnelareacolors")}});var bX=ye((ngr,dPe)=>{"use strict";var hPe=CA();function $Pt(e,t){return hPe.calc(e,t)}function QPt(e){hPe.crossTraceCalc(e,{type:"funnelarea"})}dPe.exports={calc:$Pt,crossTraceCalc:QPt}});var yPe=ye((agr,mPe)=>{"use strict";var J2=qa(),wX=So(),ox=Pr(),eIt=ox.strScale,vPe=ox.strTranslate,pPe=Zl(),tIt=p2(),rIt=tIt.toMoveInsideBar,gPe=bv(),iIt=gPe.recordMinTextSize,nIt=gPe.clearMinTextSize,aIt=g_(),ZA=SD(),oIt=ZA.attachFxHandlers,sIt=ZA.determineInsideTextFont,lIt=ZA.layoutAreas,uIt=ZA.prerenderTitles,cIt=ZA.positionTitleOutside,fIt=ZA.formatSliceLabel;mPe.exports=function(t,r){var n=t._context.staticPlot,i=t._fullLayout;nIt("funnelarea",i),uIt(r,t),lIt(r,i._size),ox.makeTraceGroups(i._funnelarealayer,r,"trace").each(function(a){var o=J2.select(this),s=a[0],l=s.trace;dIt(a),o.each(function(){var u=J2.select(this).selectAll("g.slice").data(a);u.enter().append("g").classed("slice",!0),u.exit().remove(),u.each(function(f,h){if(f.hidden){J2.select(this).selectAll("path,g").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var d=s.cx,v=s.cy,m=J2.select(this),b=m.selectAll("path.surface").data([f]);b.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),m.call(oIt,t,a);var p="M"+(d+f.TR[0])+","+(v+f.TR[1])+TX(f.TR,f.BR)+TX(f.BR,f.BL)+TX(f.BL,f.TL)+"Z";b.attr("d",p),fIt(t,f,s);var k=aIt.castOption(l.textposition,f.pts),M=m.selectAll("g.slicetext").data(f.text&&k!=="none"?[0]:[]);M.enter().append("g").classed("slicetext",!0),M.exit().remove(),M.each(function(){var T=ox.ensureSingle(J2.select(this),"text","",function(z){z.attr("data-notex",1)}),L=ox.ensureUniformFontSize(t,sIt(l,f,i.font));T.text(f.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(wX.font,L).call(pPe.convertToTspans,t);var x=wX.bBox(T.node()),C,S,g,P=Math.min(f.BL[1],f.BR[1])+v,E=Math.max(f.TL[1],f.TR[1])+v;S=Math.max(f.TL[0],f.BL[0])+d,g=Math.min(f.TR[0],f.BR[0])+d,C=rIt(S,g,P,E,x,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),C.fontSize=L.size,iIt(l.type,C,i),a[h].transform=C,ox.setTransormAndDisplay(T,C)})});var c=J2.select(this).selectAll("g.titletext").data(l.title.text?[0]:[]);c.enter().append("g").classed("titletext",!0),c.exit().remove(),c.each(function(){var f=ox.ensureSingle(J2.select(this),"text","",function(v){v.attr("data-notex",1)}),h=l.title.text;l._meta&&(h=ox.templateString(h,l._meta)),f.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(wX.font,l.title.font).call(pPe.convertToTspans,t);var d=cIt(s,i._size);f.attr("transform",vPe(d.x,d.y)+eIt(Math.min(1,d.scale))+vPe(d.tx,d.ty))})})})};function TX(e,t){var r=t[0]-e[0],n=t[1]-e[1];return"l"+r+","+n}function hIt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function dIt(e){if(!e.length)return;var t=e[0],r=t.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a=Math.pow(i,2),o=t.vTotal,s=o*a/(1-a),l=o,u=s/o;function c(){var q=Math.sqrt(u);return{x:q,y:-q}}function f(){var q=c();return[q.x,q.y]}var h,d=[];d.push(f());var v,m;for(v=e.length-1;v>-1;v--)if(m=e[v],!m.hidden){var b=m.v/l;u+=b,d.push(f())}var p=1/0,k=-1/0;for(v=0;v-1;v--)if(m=e[v],!m.hidden){P+=1;var E=d[P][0],z=d[P][1];m.TL=[-E,z],m.TR=[E,z],m.BL=S,m.BR=g,m.pxmid=hIt(m.TR,m.BR),S=m.TL,g=m.TR}}});var bPe=ye((ogr,xPe)=>{"use strict";var _Pe=qa(),vIt=Y3(),pIt=bv().resizeText;xPe.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");pIt(t,r,"funnelarea"),r.each(function(n){var i=n[0],a=i.trace,o=_Pe.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){_Pe.select(this).call(vIt,s,a,t)})})}});var TPe=ye((sgr,wPe)=>{"use strict";wPe.exports={moduleType:"trace",name:"funnelarea",basePlotModule:iPe(),categories:["pie-like","funnelarea","showLegend"],attributes:_X(),layoutAttributes:xX(),supplyDefaults:uPe(),supplyLayoutDefaults:fPe(),calc:bX().calc,crossTraceCalc:bX().crossTraceCalc,plot:yPe(),style:bPe(),styleOne:Y3(),meta:{}}});var SPe=ye((lgr,APe)=>{"use strict";APe.exports=TPe()});var qd=ye((ugr,MPe)=>{(function(){var e={1964:function(i,a,o){i.exports={alpha_shape:o(3502),convex_hull:o(7352),delaunay_triangulate:o(7642),gl_cone3d:o(6405),gl_error3d:o(9165),gl_line3d:o(5714),gl_mesh3d:o(7201),gl_plot3d:o(4100),gl_scatter3d:o(8418),gl_streamtube3d:o(7815),gl_surface3d:o(9499),ndarray:o(9618),ndarray_linear_interpolate:o(4317)}},4793:function(i,a,o){"use strict";var s;function l(tt){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(je){return typeof je}:function(je){return je&&typeof Symbol=="function"&&je.constructor===Symbol&&je!==Symbol.prototype?"symbol":typeof je},l(tt)}var u=o(7507),c=o(3778),f=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.hp=m,s=P,a.IS=50;var h=2147483647;s=h,m.TYPED_ARRAY_SUPPORT=d(),!m.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&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 d(){try{var tt=new Uint8Array(1),je={foo:function(){return 42}};return Object.setPrototypeOf(je,Uint8Array.prototype),Object.setPrototypeOf(tt,je),tt.foo()===42}catch(Ue){return!1}}Object.defineProperty(m.prototype,"parent",{enumerable:!0,get:function(){if(m.isBuffer(this))return this.buffer}}),Object.defineProperty(m.prototype,"offset",{enumerable:!0,get:function(){if(m.isBuffer(this))return this.byteOffset}});function v(tt){if(tt>h)throw new RangeError('The value "'+tt+'" is invalid for option "size"');var je=new Uint8Array(tt);return Object.setPrototypeOf(je,m.prototype),je}function m(tt,je,Ue){if(typeof tt=="number"){if(typeof je=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return M(tt)}return b(tt,je,Ue)}m.poolSize=8192;function b(tt,je,Ue){if(typeof tt=="string")return T(tt,je);if(ArrayBuffer.isView(tt))return x(tt);if(tt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(tt));if(ar(tt,ArrayBuffer)||tt&&ar(tt.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ar(tt,SharedArrayBuffer)||tt&&ar(tt.buffer,SharedArrayBuffer)))return C(tt,je,Ue);if(typeof tt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Ae=tt.valueOf&&tt.valueOf();if(Ae!=null&&Ae!==tt)return m.from(Ae,je,Ue);var rt=S(tt);if(rt)return rt;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof tt[Symbol.toPrimitive]=="function")return m.from(tt[Symbol.toPrimitive]("string"),je,Ue);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(tt))}m.from=function(tt,je,Ue){return b(tt,je,Ue)},Object.setPrototypeOf(m.prototype,Uint8Array.prototype),Object.setPrototypeOf(m,Uint8Array);function p(tt){if(typeof tt!="number")throw new TypeError('"size" argument must be of type number');if(tt<0)throw new RangeError('The value "'+tt+'" is invalid for option "size"')}function k(tt,je,Ue){return p(tt),tt<=0?v(tt):je!==void 0?typeof Ue=="string"?v(tt).fill(je,Ue):v(tt).fill(je):v(tt)}m.alloc=function(tt,je,Ue){return k(tt,je,Ue)};function M(tt){return p(tt),v(tt<0?0:g(tt)|0)}m.allocUnsafe=function(tt){return M(tt)},m.allocUnsafeSlow=function(tt){return M(tt)};function T(tt,je){if((typeof je!="string"||je==="")&&(je="utf8"),!m.isEncoding(je))throw new TypeError("Unknown encoding: "+je);var Ue=E(tt,je)|0,Ae=v(Ue),rt=Ae.write(tt,je);return rt!==Ue&&(Ae=Ae.slice(0,rt)),Ae}function L(tt){for(var je=tt.length<0?0:g(tt.length)|0,Ue=v(je),Ae=0;Ae=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return tt|0}function P(tt){return+tt!=tt&&(tt=0),m.alloc(+tt)}m.isBuffer=function(je){return je!=null&&je._isBuffer===!0&&je!==m.prototype},m.compare=function(je,Ue){if(ar(je,Uint8Array)&&(je=m.from(je,je.offset,je.byteLength)),ar(Ue,Uint8Array)&&(Ue=m.from(Ue,Ue.offset,Ue.byteLength)),!m.isBuffer(je)||!m.isBuffer(Ue))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(je===Ue)return 0;for(var Ae=je.length,rt=Ue.length,St=0,Tt=Math.min(Ae,rt);Strt.length?m.from(Tt).copy(rt,St):Uint8Array.prototype.set.call(rt,Tt,St);else if(m.isBuffer(Tt))Tt.copy(rt,St);else throw new TypeError('"list" argument must be an Array of Buffers');St+=Tt.length}return rt};function E(tt,je){if(m.isBuffer(tt))return tt.length;if(ArrayBuffer.isView(tt)||ar(tt,ArrayBuffer))return tt.byteLength;if(typeof tt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(tt));var Ue=tt.length,Ae=arguments.length>2&&arguments[2]===!0;if(!Ae&&Ue===0)return 0;for(var rt=!1;;)switch(je){case"ascii":case"latin1":case"binary":return Ue;case"utf8":case"utf-8":return lt(tt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ue*2;case"hex":return Ue>>>1;case"base64":return at(tt).length;default:if(rt)return Ae?-1:lt(tt).length;je=(""+je).toLowerCase(),rt=!0}}m.byteLength=E;function z(tt,je,Ue){var Ae=!1;if((je===void 0||je<0)&&(je=0),je>this.length||((Ue===void 0||Ue>this.length)&&(Ue=this.length),Ue<=0)||(Ue>>>=0,je>>>=0,Ue<=je))return"";for(tt||(tt="utf8");;)switch(tt){case"hex":return Se(this,je,Ue);case"utf8":case"utf-8":return _e(this,je,Ue);case"ascii":return ge(this,je,Ue);case"latin1":case"binary":return re(this,je,Ue);case"base64":return ae(this,je,Ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ke(this,je,Ue);default:if(Ae)throw new TypeError("Unknown encoding: "+tt);tt=(tt+"").toLowerCase(),Ae=!0}}m.prototype._isBuffer=!0;function q(tt,je,Ue){var Ae=tt[je];tt[je]=tt[Ue],tt[Ue]=Ae}m.prototype.swap16=function(){var je=this.length;if(je%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ue=0;UeUe&&(je+=" ... "),""},f&&(m.prototype[f]=m.prototype.inspect),m.prototype.compare=function(je,Ue,Ae,rt,St){if(ar(je,Uint8Array)&&(je=m.from(je,je.offset,je.byteLength)),!m.isBuffer(je))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(je));if(Ue===void 0&&(Ue=0),Ae===void 0&&(Ae=je?je.length:0),rt===void 0&&(rt=0),St===void 0&&(St=this.length),Ue<0||Ae>je.length||rt<0||St>this.length)throw new RangeError("out of range index");if(rt>=St&&Ue>=Ae)return 0;if(rt>=St)return-1;if(Ue>=Ae)return 1;if(Ue>>>=0,Ae>>>=0,rt>>>=0,St>>>=0,this===je)return 0;for(var Tt=St-rt,dt=Ae-Ue,Et=Math.min(Tt,dt),pt=this.slice(rt,St),jt=je.slice(Ue,Ae),or=0;or2147483647?Ue=2147483647:Ue<-2147483648&&(Ue=-2147483648),Ue=+Ue,Vt(Ue)&&(Ue=rt?0:tt.length-1),Ue<0&&(Ue=tt.length+Ue),Ue>=tt.length){if(rt)return-1;Ue=tt.length-1}else if(Ue<0)if(rt)Ue=0;else return-1;if(typeof je=="string"&&(je=m.from(je,Ae)),m.isBuffer(je))return je.length===0?-1:G(tt,je,Ue,Ae,rt);if(typeof je=="number")return je=je&255,typeof Uint8Array.prototype.indexOf=="function"?rt?Uint8Array.prototype.indexOf.call(tt,je,Ue):Uint8Array.prototype.lastIndexOf.call(tt,je,Ue):G(tt,[je],Ue,Ae,rt);throw new TypeError("val must be string, number or Buffer")}function G(tt,je,Ue,Ae,rt){var St=1,Tt=tt.length,dt=je.length;if(Ae!==void 0&&(Ae=String(Ae).toLowerCase(),Ae==="ucs2"||Ae==="ucs-2"||Ae==="utf16le"||Ae==="utf-16le")){if(tt.length<2||je.length<2)return-1;St=2,Tt/=2,dt/=2,Ue/=2}function Et(Ar,ei){return St===1?Ar[ei]:Ar.readUInt16BE(ei*St)}var pt;if(rt){var jt=-1;for(pt=Ue;ptTt&&(Ue=Tt-dt),pt=Ue;pt>=0;pt--){for(var or=!0,mr=0;mrrt&&(Ae=rt)):Ae=rt;var St=je.length;Ae>St/2&&(Ae=St/2);for(var Tt=0;Tt>>0,isFinite(Ae)?(Ae=Ae>>>0,rt===void 0&&(rt="utf8")):(rt=Ae,Ae=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var St=this.length-Ue;if((Ae===void 0||Ae>St)&&(Ae=St),je.length>0&&(Ae<0||Ue<0)||Ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");rt||(rt="utf8");for(var Tt=!1;;)switch(rt){case"hex":return Z(this,je,Ue,Ae);case"utf8":case"utf-8":return j(this,je,Ue,Ae);case"ascii":case"latin1":case"binary":return N(this,je,Ue,Ae);case"base64":return H(this,je,Ue,Ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie(this,je,Ue,Ae);default:if(Tt)throw new TypeError("Unknown encoding: "+rt);rt=(""+rt).toLowerCase(),Tt=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ae(tt,je,Ue){return je===0&&Ue===tt.length?u.fromByteArray(tt):u.fromByteArray(tt.slice(je,Ue))}function _e(tt,je,Ue){Ue=Math.min(tt.length,Ue);for(var Ae=[],rt=je;rt239?4:St>223?3:St>191?2:1;if(rt+dt<=Ue){var Et,pt,jt,or;switch(dt){case 1:St<128&&(Tt=St);break;case 2:Et=tt[rt+1],(Et&192)===128&&(or=(St&31)<<6|Et&63,or>127&&(Tt=or));break;case 3:Et=tt[rt+1],pt=tt[rt+2],(Et&192)===128&&(pt&192)===128&&(or=(St&15)<<12|(Et&63)<<6|pt&63,or>2047&&(or<55296||or>57343)&&(Tt=or));break;case 4:Et=tt[rt+1],pt=tt[rt+2],jt=tt[rt+3],(Et&192)===128&&(pt&192)===128&&(jt&192)===128&&(or=(St&15)<<18|(Et&63)<<12|(pt&63)<<6|jt&63,or>65535&&or<1114112&&(Tt=or))}}Tt===null?(Tt=65533,dt=1):Tt>65535&&(Tt-=65536,Ae.push(Tt>>>10&1023|55296),Tt=56320|Tt&1023),Ae.push(Tt),rt+=dt}return Ce(Ae)}var Ee=4096;function Ce(tt){var je=tt.length;if(je<=Ee)return String.fromCharCode.apply(String,tt);for(var Ue="",Ae=0;AeAe)&&(Ue=Ae);for(var rt="",St=je;StAe&&(je=Ae),Ue<0?(Ue+=Ae,Ue<0&&(Ue=0)):Ue>Ae&&(Ue=Ae),UeUe)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUintLE=m.prototype.readUIntLE=function(je,Ue,Ae){je=je>>>0,Ue=Ue>>>0,Ae||be(je,Ue,this.length);for(var rt=this[je],St=1,Tt=0;++Tt>>0,Ue=Ue>>>0,Ae||be(je,Ue,this.length);for(var rt=this[je+--Ue],St=1;Ue>0&&(St*=256);)rt+=this[je+--Ue]*St;return rt},m.prototype.readUint8=m.prototype.readUInt8=function(je,Ue){return je=je>>>0,Ue||be(je,1,this.length),this[je]},m.prototype.readUint16LE=m.prototype.readUInt16LE=function(je,Ue){return je=je>>>0,Ue||be(je,2,this.length),this[je]|this[je+1]<<8},m.prototype.readUint16BE=m.prototype.readUInt16BE=function(je,Ue){return je=je>>>0,Ue||be(je,2,this.length),this[je]<<8|this[je+1]},m.prototype.readUint32LE=m.prototype.readUInt32LE=function(je,Ue){return je=je>>>0,Ue||be(je,4,this.length),(this[je]|this[je+1]<<8|this[je+2]<<16)+this[je+3]*16777216},m.prototype.readUint32BE=m.prototype.readUInt32BE=function(je,Ue){return je=je>>>0,Ue||be(je,4,this.length),this[je]*16777216+(this[je+1]<<16|this[je+2]<<8|this[je+3])},m.prototype.readIntLE=function(je,Ue,Ae){je=je>>>0,Ue=Ue>>>0,Ae||be(je,Ue,this.length);for(var rt=this[je],St=1,Tt=0;++Tt=St&&(rt-=Math.pow(2,8*Ue)),rt},m.prototype.readIntBE=function(je,Ue,Ae){je=je>>>0,Ue=Ue>>>0,Ae||be(je,Ue,this.length);for(var rt=Ue,St=1,Tt=this[je+--rt];rt>0&&(St*=256);)Tt+=this[je+--rt]*St;return St*=128,Tt>=St&&(Tt-=Math.pow(2,8*Ue)),Tt},m.prototype.readInt8=function(je,Ue){return je=je>>>0,Ue||be(je,1,this.length),this[je]&128?(255-this[je]+1)*-1:this[je]},m.prototype.readInt16LE=function(je,Ue){je=je>>>0,Ue||be(je,2,this.length);var Ae=this[je]|this[je+1]<<8;return Ae&32768?Ae|4294901760:Ae},m.prototype.readInt16BE=function(je,Ue){je=je>>>0,Ue||be(je,2,this.length);var Ae=this[je+1]|this[je]<<8;return Ae&32768?Ae|4294901760:Ae},m.prototype.readInt32LE=function(je,Ue){return je=je>>>0,Ue||be(je,4,this.length),this[je]|this[je+1]<<8|this[je+2]<<16|this[je+3]<<24},m.prototype.readInt32BE=function(je,Ue){return je=je>>>0,Ue||be(je,4,this.length),this[je]<<24|this[je+1]<<16|this[je+2]<<8|this[je+3]},m.prototype.readFloatLE=function(je,Ue){return je=je>>>0,Ue||be(je,4,this.length),c.read(this,je,!0,23,4)},m.prototype.readFloatBE=function(je,Ue){return je=je>>>0,Ue||be(je,4,this.length),c.read(this,je,!1,23,4)},m.prototype.readDoubleLE=function(je,Ue){return je=je>>>0,Ue||be(je,8,this.length),c.read(this,je,!0,52,8)},m.prototype.readDoubleBE=function(je,Ue){return je=je>>>0,Ue||be(je,8,this.length),c.read(this,je,!1,52,8)};function Be(tt,je,Ue,Ae,rt,St){if(!m.isBuffer(tt))throw new TypeError('"buffer" argument must be a Buffer instance');if(je>rt||jett.length)throw new RangeError("Index out of range")}m.prototype.writeUintLE=m.prototype.writeUIntLE=function(je,Ue,Ae,rt){if(je=+je,Ue=Ue>>>0,Ae=Ae>>>0,!rt){var St=Math.pow(2,8*Ae)-1;Be(this,je,Ue,Ae,St,0)}var Tt=1,dt=0;for(this[Ue]=je&255;++dt>>0,Ae=Ae>>>0,!rt){var St=Math.pow(2,8*Ae)-1;Be(this,je,Ue,Ae,St,0)}var Tt=Ae-1,dt=1;for(this[Ue+Tt]=je&255;--Tt>=0&&(dt*=256);)this[Ue+Tt]=je/dt&255;return Ue+Ae},m.prototype.writeUint8=m.prototype.writeUInt8=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||Be(this,je,Ue,1,255,0),this[Ue]=je&255,Ue+1},m.prototype.writeUint16LE=m.prototype.writeUInt16LE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||Be(this,je,Ue,2,65535,0),this[Ue]=je&255,this[Ue+1]=je>>>8,Ue+2},m.prototype.writeUint16BE=m.prototype.writeUInt16BE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||Be(this,je,Ue,2,65535,0),this[Ue]=je>>>8,this[Ue+1]=je&255,Ue+2},m.prototype.writeUint32LE=m.prototype.writeUInt32LE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||Be(this,je,Ue,4,4294967295,0),this[Ue+3]=je>>>24,this[Ue+2]=je>>>16,this[Ue+1]=je>>>8,this[Ue]=je&255,Ue+4},m.prototype.writeUint32BE=m.prototype.writeUInt32BE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||Be(this,je,Ue,4,4294967295,0),this[Ue]=je>>>24,this[Ue+1]=je>>>16,this[Ue+2]=je>>>8,this[Ue+3]=je&255,Ue+4},m.prototype.writeIntLE=function(je,Ue,Ae,rt){if(je=+je,Ue=Ue>>>0,!rt){var St=Math.pow(2,8*Ae-1);Be(this,je,Ue,Ae,St-1,-St)}var Tt=0,dt=1,Et=0;for(this[Ue]=je&255;++Tt>0)-Et&255;return Ue+Ae},m.prototype.writeIntBE=function(je,Ue,Ae,rt){if(je=+je,Ue=Ue>>>0,!rt){var St=Math.pow(2,8*Ae-1);Be(this,je,Ue,Ae,St-1,-St)}var Tt=Ae-1,dt=1,Et=0;for(this[Ue+Tt]=je&255;--Tt>=0&&(dt*=256);)je<0&&Et===0&&this[Ue+Tt+1]!==0&&(Et=1),this[Ue+Tt]=(je/dt>>0)-Et&255;return Ue+Ae},m.prototype.writeInt8=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||Be(this,je,Ue,1,127,-128),je<0&&(je=255+je+1),this[Ue]=je&255,Ue+1},m.prototype.writeInt16LE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||Be(this,je,Ue,2,32767,-32768),this[Ue]=je&255,this[Ue+1]=je>>>8,Ue+2},m.prototype.writeInt16BE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||Be(this,je,Ue,2,32767,-32768),this[Ue]=je>>>8,this[Ue+1]=je&255,Ue+2},m.prototype.writeInt32LE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||Be(this,je,Ue,4,2147483647,-2147483648),this[Ue]=je&255,this[Ue+1]=je>>>8,this[Ue+2]=je>>>16,this[Ue+3]=je>>>24,Ue+4},m.prototype.writeInt32BE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||Be(this,je,Ue,4,2147483647,-2147483648),je<0&&(je=4294967295+je+1),this[Ue]=je>>>24,this[Ue+1]=je>>>16,this[Ue+2]=je>>>8,this[Ue+3]=je&255,Ue+4};function Le(tt,je,Ue,Ae,rt,St){if(Ue+Ae>tt.length)throw new RangeError("Index out of range");if(Ue<0)throw new RangeError("Index out of range")}function me(tt,je,Ue,Ae,rt){return je=+je,Ue=Ue>>>0,rt||Le(tt,je,Ue,4,34028234663852886e22,-34028234663852886e22),c.write(tt,je,Ue,Ae,23,4),Ue+4}m.prototype.writeFloatLE=function(je,Ue,Ae){return me(this,je,Ue,!0,Ae)},m.prototype.writeFloatBE=function(je,Ue,Ae){return me(this,je,Ue,!1,Ae)};function Pe(tt,je,Ue,Ae,rt){return je=+je,Ue=Ue>>>0,rt||Le(tt,je,Ue,8,17976931348623157e292,-17976931348623157e292),c.write(tt,je,Ue,Ae,52,8),Ue+8}m.prototype.writeDoubleLE=function(je,Ue,Ae){return Pe(this,je,Ue,!0,Ae)},m.prototype.writeDoubleBE=function(je,Ue,Ae){return Pe(this,je,Ue,!1,Ae)},m.prototype.copy=function(je,Ue,Ae,rt){if(!m.isBuffer(je))throw new TypeError("argument should be a Buffer");if(Ae||(Ae=0),!rt&&rt!==0&&(rt=this.length),Ue>=je.length&&(Ue=je.length),Ue||(Ue=0),rt>0&&rt=this.length)throw new RangeError("Index out of range");if(rt<0)throw new RangeError("sourceEnd out of bounds");rt>this.length&&(rt=this.length),je.length-Ue>>0,Ae=Ae===void 0?this.length:Ae>>>0,je||(je=0);var Tt;if(typeof je=="number")for(Tt=Ue;Tt55295&&Ue<57344){if(!rt){if(Ue>56319){(je-=3)>-1&&St.push(239,191,189);continue}else if(Tt+1===Ae){(je-=3)>-1&&St.push(239,191,189);continue}rt=Ue;continue}if(Ue<56320){(je-=3)>-1&&St.push(239,191,189),rt=Ue;continue}Ue=(rt-55296<<10|Ue-56320)+65536}else rt&&(je-=3)>-1&&St.push(239,191,189);if(rt=null,Ue<128){if((je-=1)<0)break;St.push(Ue)}else if(Ue<2048){if((je-=2)<0)break;St.push(Ue>>6|192,Ue&63|128)}else if(Ue<65536){if((je-=3)<0)break;St.push(Ue>>12|224,Ue>>6&63|128,Ue&63|128)}else if(Ue<1114112){if((je-=4)<0)break;St.push(Ue>>18|240,Ue>>12&63|128,Ue>>6&63|128,Ue&63|128)}else throw new Error("Invalid code point")}return St}function mt(tt){for(var je=[],Ue=0;Ue>8,rt=Ue%256,St.push(rt),St.push(Ae);return St}function at(tt){return u.toByteArray(He(tt))}function ct(tt,je,Ue,Ae){for(var rt=0;rt=je.length||rt>=tt.length);++rt)je[rt+Ue]=tt[rt];return rt}function ar(tt,je){return tt instanceof je||tt!=null&&tt.constructor!=null&&tt.constructor.name!=null&&tt.constructor.name===je.name}function Vt(tt){return tt!==tt}var rr=function(){for(var tt="0123456789abcdef",je=new Array(256),Ue=0;Ue<16;++Ue)for(var Ae=Ue*16,rt=0;rt<16;++rt)je[Ae+rt]=tt[Ue]+tt[rt];return je}()},9216:function(i){"use strict";i.exports=l,i.exports.isMobile=l,i.exports.default=l;var a=/(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,o=/CrOS/,s=/android|ipad|playbook|silk/i;function l(u){u||(u={});var c=u.ua;if(!c&&typeof navigator!="undefined"&&(c=navigator.userAgent),c&&c.headers&&typeof c.headers["user-agent"]=="string"&&(c=c.headers["user-agent"]),typeof c!="string")return!1;var f=a.test(c)&&!o.test(c)||!!u.tablet&&s.test(c);return!f&&u.tablet&&u.featureDetect&&navigator&&navigator.maxTouchPoints>1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(f=!0),f}},6296:function(i,a,o){"use strict";i.exports=h;var s=o(7261),l=o(9977),u=o(1811);function c(d,v){this._controllerNames=Object.keys(d),this._controllerList=this._controllerNames.map(function(m){return d[m]}),this._mode=v,this._active=d[v],this._active||(this._mode="turntable",this._active=d.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 f=c.prototype;f.flush=function(d){for(var v=this._controllerList,m=0;m0)throw new Error("Invalid string. Length must be a multiple of 4");var L=M.indexOf("=");L===-1&&(L=T);var x=L===T?0:4-L%4;return[L,x]}function d(M){var T=h(M),L=T[0],x=T[1];return(L+x)*3/4-x}function v(M,T,L){return(T+L)*3/4-L}function m(M){var T,L=h(M),x=L[0],C=L[1],S=new l(v(M,x,C)),g=0,P=C>0?x-4:x,E;for(E=0;E>16&255,S[g++]=T>>8&255,S[g++]=T&255;return C===2&&(T=s[M.charCodeAt(E)]<<2|s[M.charCodeAt(E+1)]>>4,S[g++]=T&255),C===1&&(T=s[M.charCodeAt(E)]<<10|s[M.charCodeAt(E+1)]<<4|s[M.charCodeAt(E+2)]>>2,S[g++]=T>>8&255,S[g++]=T&255),S}function b(M){return o[M>>18&63]+o[M>>12&63]+o[M>>6&63]+o[M&63]}function p(M,T,L){for(var x,C=[],S=T;SP?P:g+S));return x===1?(T=M[L-1],C.push(o[T>>2]+o[T<<4&63]+"==")):x===2&&(T=(M[L-2]<<8)+M[L-1],C.push(o[T>>10]+o[T>>4&63]+o[T<<2&63]+"=")),C.join("")}},3865:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]).add(c[0].mul(u[1])),u[1].mul(c[1]))}},1318:function(i){"use strict";i.exports=a;function a(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}},8697:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}},7842:function(i,a,o){"use strict";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),h=o(8697);i.exports=d;function d(v,m){if(s(v))return m?h(v,d(m)):[v[0].clone(),v[1].clone()];var b=0,p,k;if(l(v))p=v.clone();else if(typeof v=="string")p=c(v);else{if(v===0)return[u(0),u(1)];if(v===Math.floor(v))p=u(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),b-=256;p=u(v)}}if(s(m))p.mul(m[1]),k=m[0].clone();else if(l(m))k=m.clone();else if(typeof m=="string")k=c(m);else if(!m)k=u(1);else if(m===Math.floor(m))k=u(m);else{for(;m!==Math.floor(m);)m=m*Math.pow(2,256),b+=256;k=u(m)}return b>0?p=p.ushln(b):b<0&&(k=k.ushln(-b)),f(p,k)}},6330:function(i,a,o){"use strict";var s=o(1533);i.exports=l;function l(u){return Array.isArray(u)&&u.length===2&&s(u[0])&&s(u[1])}},5716:function(i,a,o){"use strict";var s=o(6859);i.exports=l;function l(u){return u.cmp(new s(0))}},1369:function(i,a,o){"use strict";var s=o(5716);i.exports=l;function l(u){var c=u.length,f=u.words,h=0;if(c===1)h=f[0];else if(c===2)h=f[0]+f[1]*67108864;else for(var d=0;d20?52:h+32}},1533:function(i,a,o){"use strict";var s=o(6859);i.exports=l;function l(u){return u&&typeof u=="object"&&!!u.words}},2651:function(i,a,o){"use strict";var s=o(6859),l=o(2361);i.exports=u;function u(c){var f=l.exponent(c);return f<52?new s(c):new s(c*Math.pow(2,52-f)).ushln(f-52)}},869:function(i,a,o){"use strict";var s=o(2651),l=o(5716);i.exports=u;function u(c,f){var h=l(c),d=l(f);if(h===0)return[s(0),s(1)];if(d===0)return[s(0),s(0)];d<0&&(c=c.neg(),f=f.neg());var v=c.gcd(f);return v.cmpn(1)?[c.div(v),f.div(v)]:[c,f]}},6768:function(i,a,o){"use strict";var s=o(6859);i.exports=l;function l(u){return new s(u)}},6504:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[0]),u[1].mul(c[1]))}},7721:function(i,a,o){"use strict";var s=o(5716);i.exports=l;function l(u){return s(u[0])*s(u[1])}},5572:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]).sub(u[1].mul(c[0])),u[1].mul(c[1]))}},946:function(i,a,o){"use strict";var s=o(1369),l=o(4025);i.exports=u;function u(c){var f=c[0],h=c[1];if(f.cmpn(0)===0)return 0;var d=f.abs().divmod(h.abs()),v=d.div,m=s(v),b=d.mod,p=f.negative!==h.negative?-1:1;if(b.cmpn(0)===0)return p*m;if(m){var k=l(m)+4,M=s(b.ushln(k).divRound(h));return p*(m+M*Math.pow(2,-k))}else{var T=h.bitLength()-b.bitLength()+53,M=s(b.ushln(T).divRound(h));return T<1023?p*M*Math.pow(2,-T):(M*=Math.pow(2,-1023),p*M*Math.pow(2,1023-T))}}},2478:function(i){"use strict";function a(f,h,d,v,m){for(var b=m+1;v<=m;){var p=v+m>>>1,k=f[p],M=d!==void 0?d(k,h):k-h;M>=0?(b=p,m=p-1):v=p+1}return b}function o(f,h,d,v,m){for(var b=m+1;v<=m;){var p=v+m>>>1,k=f[p],M=d!==void 0?d(k,h):k-h;M>0?(b=p,m=p-1):v=p+1}return b}function s(f,h,d,v,m){for(var b=v-1;v<=m;){var p=v+m>>>1,k=f[p],M=d!==void 0?d(k,h):k-h;M<0?(b=p,v=p+1):m=p-1}return b}function l(f,h,d,v,m){for(var b=v-1;v<=m;){var p=v+m>>>1,k=f[p],M=d!==void 0?d(k,h):k-h;M<=0?(b=p,v=p+1):m=p-1}return b}function u(f,h,d,v,m){for(;v<=m;){var b=v+m>>>1,p=f[b],k=d!==void 0?d(p,h):p-h;if(k===0)return b;k<=0?v=b+1:m=b-1}return-1}function c(f,h,d,v,m,b){return typeof d=="function"?b(f,h,d,v===void 0?0:v|0,m===void 0?f.length-1:m|0):b(f,h,void 0,d===void 0?0:d|0,v===void 0?f.length-1:v|0)}i.exports={ge:function(f,h,d,v,m){return c(f,h,d,v,m,a)},gt:function(f,h,d,v,m){return c(f,h,d,v,m,o)},lt:function(f,h,d,v,m){return c(f,h,d,v,m,s)},le:function(f,h,d,v,m){return c(f,h,d,v,m,l)},eq:function(f,h,d,v,m){return c(f,h,d,v,m,u)}}},8828:function(i,a){"use strict";"use restrict";var o=32;a.INT_BITS=o,a.INT_MAX=2147483647,a.INT_MIN=-1<0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},a.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},a.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}a.countTrailingZeros=s,a.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;u[c]=h<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},a.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},a.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},a.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},6859:function(i,a,o){i=o.nmd(i),function(s,l){"use strict";function u(j,N){if(!j)throw new Error(N||"Assertion failed")}function c(j,N){j.super_=N;var H=function(){};H.prototype=N.prototype,j.prototype=new H,j.prototype.constructor=j}function f(j,N,H){if(f.isBN(j))return j;this.negative=0,this.words=null,this.length=0,this.red=null,j!==null&&((N==="le"||N==="be")&&(H=N,N=10),this._init(j||0,N||10,H||"be"))}typeof s=="object"?s.exports=f:l.BN=f,f.BN=f,f.wordSize=26;var h;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?h=window.Buffer:h=o(7790).Buffer}catch(j){}f.isBN=function(N){return N instanceof f?!0:N!==null&&typeof N=="object"&&N.constructor.wordSize===f.wordSize&&Array.isArray(N.words)},f.max=function(N,H){return N.cmp(H)>0?N:H},f.min=function(N,H){return N.cmp(H)<0?N:H},f.prototype._init=function(N,H,ie){if(typeof N=="number")return this._initNumber(N,H,ie);if(typeof N=="object")return this._initArray(N,H,ie);H==="hex"&&(H=16),u(H===(H|0)&&H>=2&&H<=36),N=N.toString().replace(/\s+/g,"");var ae=0;N[0]==="-"&&(ae++,this.negative=1),ae=0;ae-=3)Ee=N[ae]|N[ae-1]<<8|N[ae-2]<<16,this.words[_e]|=Ee<>>26-Ce&67108863,Ce+=24,Ce>=26&&(Ce-=26,_e++);else if(ie==="le")for(ae=0,_e=0;ae>>26-Ce&67108863,Ce+=24,Ce>=26&&(Ce-=26,_e++);return this.strip()};function d(j,N){var H=j.charCodeAt(N);return H>=65&&H<=70?H-55:H>=97&&H<=102?H-87:H-48&15}function v(j,N,H){var ie=d(j,H);return H-1>=N&&(ie|=d(j,H-1)<<4),ie}f.prototype._parseHex=function(N,H,ie){this.length=Math.ceil((N.length-H)/6),this.words=new Array(this.length);for(var ae=0;ae=H;ae-=2)Ce=v(N,H,ae)<<_e,this.words[Ee]|=Ce&67108863,_e>=18?(_e-=18,Ee+=1,this.words[Ee]|=Ce>>>26):_e+=8;else{var ge=N.length-H;for(ae=ge%2===0?H+1:H;ae=18?(_e-=18,Ee+=1,this.words[Ee]|=Ce>>>26):_e+=8}this.strip()};function m(j,N,H,ie){for(var ae=0,_e=Math.min(j.length,H),Ee=N;Ee<_e;Ee++){var Ce=j.charCodeAt(Ee)-48;ae*=ie,Ce>=49?ae+=Ce-49+10:Ce>=17?ae+=Ce-17+10:ae+=Ce}return ae}f.prototype._parseBase=function(N,H,ie){this.words=[0],this.length=1;for(var ae=0,_e=1;_e<=67108863;_e*=H)ae++;ae--,_e=_e/H|0;for(var Ee=N.length-ie,Ce=Ee%ae,ge=Math.min(Ee,Ee-Ce)+ie,re=0,Se=ie;Se1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?""};var b=["","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"],p=[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],k=[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];f.prototype.toString=function(N,H){N=N||10,H=H|0||1;var ie;if(N===16||N==="hex"){ie="";for(var ae=0,_e=0,Ee=0;Ee>>24-ae&16777215,ae+=2,ae>=26&&(ae-=26,Ee--),_e!==0||Ee!==this.length-1?ie=b[6-ge.length]+ge+ie:ie=ge+ie}for(_e!==0&&(ie=_e.toString(16)+ie);ie.length%H!==0;)ie="0"+ie;return this.negative!==0&&(ie="-"+ie),ie}if(N===(N|0)&&N>=2&&N<=36){var re=p[N],Se=k[N];ie="";var ke=this.clone();for(ke.negative=0;!ke.isZero();){var be=ke.modn(Se).toString(N);ke=ke.idivn(Se),ke.isZero()?ie=be+ie:ie=b[re-be.length]+be+ie}for(this.isZero()&&(ie="0"+ie);ie.length%H!==0;)ie="0"+ie;return this.negative!==0&&(ie="-"+ie),ie}u(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var N=this.words[0];return this.length===2?N+=this.words[1]*67108864:this.length===3&&this.words[2]===1?N+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-N:N},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(N,H){return u(typeof h!="undefined"),this.toArrayLike(h,N,H)},f.prototype.toArray=function(N,H){return this.toArrayLike(Array,N,H)},f.prototype.toArrayLike=function(N,H,ie){var ae=this.byteLength(),_e=ie||Math.max(1,ae);u(ae<=_e,"byte array longer than desired length"),u(_e>0,"Requested array length <= 0"),this.strip();var Ee=H==="le",Ce=new N(_e),ge,re,Se=this.clone();if(Ee){for(re=0;!Se.isZero();re++)ge=Se.andln(255),Se.iushrn(8),Ce[re]=ge;for(;re<_e;re++)Ce[re]=0}else{for(re=0;re<_e-ae;re++)Ce[re]=0;for(re=0;!Se.isZero();re++)ge=Se.andln(255),Se.iushrn(8),Ce[_e-re-1]=ge}return Ce},Math.clz32?f.prototype._countBits=function(N){return 32-Math.clz32(N)}:f.prototype._countBits=function(N){var H=N,ie=0;return H>=4096&&(ie+=13,H>>>=13),H>=64&&(ie+=7,H>>>=7),H>=8&&(ie+=4,H>>>=4),H>=2&&(ie+=2,H>>>=2),ie+H},f.prototype._zeroBits=function(N){if(N===0)return 26;var H=N,ie=0;return(H&8191)===0&&(ie+=13,H>>>=13),(H&127)===0&&(ie+=7,H>>>=7),(H&15)===0&&(ie+=4,H>>>=4),(H&3)===0&&(ie+=2,H>>>=2),(H&1)===0&&ie++,ie},f.prototype.bitLength=function(){var N=this.words[this.length-1],H=this._countBits(N);return(this.length-1)*26+H};function M(j){for(var N=new Array(j.bitLength()),H=0;H>>ae}return N}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var N=0,H=0;HN.length?this.clone().ior(N):N.clone().ior(this)},f.prototype.uor=function(N){return this.length>N.length?this.clone().iuor(N):N.clone().iuor(this)},f.prototype.iuand=function(N){var H;this.length>N.length?H=N:H=this;for(var ie=0;ieN.length?this.clone().iand(N):N.clone().iand(this)},f.prototype.uand=function(N){return this.length>N.length?this.clone().iuand(N):N.clone().iuand(this)},f.prototype.iuxor=function(N){var H,ie;this.length>N.length?(H=this,ie=N):(H=N,ie=this);for(var ae=0;aeN.length?this.clone().ixor(N):N.clone().ixor(this)},f.prototype.uxor=function(N){return this.length>N.length?this.clone().iuxor(N):N.clone().iuxor(this)},f.prototype.inotn=function(N){u(typeof N=="number"&&N>=0);var H=Math.ceil(N/26)|0,ie=N%26;this._expand(H),ie>0&&H--;for(var ae=0;ae0&&(this.words[ae]=~this.words[ae]&67108863>>26-ie),this.strip()},f.prototype.notn=function(N){return this.clone().inotn(N)},f.prototype.setn=function(N,H){u(typeof N=="number"&&N>=0);var ie=N/26|0,ae=N%26;return this._expand(ie+1),H?this.words[ie]=this.words[ie]|1<N.length?(ie=this,ae=N):(ie=N,ae=this);for(var _e=0,Ee=0;Ee>>26;for(;_e!==0&&Ee>>26;if(this.length=ie.length,_e!==0)this.words[this.length]=_e,this.length++;else if(ie!==this)for(;EeN.length?this.clone().iadd(N):N.clone().iadd(this)},f.prototype.isub=function(N){if(N.negative!==0){N.negative=0;var H=this.iadd(N);return N.negative=1,H._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(N),this.negative=1,this._normSign();var ie=this.cmp(N);if(ie===0)return this.negative=0,this.length=1,this.words[0]=0,this;var ae,_e;ie>0?(ae=this,_e=N):(ae=N,_e=this);for(var Ee=0,Ce=0;Ce<_e.length;Ce++)H=(ae.words[Ce]|0)-(_e.words[Ce]|0)+Ee,Ee=H>>26,this.words[Ce]=H&67108863;for(;Ee!==0&&Ce>26,this.words[Ce]=H&67108863;if(Ee===0&&Ce>>26,ke=ge&67108863,be=Math.min(re,N.length-1),Be=Math.max(0,re-j.length+1);Be<=be;Be++){var Le=re-Be|0;ae=j.words[Le]|0,_e=N.words[Be]|0,Ee=ae*_e+ke,Se+=Ee/67108864|0,ke=Ee&67108863}H.words[re]=ke|0,ge=Se|0}return ge!==0?H.words[re]=ge|0:H.length--,H.strip()}var L=function(N,H,ie){var ae=N.words,_e=H.words,Ee=ie.words,Ce=0,ge,re,Se,ke=ae[0]|0,be=ke&8191,Be=ke>>>13,Le=ae[1]|0,me=Le&8191,Pe=Le>>>13,ce=ae[2]|0,He=ce&8191,lt=ce>>>13,mt=ae[3]|0,Ht=mt&8191,at=mt>>>13,ct=ae[4]|0,ar=ct&8191,Vt=ct>>>13,rr=ae[5]|0,tt=rr&8191,je=rr>>>13,Ue=ae[6]|0,Ae=Ue&8191,rt=Ue>>>13,St=ae[7]|0,Tt=St&8191,dt=St>>>13,Et=ae[8]|0,pt=Et&8191,jt=Et>>>13,or=ae[9]|0,mr=or&8191,Ar=or>>>13,ei=_e[0]|0,qr=ei&8191,jr=ei>>>13,gt=_e[1]|0,Ge=gt&8191,Je=gt>>>13,We=_e[2]|0,et=We&8191,xt=We>>>13,At=_e[3]|0,Kt=At&8191,Qt=At>>>13,Mr=_e[4]|0,Gr=Mr&8191,Ir=Mr>>>13,Yr=_e[5]|0,_i=Yr&8191,Pi=Yr>>>13,ai=_e[6]|0,mi=ai&8191,un=ai>>>13,Fn=_e[7]|0,An=Fn&8191,Hn=Fn>>>13,Qn=_e[8]|0,Vi=Qn&8191,Kn=Qn>>>13,Jn=_e[9]|0,Gt=Jn&8191,wt=Jn>>>13;ie.negative=N.negative^H.negative,ie.length=19,ge=Math.imul(be,qr),re=Math.imul(be,jr),re=re+Math.imul(Be,qr)|0,Se=Math.imul(Be,jr);var tr=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(tr>>>26)|0,tr&=67108863,ge=Math.imul(me,qr),re=Math.imul(me,jr),re=re+Math.imul(Pe,qr)|0,Se=Math.imul(Pe,jr),ge=ge+Math.imul(be,Ge)|0,re=re+Math.imul(be,Je)|0,re=re+Math.imul(Be,Ge)|0,Se=Se+Math.imul(Be,Je)|0;var ir=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(ir>>>26)|0,ir&=67108863,ge=Math.imul(He,qr),re=Math.imul(He,jr),re=re+Math.imul(lt,qr)|0,Se=Math.imul(lt,jr),ge=ge+Math.imul(me,Ge)|0,re=re+Math.imul(me,Je)|0,re=re+Math.imul(Pe,Ge)|0,Se=Se+Math.imul(Pe,Je)|0,ge=ge+Math.imul(be,et)|0,re=re+Math.imul(be,xt)|0,re=re+Math.imul(Be,et)|0,Se=Se+Math.imul(Be,xt)|0;var wr=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(wr>>>26)|0,wr&=67108863,ge=Math.imul(Ht,qr),re=Math.imul(Ht,jr),re=re+Math.imul(at,qr)|0,Se=Math.imul(at,jr),ge=ge+Math.imul(He,Ge)|0,re=re+Math.imul(He,Je)|0,re=re+Math.imul(lt,Ge)|0,Se=Se+Math.imul(lt,Je)|0,ge=ge+Math.imul(me,et)|0,re=re+Math.imul(me,xt)|0,re=re+Math.imul(Pe,et)|0,Se=Se+Math.imul(Pe,xt)|0,ge=ge+Math.imul(be,Kt)|0,re=re+Math.imul(be,Qt)|0,re=re+Math.imul(Be,Kt)|0,Se=Se+Math.imul(Be,Qt)|0;var Xr=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,ge=Math.imul(ar,qr),re=Math.imul(ar,jr),re=re+Math.imul(Vt,qr)|0,Se=Math.imul(Vt,jr),ge=ge+Math.imul(Ht,Ge)|0,re=re+Math.imul(Ht,Je)|0,re=re+Math.imul(at,Ge)|0,Se=Se+Math.imul(at,Je)|0,ge=ge+Math.imul(He,et)|0,re=re+Math.imul(He,xt)|0,re=re+Math.imul(lt,et)|0,Se=Se+Math.imul(lt,xt)|0,ge=ge+Math.imul(me,Kt)|0,re=re+Math.imul(me,Qt)|0,re=re+Math.imul(Pe,Kt)|0,Se=Se+Math.imul(Pe,Qt)|0,ge=ge+Math.imul(be,Gr)|0,re=re+Math.imul(be,Ir)|0,re=re+Math.imul(Be,Gr)|0,Se=Se+Math.imul(Be,Ir)|0;var ti=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(ti>>>26)|0,ti&=67108863,ge=Math.imul(tt,qr),re=Math.imul(tt,jr),re=re+Math.imul(je,qr)|0,Se=Math.imul(je,jr),ge=ge+Math.imul(ar,Ge)|0,re=re+Math.imul(ar,Je)|0,re=re+Math.imul(Vt,Ge)|0,Se=Se+Math.imul(Vt,Je)|0,ge=ge+Math.imul(Ht,et)|0,re=re+Math.imul(Ht,xt)|0,re=re+Math.imul(at,et)|0,Se=Se+Math.imul(at,xt)|0,ge=ge+Math.imul(He,Kt)|0,re=re+Math.imul(He,Qt)|0,re=re+Math.imul(lt,Kt)|0,Se=Se+Math.imul(lt,Qt)|0,ge=ge+Math.imul(me,Gr)|0,re=re+Math.imul(me,Ir)|0,re=re+Math.imul(Pe,Gr)|0,Se=Se+Math.imul(Pe,Ir)|0,ge=ge+Math.imul(be,_i)|0,re=re+Math.imul(be,Pi)|0,re=re+Math.imul(Be,_i)|0,Se=Se+Math.imul(Be,Pi)|0;var $r=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+($r>>>26)|0,$r&=67108863,ge=Math.imul(Ae,qr),re=Math.imul(Ae,jr),re=re+Math.imul(rt,qr)|0,Se=Math.imul(rt,jr),ge=ge+Math.imul(tt,Ge)|0,re=re+Math.imul(tt,Je)|0,re=re+Math.imul(je,Ge)|0,Se=Se+Math.imul(je,Je)|0,ge=ge+Math.imul(ar,et)|0,re=re+Math.imul(ar,xt)|0,re=re+Math.imul(Vt,et)|0,Se=Se+Math.imul(Vt,xt)|0,ge=ge+Math.imul(Ht,Kt)|0,re=re+Math.imul(Ht,Qt)|0,re=re+Math.imul(at,Kt)|0,Se=Se+Math.imul(at,Qt)|0,ge=ge+Math.imul(He,Gr)|0,re=re+Math.imul(He,Ir)|0,re=re+Math.imul(lt,Gr)|0,Se=Se+Math.imul(lt,Ir)|0,ge=ge+Math.imul(me,_i)|0,re=re+Math.imul(me,Pi)|0,re=re+Math.imul(Pe,_i)|0,Se=Se+Math.imul(Pe,Pi)|0,ge=ge+Math.imul(be,mi)|0,re=re+Math.imul(be,un)|0,re=re+Math.imul(Be,mi)|0,Se=Se+Math.imul(Be,un)|0;var Ri=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(Ri>>>26)|0,Ri&=67108863,ge=Math.imul(Tt,qr),re=Math.imul(Tt,jr),re=re+Math.imul(dt,qr)|0,Se=Math.imul(dt,jr),ge=ge+Math.imul(Ae,Ge)|0,re=re+Math.imul(Ae,Je)|0,re=re+Math.imul(rt,Ge)|0,Se=Se+Math.imul(rt,Je)|0,ge=ge+Math.imul(tt,et)|0,re=re+Math.imul(tt,xt)|0,re=re+Math.imul(je,et)|0,Se=Se+Math.imul(je,xt)|0,ge=ge+Math.imul(ar,Kt)|0,re=re+Math.imul(ar,Qt)|0,re=re+Math.imul(Vt,Kt)|0,Se=Se+Math.imul(Vt,Qt)|0,ge=ge+Math.imul(Ht,Gr)|0,re=re+Math.imul(Ht,Ir)|0,re=re+Math.imul(at,Gr)|0,Se=Se+Math.imul(at,Ir)|0,ge=ge+Math.imul(He,_i)|0,re=re+Math.imul(He,Pi)|0,re=re+Math.imul(lt,_i)|0,Se=Se+Math.imul(lt,Pi)|0,ge=ge+Math.imul(me,mi)|0,re=re+Math.imul(me,un)|0,re=re+Math.imul(Pe,mi)|0,Se=Se+Math.imul(Pe,un)|0,ge=ge+Math.imul(be,An)|0,re=re+Math.imul(be,Hn)|0,re=re+Math.imul(Be,An)|0,Se=Se+Math.imul(Be,Hn)|0;var Zi=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(Zi>>>26)|0,Zi&=67108863,ge=Math.imul(pt,qr),re=Math.imul(pt,jr),re=re+Math.imul(jt,qr)|0,Se=Math.imul(jt,jr),ge=ge+Math.imul(Tt,Ge)|0,re=re+Math.imul(Tt,Je)|0,re=re+Math.imul(dt,Ge)|0,Se=Se+Math.imul(dt,Je)|0,ge=ge+Math.imul(Ae,et)|0,re=re+Math.imul(Ae,xt)|0,re=re+Math.imul(rt,et)|0,Se=Se+Math.imul(rt,xt)|0,ge=ge+Math.imul(tt,Kt)|0,re=re+Math.imul(tt,Qt)|0,re=re+Math.imul(je,Kt)|0,Se=Se+Math.imul(je,Qt)|0,ge=ge+Math.imul(ar,Gr)|0,re=re+Math.imul(ar,Ir)|0,re=re+Math.imul(Vt,Gr)|0,Se=Se+Math.imul(Vt,Ir)|0,ge=ge+Math.imul(Ht,_i)|0,re=re+Math.imul(Ht,Pi)|0,re=re+Math.imul(at,_i)|0,Se=Se+Math.imul(at,Pi)|0,ge=ge+Math.imul(He,mi)|0,re=re+Math.imul(He,un)|0,re=re+Math.imul(lt,mi)|0,Se=Se+Math.imul(lt,un)|0,ge=ge+Math.imul(me,An)|0,re=re+Math.imul(me,Hn)|0,re=re+Math.imul(Pe,An)|0,Se=Se+Math.imul(Pe,Hn)|0,ge=ge+Math.imul(be,Vi)|0,re=re+Math.imul(be,Kn)|0,re=re+Math.imul(Be,Vi)|0,Se=Se+Math.imul(Be,Kn)|0;var en=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(en>>>26)|0,en&=67108863,ge=Math.imul(mr,qr),re=Math.imul(mr,jr),re=re+Math.imul(Ar,qr)|0,Se=Math.imul(Ar,jr),ge=ge+Math.imul(pt,Ge)|0,re=re+Math.imul(pt,Je)|0,re=re+Math.imul(jt,Ge)|0,Se=Se+Math.imul(jt,Je)|0,ge=ge+Math.imul(Tt,et)|0,re=re+Math.imul(Tt,xt)|0,re=re+Math.imul(dt,et)|0,Se=Se+Math.imul(dt,xt)|0,ge=ge+Math.imul(Ae,Kt)|0,re=re+Math.imul(Ae,Qt)|0,re=re+Math.imul(rt,Kt)|0,Se=Se+Math.imul(rt,Qt)|0,ge=ge+Math.imul(tt,Gr)|0,re=re+Math.imul(tt,Ir)|0,re=re+Math.imul(je,Gr)|0,Se=Se+Math.imul(je,Ir)|0,ge=ge+Math.imul(ar,_i)|0,re=re+Math.imul(ar,Pi)|0,re=re+Math.imul(Vt,_i)|0,Se=Se+Math.imul(Vt,Pi)|0,ge=ge+Math.imul(Ht,mi)|0,re=re+Math.imul(Ht,un)|0,re=re+Math.imul(at,mi)|0,Se=Se+Math.imul(at,un)|0,ge=ge+Math.imul(He,An)|0,re=re+Math.imul(He,Hn)|0,re=re+Math.imul(lt,An)|0,Se=Se+Math.imul(lt,Hn)|0,ge=ge+Math.imul(me,Vi)|0,re=re+Math.imul(me,Kn)|0,re=re+Math.imul(Pe,Vi)|0,Se=Se+Math.imul(Pe,Kn)|0,ge=ge+Math.imul(be,Gt)|0,re=re+Math.imul(be,wt)|0,re=re+Math.imul(Be,Gt)|0,Se=Se+Math.imul(Be,wt)|0;var fn=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(fn>>>26)|0,fn&=67108863,ge=Math.imul(mr,Ge),re=Math.imul(mr,Je),re=re+Math.imul(Ar,Ge)|0,Se=Math.imul(Ar,Je),ge=ge+Math.imul(pt,et)|0,re=re+Math.imul(pt,xt)|0,re=re+Math.imul(jt,et)|0,Se=Se+Math.imul(jt,xt)|0,ge=ge+Math.imul(Tt,Kt)|0,re=re+Math.imul(Tt,Qt)|0,re=re+Math.imul(dt,Kt)|0,Se=Se+Math.imul(dt,Qt)|0,ge=ge+Math.imul(Ae,Gr)|0,re=re+Math.imul(Ae,Ir)|0,re=re+Math.imul(rt,Gr)|0,Se=Se+Math.imul(rt,Ir)|0,ge=ge+Math.imul(tt,_i)|0,re=re+Math.imul(tt,Pi)|0,re=re+Math.imul(je,_i)|0,Se=Se+Math.imul(je,Pi)|0,ge=ge+Math.imul(ar,mi)|0,re=re+Math.imul(ar,un)|0,re=re+Math.imul(Vt,mi)|0,Se=Se+Math.imul(Vt,un)|0,ge=ge+Math.imul(Ht,An)|0,re=re+Math.imul(Ht,Hn)|0,re=re+Math.imul(at,An)|0,Se=Se+Math.imul(at,Hn)|0,ge=ge+Math.imul(He,Vi)|0,re=re+Math.imul(He,Kn)|0,re=re+Math.imul(lt,Vi)|0,Se=Se+Math.imul(lt,Kn)|0,ge=ge+Math.imul(me,Gt)|0,re=re+Math.imul(me,wt)|0,re=re+Math.imul(Pe,Gt)|0,Se=Se+Math.imul(Pe,wt)|0;var yn=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(yn>>>26)|0,yn&=67108863,ge=Math.imul(mr,et),re=Math.imul(mr,xt),re=re+Math.imul(Ar,et)|0,Se=Math.imul(Ar,xt),ge=ge+Math.imul(pt,Kt)|0,re=re+Math.imul(pt,Qt)|0,re=re+Math.imul(jt,Kt)|0,Se=Se+Math.imul(jt,Qt)|0,ge=ge+Math.imul(Tt,Gr)|0,re=re+Math.imul(Tt,Ir)|0,re=re+Math.imul(dt,Gr)|0,Se=Se+Math.imul(dt,Ir)|0,ge=ge+Math.imul(Ae,_i)|0,re=re+Math.imul(Ae,Pi)|0,re=re+Math.imul(rt,_i)|0,Se=Se+Math.imul(rt,Pi)|0,ge=ge+Math.imul(tt,mi)|0,re=re+Math.imul(tt,un)|0,re=re+Math.imul(je,mi)|0,Se=Se+Math.imul(je,un)|0,ge=ge+Math.imul(ar,An)|0,re=re+Math.imul(ar,Hn)|0,re=re+Math.imul(Vt,An)|0,Se=Se+Math.imul(Vt,Hn)|0,ge=ge+Math.imul(Ht,Vi)|0,re=re+Math.imul(Ht,Kn)|0,re=re+Math.imul(at,Vi)|0,Se=Se+Math.imul(at,Kn)|0,ge=ge+Math.imul(He,Gt)|0,re=re+Math.imul(He,wt)|0,re=re+Math.imul(lt,Gt)|0,Se=Se+Math.imul(lt,wt)|0;var Mn=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,ge=Math.imul(mr,Kt),re=Math.imul(mr,Qt),re=re+Math.imul(Ar,Kt)|0,Se=Math.imul(Ar,Qt),ge=ge+Math.imul(pt,Gr)|0,re=re+Math.imul(pt,Ir)|0,re=re+Math.imul(jt,Gr)|0,Se=Se+Math.imul(jt,Ir)|0,ge=ge+Math.imul(Tt,_i)|0,re=re+Math.imul(Tt,Pi)|0,re=re+Math.imul(dt,_i)|0,Se=Se+Math.imul(dt,Pi)|0,ge=ge+Math.imul(Ae,mi)|0,re=re+Math.imul(Ae,un)|0,re=re+Math.imul(rt,mi)|0,Se=Se+Math.imul(rt,un)|0,ge=ge+Math.imul(tt,An)|0,re=re+Math.imul(tt,Hn)|0,re=re+Math.imul(je,An)|0,Se=Se+Math.imul(je,Hn)|0,ge=ge+Math.imul(ar,Vi)|0,re=re+Math.imul(ar,Kn)|0,re=re+Math.imul(Vt,Vi)|0,Se=Se+Math.imul(Vt,Kn)|0,ge=ge+Math.imul(Ht,Gt)|0,re=re+Math.imul(Ht,wt)|0,re=re+Math.imul(at,Gt)|0,Se=Se+Math.imul(at,wt)|0;var Ba=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,ge=Math.imul(mr,Gr),re=Math.imul(mr,Ir),re=re+Math.imul(Ar,Gr)|0,Se=Math.imul(Ar,Ir),ge=ge+Math.imul(pt,_i)|0,re=re+Math.imul(pt,Pi)|0,re=re+Math.imul(jt,_i)|0,Se=Se+Math.imul(jt,Pi)|0,ge=ge+Math.imul(Tt,mi)|0,re=re+Math.imul(Tt,un)|0,re=re+Math.imul(dt,mi)|0,Se=Se+Math.imul(dt,un)|0,ge=ge+Math.imul(Ae,An)|0,re=re+Math.imul(Ae,Hn)|0,re=re+Math.imul(rt,An)|0,Se=Se+Math.imul(rt,Hn)|0,ge=ge+Math.imul(tt,Vi)|0,re=re+Math.imul(tt,Kn)|0,re=re+Math.imul(je,Vi)|0,Se=Se+Math.imul(je,Kn)|0,ge=ge+Math.imul(ar,Gt)|0,re=re+Math.imul(ar,wt)|0,re=re+Math.imul(Vt,Gt)|0,Se=Se+Math.imul(Vt,wt)|0;var ua=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(ua>>>26)|0,ua&=67108863,ge=Math.imul(mr,_i),re=Math.imul(mr,Pi),re=re+Math.imul(Ar,_i)|0,Se=Math.imul(Ar,Pi),ge=ge+Math.imul(pt,mi)|0,re=re+Math.imul(pt,un)|0,re=re+Math.imul(jt,mi)|0,Se=Se+Math.imul(jt,un)|0,ge=ge+Math.imul(Tt,An)|0,re=re+Math.imul(Tt,Hn)|0,re=re+Math.imul(dt,An)|0,Se=Se+Math.imul(dt,Hn)|0,ge=ge+Math.imul(Ae,Vi)|0,re=re+Math.imul(Ae,Kn)|0,re=re+Math.imul(rt,Vi)|0,Se=Se+Math.imul(rt,Kn)|0,ge=ge+Math.imul(tt,Gt)|0,re=re+Math.imul(tt,wt)|0,re=re+Math.imul(je,Gt)|0,Se=Se+Math.imul(je,wt)|0;var ma=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(ma>>>26)|0,ma&=67108863,ge=Math.imul(mr,mi),re=Math.imul(mr,un),re=re+Math.imul(Ar,mi)|0,Se=Math.imul(Ar,un),ge=ge+Math.imul(pt,An)|0,re=re+Math.imul(pt,Hn)|0,re=re+Math.imul(jt,An)|0,Se=Se+Math.imul(jt,Hn)|0,ge=ge+Math.imul(Tt,Vi)|0,re=re+Math.imul(Tt,Kn)|0,re=re+Math.imul(dt,Vi)|0,Se=Se+Math.imul(dt,Kn)|0,ge=ge+Math.imul(Ae,Gt)|0,re=re+Math.imul(Ae,wt)|0,re=re+Math.imul(rt,Gt)|0,Se=Se+Math.imul(rt,wt)|0;var Wa=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(Wa>>>26)|0,Wa&=67108863,ge=Math.imul(mr,An),re=Math.imul(mr,Hn),re=re+Math.imul(Ar,An)|0,Se=Math.imul(Ar,Hn),ge=ge+Math.imul(pt,Vi)|0,re=re+Math.imul(pt,Kn)|0,re=re+Math.imul(jt,Vi)|0,Se=Se+Math.imul(jt,Kn)|0,ge=ge+Math.imul(Tt,Gt)|0,re=re+Math.imul(Tt,wt)|0,re=re+Math.imul(dt,Gt)|0,Se=Se+Math.imul(dt,wt)|0;var Fa=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,ge=Math.imul(mr,Vi),re=Math.imul(mr,Kn),re=re+Math.imul(Ar,Vi)|0,Se=Math.imul(Ar,Kn),ge=ge+Math.imul(pt,Gt)|0,re=re+Math.imul(pt,wt)|0,re=re+Math.imul(jt,Gt)|0,Se=Se+Math.imul(jt,wt)|0;var Xo=(Ce+ge|0)+((re&8191)<<13)|0;Ce=(Se+(re>>>13)|0)+(Xo>>>26)|0,Xo&=67108863,ge=Math.imul(mr,Gt),re=Math.imul(mr,wt),re=re+Math.imul(Ar,Gt)|0,Se=Math.imul(Ar,wt);var da=(Ce+ge|0)+((re&8191)<<13)|0;return Ce=(Se+(re>>>13)|0)+(da>>>26)|0,da&=67108863,Ee[0]=tr,Ee[1]=ir,Ee[2]=wr,Ee[3]=Xr,Ee[4]=ti,Ee[5]=$r,Ee[6]=Ri,Ee[7]=Zi,Ee[8]=en,Ee[9]=fn,Ee[10]=yn,Ee[11]=Mn,Ee[12]=Ba,Ee[13]=ua,Ee[14]=ma,Ee[15]=Wa,Ee[16]=Fa,Ee[17]=Xo,Ee[18]=da,Ce!==0&&(Ee[19]=Ce,ie.length++),ie};Math.imul||(L=T);function x(j,N,H){H.negative=N.negative^j.negative,H.length=j.length+N.length;for(var ie=0,ae=0,_e=0;_e>>26)|0,ae+=Ee>>>26,Ee&=67108863}H.words[_e]=Ce,ie=Ee,Ee=ae}return ie!==0?H.words[_e]=ie:H.length--,H.strip()}function C(j,N,H){var ie=new S;return ie.mulp(j,N,H)}f.prototype.mulTo=function(N,H){var ie,ae=this.length+N.length;return this.length===10&&N.length===10?ie=L(this,N,H):ae<63?ie=T(this,N,H):ae<1024?ie=x(this,N,H):ie=C(this,N,H),ie};function S(j,N){this.x=j,this.y=N}S.prototype.makeRBT=function(N){for(var H=new Array(N),ie=f.prototype._countBits(N)-1,ae=0;ae>=1;return ae},S.prototype.permute=function(N,H,ie,ae,_e,Ee){for(var Ce=0;Ce>>1)_e++;return 1<<_e+1+ae},S.prototype.conjugate=function(N,H,ie){if(!(ie<=1))for(var ae=0;ae>>13,ie[2*Ee+1]=_e&8191,_e=_e>>>13;for(Ee=2*H;Ee>=26,H+=ae/67108864|0,H+=_e>>>26,this.words[ie]=_e&67108863}return H!==0&&(this.words[ie]=H,this.length++),this.length=N===0?1:this.length,this},f.prototype.muln=function(N){return this.clone().imuln(N)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(N){var H=M(N);if(H.length===0)return new f(1);for(var ie=this,ae=0;ae=0);var H=N%26,ie=(N-H)/26,ae=67108863>>>26-H<<26-H,_e;if(H!==0){var Ee=0;for(_e=0;_e>>26-H}Ee&&(this.words[_e]=Ee,this.length++)}if(ie!==0){for(_e=this.length-1;_e>=0;_e--)this.words[_e+ie]=this.words[_e];for(_e=0;_e=0);var ae;H?ae=(H-H%26)/26:ae=0;var _e=N%26,Ee=Math.min((N-_e)/26,this.length),Ce=67108863^67108863>>>_e<<_e,ge=ie;if(ae-=Ee,ae=Math.max(0,ae),ge){for(var re=0;reEe)for(this.length-=Ee,re=0;re=0&&(Se!==0||re>=ae);re--){var ke=this.words[re]|0;this.words[re]=Se<<26-_e|ke>>>_e,Se=ke&Ce}return ge&&Se!==0&&(ge.words[ge.length++]=Se),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(N,H,ie){return u(this.negative===0),this.iushrn(N,H,ie)},f.prototype.shln=function(N){return this.clone().ishln(N)},f.prototype.ushln=function(N){return this.clone().iushln(N)},f.prototype.shrn=function(N){return this.clone().ishrn(N)},f.prototype.ushrn=function(N){return this.clone().iushrn(N)},f.prototype.testn=function(N){u(typeof N=="number"&&N>=0);var H=N%26,ie=(N-H)/26,ae=1<=0);var H=N%26,ie=(N-H)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=ie)return this;if(H!==0&&ie++,this.length=Math.min(ie,this.length),H!==0){var ae=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},f.prototype.isubn=function(N){if(u(typeof N=="number"),u(N<67108864),N<0)return this.iaddn(-N);if(this.negative!==0)return this.negative=0,this.iaddn(N),this.negative=1,this;if(this.words[0]-=N,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var H=0;H>26)-(ge/67108864|0),this.words[_e+ie]=Ee&67108863}for(;_e>26,this.words[_e+ie]=Ee&67108863;if(Ce===0)return this.strip();for(u(Ce===-1),Ce=0,_e=0;_e>26,this.words[_e]=Ee&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(N,H){var ie=this.length-N.length,ae=this.clone(),_e=N,Ee=_e.words[_e.length-1]|0,Ce=this._countBits(Ee);ie=26-Ce,ie!==0&&(_e=_e.ushln(ie),ae.iushln(ie),Ee=_e.words[_e.length-1]|0);var ge=ae.length-_e.length,re;if(H!=="mod"){re=new f(null),re.length=ge+1,re.words=new Array(re.length);for(var Se=0;Se=0;be--){var Be=(ae.words[_e.length+be]|0)*67108864+(ae.words[_e.length+be-1]|0);for(Be=Math.min(Be/Ee|0,67108863),ae._ishlnsubmul(_e,Be,be);ae.negative!==0;)Be--,ae.negative=0,ae._ishlnsubmul(_e,1,be),ae.isZero()||(ae.negative^=1);re&&(re.words[be]=Be)}return re&&re.strip(),ae.strip(),H!=="div"&&ie!==0&&ae.iushrn(ie),{div:re||null,mod:ae}},f.prototype.divmod=function(N,H,ie){if(u(!N.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var ae,_e,Ee;return this.negative!==0&&N.negative===0?(Ee=this.neg().divmod(N,H),H!=="mod"&&(ae=Ee.div.neg()),H!=="div"&&(_e=Ee.mod.neg(),ie&&_e.negative!==0&&_e.iadd(N)),{div:ae,mod:_e}):this.negative===0&&N.negative!==0?(Ee=this.divmod(N.neg(),H),H!=="mod"&&(ae=Ee.div.neg()),{div:ae,mod:Ee.mod}):(this.negative&N.negative)!==0?(Ee=this.neg().divmod(N.neg(),H),H!=="div"&&(_e=Ee.mod.neg(),ie&&_e.negative!==0&&_e.isub(N)),{div:Ee.div,mod:_e}):N.length>this.length||this.cmp(N)<0?{div:new f(0),mod:this}:N.length===1?H==="div"?{div:this.divn(N.words[0]),mod:null}:H==="mod"?{div:null,mod:new f(this.modn(N.words[0]))}:{div:this.divn(N.words[0]),mod:new f(this.modn(N.words[0]))}:this._wordDiv(N,H)},f.prototype.div=function(N){return this.divmod(N,"div",!1).div},f.prototype.mod=function(N){return this.divmod(N,"mod",!1).mod},f.prototype.umod=function(N){return this.divmod(N,"mod",!0).mod},f.prototype.divRound=function(N){var H=this.divmod(N);if(H.mod.isZero())return H.div;var ie=H.div.negative!==0?H.mod.isub(N):H.mod,ae=N.ushrn(1),_e=N.andln(1),Ee=ie.cmp(ae);return Ee<0||_e===1&&Ee===0?H.div:H.div.negative!==0?H.div.isubn(1):H.div.iaddn(1)},f.prototype.modn=function(N){u(N<=67108863);for(var H=(1<<26)%N,ie=0,ae=this.length-1;ae>=0;ae--)ie=(H*ie+(this.words[ae]|0))%N;return ie},f.prototype.idivn=function(N){u(N<=67108863);for(var H=0,ie=this.length-1;ie>=0;ie--){var ae=(this.words[ie]|0)+H*67108864;this.words[ie]=ae/N|0,H=ae%N}return this.strip()},f.prototype.divn=function(N){return this.clone().idivn(N)},f.prototype.egcd=function(N){u(N.negative===0),u(!N.isZero());var H=this,ie=N.clone();H.negative!==0?H=H.umod(N):H=H.clone();for(var ae=new f(1),_e=new f(0),Ee=new f(0),Ce=new f(1),ge=0;H.isEven()&&ie.isEven();)H.iushrn(1),ie.iushrn(1),++ge;for(var re=ie.clone(),Se=H.clone();!H.isZero();){for(var ke=0,be=1;(H.words[0]&be)===0&&ke<26;++ke,be<<=1);if(ke>0)for(H.iushrn(ke);ke-- >0;)(ae.isOdd()||_e.isOdd())&&(ae.iadd(re),_e.isub(Se)),ae.iushrn(1),_e.iushrn(1);for(var Be=0,Le=1;(ie.words[0]&Le)===0&&Be<26;++Be,Le<<=1);if(Be>0)for(ie.iushrn(Be);Be-- >0;)(Ee.isOdd()||Ce.isOdd())&&(Ee.iadd(re),Ce.isub(Se)),Ee.iushrn(1),Ce.iushrn(1);H.cmp(ie)>=0?(H.isub(ie),ae.isub(Ee),_e.isub(Ce)):(ie.isub(H),Ee.isub(ae),Ce.isub(_e))}return{a:Ee,b:Ce,gcd:ie.iushln(ge)}},f.prototype._invmp=function(N){u(N.negative===0),u(!N.isZero());var H=this,ie=N.clone();H.negative!==0?H=H.umod(N):H=H.clone();for(var ae=new f(1),_e=new f(0),Ee=ie.clone();H.cmpn(1)>0&&ie.cmpn(1)>0;){for(var Ce=0,ge=1;(H.words[0]&ge)===0&&Ce<26;++Ce,ge<<=1);if(Ce>0)for(H.iushrn(Ce);Ce-- >0;)ae.isOdd()&&ae.iadd(Ee),ae.iushrn(1);for(var re=0,Se=1;(ie.words[0]&Se)===0&&re<26;++re,Se<<=1);if(re>0)for(ie.iushrn(re);re-- >0;)_e.isOdd()&&_e.iadd(Ee),_e.iushrn(1);H.cmp(ie)>=0?(H.isub(ie),ae.isub(_e)):(ie.isub(H),_e.isub(ae))}var ke;return H.cmpn(1)===0?ke=ae:ke=_e,ke.cmpn(0)<0&&ke.iadd(N),ke},f.prototype.gcd=function(N){if(this.isZero())return N.abs();if(N.isZero())return this.abs();var H=this.clone(),ie=N.clone();H.negative=0,ie.negative=0;for(var ae=0;H.isEven()&&ie.isEven();ae++)H.iushrn(1),ie.iushrn(1);do{for(;H.isEven();)H.iushrn(1);for(;ie.isEven();)ie.iushrn(1);var _e=H.cmp(ie);if(_e<0){var Ee=H;H=ie,ie=Ee}else if(_e===0||ie.cmpn(1)===0)break;H.isub(ie)}while(!0);return ie.iushln(ae)},f.prototype.invm=function(N){return this.egcd(N).a.umod(N)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(N){return this.words[0]&N},f.prototype.bincn=function(N){u(typeof N=="number");var H=N%26,ie=(N-H)/26,ae=1<>>26,Ce&=67108863,this.words[Ee]=Ce}return _e!==0&&(this.words[Ee]=_e,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(N){var H=N<0;if(this.negative!==0&&!H)return-1;if(this.negative===0&&H)return 1;this.strip();var ie;if(this.length>1)ie=1;else{H&&(N=-N),u(N<=67108863,"Number is too big");var ae=this.words[0]|0;ie=ae===N?0:aeN.length)return 1;if(this.length=0;ie--){var ae=this.words[ie]|0,_e=N.words[ie]|0;if(ae!==_e){ae<_e?H=-1:ae>_e&&(H=1);break}}return H},f.prototype.gtn=function(N){return this.cmpn(N)===1},f.prototype.gt=function(N){return this.cmp(N)===1},f.prototype.gten=function(N){return this.cmpn(N)>=0},f.prototype.gte=function(N){return this.cmp(N)>=0},f.prototype.ltn=function(N){return this.cmpn(N)===-1},f.prototype.lt=function(N){return this.cmp(N)===-1},f.prototype.lten=function(N){return this.cmpn(N)<=0},f.prototype.lte=function(N){return this.cmp(N)<=0},f.prototype.eqn=function(N){return this.cmpn(N)===0},f.prototype.eq=function(N){return this.cmp(N)===0},f.red=function(N){return new G(N)},f.prototype.toRed=function(N){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),N.convertTo(this)._forceRed(N)},f.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(N){return this.red=N,this},f.prototype.forceRed=function(N){return u(!this.red,"Already a number in reduction context"),this._forceRed(N)},f.prototype.redAdd=function(N){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,N)},f.prototype.redIAdd=function(N){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,N)},f.prototype.redSub=function(N){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,N)},f.prototype.redISub=function(N){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,N)},f.prototype.redShl=function(N){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,N)},f.prototype.redMul=function(N){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,N),this.red.mul(this,N)},f.prototype.redIMul=function(N){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,N),this.red.imul(this,N)},f.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(N){return u(this.red&&!N.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,N)};var g={k256:null,p224:null,p192:null,p25519:null};function P(j,N){this.name=j,this.p=new f(N,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}P.prototype._tmp=function(){var N=new f(null);return N.words=new Array(Math.ceil(this.n/13)),N},P.prototype.ireduce=function(N){var H=N,ie;do this.split(H,this.tmp),H=this.imulK(H),H=H.iadd(this.tmp),ie=H.bitLength();while(ie>this.n);var ae=ie0?H.isub(this.p):H.strip!==void 0?H.strip():H._strip(),H},P.prototype.split=function(N,H){N.iushrn(this.n,0,H)},P.prototype.imulK=function(N){return N.imul(this.k)};function E(){P.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}c(E,P),E.prototype.split=function(N,H){for(var ie=4194303,ae=Math.min(N.length,9),_e=0;_e>>22,Ee=Ce}Ee>>>=22,N.words[_e-10]=Ee,Ee===0&&N.length>10?N.length-=10:N.length-=9},E.prototype.imulK=function(N){N.words[N.length]=0,N.words[N.length+1]=0,N.length+=2;for(var H=0,ie=0;ie>>=26,N.words[ie]=_e,H=ae}return H!==0&&(N.words[N.length++]=H),N},f._prime=function(N){if(g[N])return g[N];var H;if(N==="k256")H=new E;else if(N==="p224")H=new z;else if(N==="p192")H=new q;else if(N==="p25519")H=new V;else throw new Error("Unknown prime "+N);return g[N]=H,H};function G(j){if(typeof j=="string"){var N=f._prime(j);this.m=N.p,this.prime=N}else u(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}G.prototype._verify1=function(N){u(N.negative===0,"red works only with positives"),u(N.red,"red works only with red numbers")},G.prototype._verify2=function(N,H){u((N.negative|H.negative)===0,"red works only with positives"),u(N.red&&N.red===H.red,"red works only with red numbers")},G.prototype.imod=function(N){return this.prime?this.prime.ireduce(N)._forceRed(this):N.umod(this.m)._forceRed(this)},G.prototype.neg=function(N){return N.isZero()?N.clone():this.m.sub(N)._forceRed(this)},G.prototype.add=function(N,H){this._verify2(N,H);var ie=N.add(H);return ie.cmp(this.m)>=0&&ie.isub(this.m),ie._forceRed(this)},G.prototype.iadd=function(N,H){this._verify2(N,H);var ie=N.iadd(H);return ie.cmp(this.m)>=0&&ie.isub(this.m),ie},G.prototype.sub=function(N,H){this._verify2(N,H);var ie=N.sub(H);return ie.cmpn(0)<0&&ie.iadd(this.m),ie._forceRed(this)},G.prototype.isub=function(N,H){this._verify2(N,H);var ie=N.isub(H);return ie.cmpn(0)<0&&ie.iadd(this.m),ie},G.prototype.shl=function(N,H){return this._verify1(N),this.imod(N.ushln(H))},G.prototype.imul=function(N,H){return this._verify2(N,H),this.imod(N.imul(H))},G.prototype.mul=function(N,H){return this._verify2(N,H),this.imod(N.mul(H))},G.prototype.isqr=function(N){return this.imul(N,N.clone())},G.prototype.sqr=function(N){return this.mul(N,N)},G.prototype.sqrt=function(N){if(N.isZero())return N.clone();var H=this.m.andln(3);if(u(H%2===1),H===3){var ie=this.m.add(new f(1)).iushrn(2);return this.pow(N,ie)}for(var ae=this.m.subn(1),_e=0;!ae.isZero()&&ae.andln(1)===0;)_e++,ae.iushrn(1);u(!ae.isZero());var Ee=new f(1).toRed(this),Ce=Ee.redNeg(),ge=this.m.subn(1).iushrn(1),re=this.m.bitLength();for(re=new f(2*re*re).toRed(this);this.pow(re,ge).cmp(Ce)!==0;)re.redIAdd(Ce);for(var Se=this.pow(re,ae),ke=this.pow(N,ae.addn(1).iushrn(1)),be=this.pow(N,ae),Be=_e;be.cmp(Ee)!==0;){for(var Le=be,me=0;Le.cmp(Ee)!==0;me++)Le=Le.redSqr();u(me=0;_e--){for(var Se=H.words[_e],ke=re-1;ke>=0;ke--){var be=Se>>ke&1;if(Ee!==ae[0]&&(Ee=this.sqr(Ee)),be===0&&Ce===0){ge=0;continue}Ce<<=1,Ce|=be,ge++,!(ge!==ie&&(_e!==0||ke!==0))&&(Ee=this.mul(Ee,ae[Ce]),ge=0,Ce=0)}re=26}return Ee},G.prototype.convertTo=function(N){var H=N.umod(this.m);return H===N?H.clone():H},G.prototype.convertFrom=function(N){var H=N.clone();return H.red=null,H},f.mont=function(N){return new Z(N)};function Z(j){G.call(this,j),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(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)}c(Z,G),Z.prototype.convertTo=function(N){return this.imod(N.ushln(this.shift))},Z.prototype.convertFrom=function(N){var H=this.imod(N.mul(this.rinv));return H.red=null,H},Z.prototype.imul=function(N,H){if(N.isZero()||H.isZero())return N.words[0]=0,N.length=1,N;var ie=N.imul(H),ae=ie.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=ie.isub(ae).iushrn(this.shift),Ee=_e;return _e.cmp(this.m)>=0?Ee=_e.isub(this.m):_e.cmpn(0)<0&&(Ee=_e.iadd(this.m)),Ee._forceRed(this)},Z.prototype.mul=function(N,H){if(N.isZero()||H.isZero())return new f(0)._forceRed(this);var ie=N.mul(H),ae=ie.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=ie.isub(ae).iushrn(this.shift),Ee=_e;return _e.cmp(this.m)>=0?Ee=_e.isub(this.m):_e.cmpn(0)<0&&(Ee=_e.iadd(this.m)),Ee._forceRed(this)},Z.prototype.invm=function(N){var H=this.imod(N._invmp(this.m).mul(this.r2));return H._forceRed(this)}}(i,this)},6204:function(i){"use strict";i.exports=a;function a(o){var s,l,u,c=o.length,f=0;for(s=0;s>>1;if(!(S<=0)){var g,P=s.mallocDouble(2*S*x),E=s.mallocInt32(x);if(x=f(k,S,P,E),x>0){if(S===1&&L)l.init(x),g=l.sweepComplete(S,T,0,x,P,E,0,x,P,E);else{var z=s.mallocDouble(2*S*C),q=s.mallocInt32(C);C=f(M,S,z,q),C>0&&(l.init(x+C),S===1?g=l.sweepBipartite(S,T,0,x,P,E,0,C,z,q):g=u(S,T,L,x,P,E,C,z,q),s.free(z),s.free(q))}s.free(P),s.free(E)}return g}}}var d;function v(k,M){d.push([k,M])}function m(k){return d=[],h(k,k,v,!0),d}function b(k,M){return d=[],h(k,M,v,!1),d}function p(k,M,T){switch(arguments.length){case 1:return m(k);case 2:return typeof M=="function"?h(k,k,M,!0):b(k,M);case 3:return h(k,M,T,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(i,a){"use strict";function o(){function u(h,d,v,m,b,p,k,M,T,L,x){for(var C=2*h,S=m,g=C*m;ST-M?u(h,d,v,m,b,p,k,M,T,L,x):c(h,d,v,m,b,p,k,M,T,L,x)}return f}function s(){function u(v,m,b,p,k,M,T,L,x,C,S){for(var g=2*v,P=p,E=g*p;PC-x?p?u(v,m,b,k,M,T,L,x,C,S,g):c(v,m,b,k,M,T,L,x,C,S,g):p?f(v,m,b,k,M,T,L,x,C,S,g):h(v,m,b,k,M,T,L,x,C,S,g)}return d}function l(u){return u?o():s()}a.partial=l(!1),a.full=l(!0)},7150:function(i,a,o){"use strict";i.exports=j;var s=o(1888),l=o(8828),u=o(2455),c=u.partial,f=u.full,h=o(855),d=o(3545),v=o(8105),m=128,b=1<<22,p=1<<22,k=v("!(lo>=p0)&&!(p1>=hi)"),M=v("lo===p0"),T=v("lo0;){Se-=1;var Be=Se*S,Le=E[Be],me=E[Be+1],Pe=E[Be+2],ce=E[Be+3],He=E[Be+4],lt=E[Be+5],mt=Se*g,Ht=z[mt],at=z[mt+1],ct=lt&1,ar=!!(lt&16),Vt=_e,rr=Ee,tt=ge,je=re;if(ct&&(Vt=ge,rr=re,tt=_e,je=Ee),!(lt&2&&(Pe=T(N,Le,me,Pe,Vt,rr,at),me>=Pe))&&!(lt&4&&(me=L(N,Le,me,Pe,Vt,rr,Ht),me>=Pe))){var Ue=Pe-me,Ae=He-ce;if(ar){if(N*Ue*(Ue+Ae)v&&b[C+d]>L;--x,C-=k){for(var S=C,g=C+k,P=0;P>>1,L=2*h,x=T,C=b[L*T+d];k=z?(x=E,C=z):P>=V?(x=g,C=P):(x=q,C=V):z>=V?(x=E,C=z):V>=P?(x=g,C=P):(x=q,C=V);for(var j=L*(M-1),N=L*x,G=0;G=p0)&&!(p1>=hi)":d};function o(v){return a[v]}function s(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+g];if(z===T)if(S===E)S+=1,C+=L;else{for(var q=0;L>q;++q){var V=k[x+q];k[x+q]=k[C],k[C++]=V}var G=M[E];M[E]=M[S],M[S++]=G}}return S}function l(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+g];if(zq;++q){var V=k[x+q];k[x+q]=k[C],k[C++]=V}var G=M[E];M[E]=M[S],M[S++]=G}}return S}function u(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+P];if(z<=T)if(S===E)S+=1,C+=L;else{for(var q=0;L>q;++q){var V=k[x+q];k[x+q]=k[C],k[C++]=V}var G=M[E];M[E]=M[S],M[S++]=G}}return S}function c(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+P];if(z<=T)if(S===E)S+=1,C+=L;else{for(var q=0;L>q;++q){var V=k[x+q];k[x+q]=k[C],k[C++]=V}var G=M[E];M[E]=M[S],M[S++]=G}}return S}function f(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+g],q=k[x+P];if(z<=T&&T<=q)if(S===E)S+=1,C+=L;else{for(var V=0;L>V;++V){var G=k[x+V];k[x+V]=k[C],k[C++]=G}var Z=M[E];M[E]=M[S],M[S++]=Z}}return S}function h(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+g],q=k[x+P];if(zV;++V){var G=k[x+V];k[x+V]=k[C],k[C++]=G}var Z=M[E];M[E]=M[S],M[S++]=Z}}return S}function d(v,m,b,p,k,M,T,L){for(var x=2*v,C=x*b,S=C,g=b,P=m,E=v+m,z=b;p>z;++z,C+=x){var q=k[C+P],V=k[C+E];if(!(q>=T)&&!(L>=V))if(g===z)g+=1,S+=x;else{for(var G=0;x>G;++G){var Z=k[C+G];k[C+G]=k[S],k[S++]=Z}var j=M[z];M[z]=M[g],M[g++]=j}}return g}},4192:function(i){"use strict";i.exports=o;var a=32;function o(m,b){b<=4*a?s(0,b-1,m):v(0,b-1,m)}function s(m,b,p){for(var k=2*(m+1),M=m+1;M<=b;++M){for(var T=p[k++],L=p[k++],x=M,C=k-2;x-- >m;){var S=p[C-2],g=p[C-1];if(Sp[b+1]:!0}function d(m,b,p,k){m*=2;var M=k[m];return M>1,x=L-k,C=L+k,S=M,g=x,P=L,E=C,z=T,q=m+1,V=b-1,G=0;h(S,g,p)&&(G=S,S=g,g=G),h(E,z,p)&&(G=E,E=z,z=G),h(S,P,p)&&(G=S,S=P,P=G),h(g,P,p)&&(G=g,g=P,P=G),h(S,E,p)&&(G=S,S=E,E=G),h(P,E,p)&&(G=P,P=E,E=G),h(g,z,p)&&(G=g,g=z,z=G),h(g,P,p)&&(G=g,g=P,P=G),h(E,z,p)&&(G=E,E=z,z=G);for(var Z=p[2*g],j=p[2*g+1],N=p[2*E],H=p[2*E+1],ie=2*S,ae=2*P,_e=2*z,Ee=2*M,Ce=2*L,ge=2*T,re=0;re<2;++re){var Se=p[ie+re],ke=p[ae+re],be=p[_e+re];p[Ee+re]=Se,p[Ce+re]=ke,p[ge+re]=be}u(x,m,p),u(C,b,p);for(var Be=q;Be<=V;++Be)if(d(Be,Z,j,p))Be!==q&&l(Be,q,p),++q;else if(!d(Be,N,H,p))for(;;)if(d(V,N,H,p)){d(V,Z,j,p)?(c(Be,q,V,p),++q,--V):(l(Be,V,p),--V);break}else{if(--V>>1;u(k,ke);for(var be=0,Be=0,Ce=0;Ce=c)Le=Le-c|0,T(v,m,Be--,Le);else if(Le>=0)T(h,d,be--,Le);else if(Le<=-c){Le=-Le-c|0;for(var me=0;me>>1;u(k,ke);for(var be=0,Be=0,Le=0,Ce=0;Ce>1===k[2*Ce+3]>>1&&(Pe=2,Ce+=1),me<0){for(var ce=-(me>>1)-1,He=0;He>1)-1;Pe===0?T(h,d,be--,ce):Pe===1?T(v,m,Be--,ce):Pe===2&&T(b,p,Le--,ce)}}}function S(P,E,z,q,V,G,Z,j,N,H,ie,ae){var _e=0,Ee=2*P,Ce=E,ge=E+P,re=1,Se=1;q?Se=c:re=c;for(var ke=V;ke>>1;u(k,me);for(var Pe=0,ke=0;ke=c?(He=!q,be-=c):(He=!!q,be-=1),He)L(h,d,Pe++,be);else{var lt=ae[be],mt=Ee*be,Ht=ie[mt+E+1],at=ie[mt+E+1+P];e:for(var ct=0;ct>>1;u(k,be);for(var Be=0,ge=0;ge=c)h[Be++]=re-c;else{re-=1;var me=ie[re],Pe=_e*re,ce=H[Pe+E+1],He=H[Pe+E+1+P];e:for(var lt=0;lt=0;--lt)if(h[lt]===re){for(var ct=lt+1;ct0;){for(var M=d.pop(),b=d.pop(),T=-1,L=-1,p=m[b],C=1;C=0||(h.flip(b,M),u(f,h,d,T,b,L),u(f,h,d,b,L,T),u(f,h,d,L,M,T),u(f,h,d,M,T,L))}}},5023:function(i,a,o){"use strict";var s=o(2478);i.exports=d;function l(v,m,b,p,k,M,T){this.cells=v,this.neighbor=m,this.flags=p,this.constraint=b,this.active=k,this.next=M,this.boundary=T}var u=l.prototype;function c(v,m){return v[0]-m[0]||v[1]-m[1]||v[2]-m[2]}u.locate=function(){var v=[0,0,0];return function(m,b,p){var k=m,M=b,T=p;return b0||T.length>0;){for(;M.length>0;){var g=M.pop();if(L[g]!==-k){L[g]=k;for(var P=x[g],E=0;E<3;++E){var z=S[3*g+E];z>=0&&L[z]===0&&(C[3*g+E]?T.push(z):(M.push(z),L[z]=k))}}}var q=T;T=M,M=q,T.length=0,k=-k}var V=h(x,L,m);return b?V.concat(p.boundary):V}},8902:function(i,a,o){"use strict";var s=o(2478),l=o(3250)[3],u=0,c=1,f=2;i.exports=T;function h(L,x,C,S,g){this.a=L,this.b=x,this.idx=C,this.lowerIds=S,this.upperIds=g}function d(L,x,C,S){this.a=L,this.b=x,this.type=C,this.idx=S}function v(L,x){var C=L.a[0]-x.a[0]||L.a[1]-x.a[1]||L.type-x.type;return C||L.type!==u&&(C=l(L.a,L.b,x.b),C)?C:L.idx-x.idx}function m(L,x){return l(L.a,L.b,x)}function b(L,x,C,S,g){for(var P=s.lt(x,S,m),E=s.gt(x,S,m),z=P;z1&&l(C[V[Z-2]],C[V[Z-1]],S)>0;)L.push([V[Z-1],V[Z-2],g]),Z-=1;V.length=Z,V.push(g);for(var G=q.upperIds,Z=G.length;Z>1&&l(C[G[Z-2]],C[G[Z-1]],S)<0;)L.push([G[Z-2],G[Z-1],g]),Z-=1;G.length=Z,G.push(g)}}function p(L,x){var C;return L.a[0]q[0]&&g.push(new d(q,z,f,P),new d(z,q,c,P))}g.sort(v);for(var V=g[0].a[0]-(1+Math.abs(g[0].a[0]))*Math.pow(2,-52),G=[new h([V,1],[V,0],-1,[],[],[],[])],Z=[],P=0,j=g.length;P=0}}(),u.removeTriangle=function(h,d,v){var m=this.stars;c(m[h],d,v),c(m[d],v,h),c(m[v],h,d)},u.addTriangle=function(h,d,v){var m=this.stars;m[h].push(d,v),m[d].push(v,h),m[v].push(h,d)},u.opposite=function(h,d){for(var v=this.stars[d],m=1,b=v.length;m=0;--N){var Se=Z[N];H=Se[0];var ke=V[H],be=ke[0],Be=ke[1],Le=q[be],me=q[Be];if((Le[0]-me[0]||Le[1]-me[1])<0){var Pe=be;be=Be,Be=Pe}ke[0]=be;var ce=ke[1]=Se[1],He;for(j&&(He=ke[2]);N>0&&Z[N-1][0]===H;){var Se=Z[--N],lt=Se[1];j?V.push([ce,lt,He]):V.push([ce,lt]),ce=lt}j?V.push([ce,Be,He]):V.push([ce,Be])}return ie}function x(q,V,G){for(var Z=V.length,j=new s(Z),N=[],H=0;HV[2]?1:0)}function g(q,V,G){if(q.length!==0){if(V)for(var Z=0;Z0||H.length>0}function z(q,V,G){var Z;if(G){Z=V;for(var j=new Array(V.length),N=0;NL+1)throw new Error(M+" map requires nshades to be at least size "+k.length);Array.isArray(d.alpha)?d.alpha.length!==2?x=[1,1]:x=d.alpha.slice():typeof d.alpha=="number"?x=[d.alpha,d.alpha]:x=[1,1],v=k.map(function(z){return Math.round(z.index*L)}),x[0]=Math.min(Math.max(x[0],0),1),x[1]=Math.min(Math.max(x[1],0),1);var S=k.map(function(z,q){var V=k[q].index,G=k[q].rgb.slice();return G.length===4&&G[3]>=0&&G[3]<=1||(G[3]=x[0]+(x[1]-x[0])*V),G}),g=[];for(C=0;C=0}function d(v,m,b,p){var k=s(m,b,p);if(k===0){var M=l(s(v,m,b)),T=l(s(v,m,p));if(M===T){if(M===0){var L=h(v,m,b),x=h(v,m,p);return L===x?0:L?1:-1}return 0}else{if(T===0)return M>0||h(v,m,p)?-1:1;if(M===0)return T>0||h(v,m,b)?1:-1}return l(T-M)}var C=s(v,m,b);if(C>0)return k>0&&s(v,m,p)>0?1:-1;if(C<0)return k>0||s(v,m,p)>0?1:-1;var S=s(v,m,p);return S>0||h(v,m,b)?1:-1}},8572:function(i){"use strict";i.exports=function(o){return o<0?-1:o>0?1:0}},8507:function(i){i.exports=s;var a=Math.min;function o(l,u){return l-u}function s(l,u){var c=l.length,f=l.length-u.length;if(f)return f;switch(c){case 0:return 0;case 1:return l[0]-u[0];case 2:return l[0]+l[1]-u[0]-u[1]||a(l[0],l[1])-a(u[0],u[1]);case 3:var h=l[0]+l[1],d=u[0]+u[1];if(f=h+l[2]-(d+u[2]),f)return f;var v=a(l[0],l[1]),m=a(u[0],u[1]);return a(v,l[2])-a(m,u[2])||a(v+l[2],h)-a(m+u[2],d);case 4:var b=l[0],p=l[1],k=l[2],M=l[3],T=u[0],L=u[1],x=u[2],C=u[3];return b+p+k+M-(T+L+x+C)||a(b,p,k,M)-a(T,L,x,C,T)||a(b+p,b+k,b+M,p+k,p+M,k+M)-a(T+L,T+x,T+C,L+x,L+C,x+C)||a(b+p+k,b+p+M,b+k+M,p+k+M)-a(T+L+x,T+L+C,T+x+C,L+x+C);default:for(var S=l.slice().sort(o),g=u.slice().sort(o),P=0;Po[l][0]&&(l=u);return sl?[[l],[s]]:[[s]]}},4750:function(i,a,o){"use strict";i.exports=l;var s=o(3090);function l(u){var c=s(u),f=c.length;if(f<=2)return[];for(var h=new Array(f),d=c[f-1],v=0;v=d[T]&&(M+=1);p[k]=M}}return h}function f(h,d){try{return s(h,!0)}catch(p){var v=l(h);if(v.length<=d)return[];var m=u(h,v),b=s(m,!0);return c(b,v)}}},4769:function(i){"use strict";function a(s,l,u,c,f,h){var d=6*f*f-6*f,v=3*f*f-4*f+1,m=-6*f*f+6*f,b=3*f*f-2*f;if(s.length){h||(h=new Array(s.length));for(var p=s.length-1;p>=0;--p)h[p]=d*s[p]+v*l[p]+m*u[p]+b*c[p];return h}return d*s+v*l+m*u[p]+b*c}function o(s,l,u,c,f,h){var d=f-1,v=f*f,m=d*d,b=(1+2*f)*m,p=f*m,k=v*(3-2*f),M=v*d;if(s.length){h||(h=new Array(s.length));for(var T=s.length-1;T>=0;--T)h[T]=b*s[T]+p*l[T]+k*u[T]+M*c[T];return h}return b*s+p*l+k*u+M*c}i.exports=o,i.exports.derivative=a},7642:function(i,a,o){"use strict";var s=o(8954),l=o(1682);i.exports=h;function u(d,v){this.point=d,this.index=v}function c(d,v){for(var m=d.point,b=v.point,p=m.length,k=0;k=2)return!1;G[j]=N}return!0}):V=V.filter(function(G){for(var Z=0;Z<=b;++Z){var j=P[G[Z]];if(j<0)return!1;G[Z]=j}return!0}),b&1)for(var M=0;M>>31},i.exports.exponent=function(k){var M=i.exports.hi(k);return(M<<1>>>21)-1023},i.exports.fraction=function(k){var M=i.exports.lo(k),T=i.exports.hi(k),L=T&(1<<20)-1;return T&2146435072&&(L+=1048576),[M,L]},i.exports.denormalized=function(k){var M=i.exports.hi(k);return!(M&2146435072)}},1338:function(i){"use strict";function a(l,u,c){var f=l[c]|0;if(f<=0)return[];var h=new Array(f),d;if(c===l.length-1)for(d=0;d0)return o(l|0,u);break;case"object":if(typeof l.length=="number")return a(l,u,0);break}return[]}i.exports=s},3134:function(i,a,o){"use strict";i.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!="number"){c=0;for(var h=0;h=b-1)for(var C=M.length-1,g=v-m[b-1],S=0;S=b-1)for(var x=M.length-1,C=v-m[b-1],S=0;S=0;--b)if(v[--m])return!1;return!0},f.jump=function(v){var m=this.lastT(),b=this.dimension;if(!(v0;--S)p.push(u(L[S-1],x[S-1],arguments[S])),k.push(0)}},f.push=function(v){var m=this.lastT(),b=this.dimension;if(!(v1e-6?1/T:0;this._time.push(v);for(var g=b;g>0;--g){var P=u(x[g-1],C[g-1],arguments[g]);p.push(P),k.push((P-p[M++])*S)}}},f.set=function(v){var m=this.dimension;if(!(v0;--L)b.push(u(M[L-1],T[L-1],arguments[L])),p.push(0)}},f.move=function(v){var m=this.lastT(),b=this.dimension;if(!(v<=m||arguments.length!==b+1)){var p=this._state,k=this._velocity,M=p.length-this.dimension,T=this.bounds,L=T[0],x=T[1],C=v-m,S=C>1e-6?1/C:0;this._time.push(v);for(var g=b;g>0;--g){var P=arguments[g];p.push(u(L[g-1],x[g-1],p[M++]+P)),k.push(P*S)}}},f.idle=function(v){var m=this.lastT();if(!(v=0;--S)p.push(u(L[S],x[S],p[M]+C*k[M])),k.push(0),M+=1}};function h(v){for(var m=new Array(v),b=0;b=0;--q){var g=P[q];E[q]<=0?P[q]=new s(g._color,g.key,g.value,P[q+1],g.right,g._count+1):P[q]=new s(g._color,g.key,g.value,g.left,P[q+1],g._count+1)}for(var q=P.length-1;q>1;--q){var V=P[q-1],g=P[q];if(V._color===o||g._color===o)break;var G=P[q-2];if(G.left===V)if(V.left===g){var Z=G.right;if(Z&&Z._color===a)V._color=o,G.right=u(o,Z),G._color=a,q-=1;else{if(G._color=a,G.left=V.right,V._color=o,V.right=G,P[q-2]=V,P[q-1]=g,c(G),c(V),q>=3){var j=P[q-3];j.left===G?j.left=V:j.right=V}break}}else{var Z=G.right;if(Z&&Z._color===a)V._color=o,G.right=u(o,Z),G._color=a,q-=1;else{if(V.right=g.left,G._color=a,G.left=g.right,g._color=o,g.left=V,g.right=G,P[q-2]=g,P[q-1]=V,c(G),c(V),c(g),q>=3){var j=P[q-3];j.left===G?j.left=g:j.right=g}break}}else if(V.right===g){var Z=G.left;if(Z&&Z._color===a)V._color=o,G.left=u(o,Z),G._color=a,q-=1;else{if(G._color=a,G.right=V.left,V._color=o,V.left=G,P[q-2]=V,P[q-1]=g,c(G),c(V),q>=3){var j=P[q-3];j.right===G?j.right=V:j.left=V}break}}else{var Z=G.left;if(Z&&Z._color===a)V._color=o,G.left=u(o,Z),G._color=a,q-=1;else{if(V.left=g.right,G._color=a,G.right=g.left,g._color=o,g.right=V,g.left=G,P[q-2]=g,P[q-1]=V,c(G),c(V),c(g),q>=3){var j=P[q-3];j.right===G?j.right=g:j.left=g}break}}}return P[0]._color=o,new f(S,P[0])};function d(x,C){if(C.left){var S=d(x,C.left);if(S)return S}var S=x(C.key,C.value);if(S)return S;if(C.right)return d(x,C.right)}function v(x,C,S,g){var P=C(x,g.key);if(P<=0){if(g.left){var E=v(x,C,S,g.left);if(E)return E}var E=S(g.key,g.value);if(E)return E}if(g.right)return v(x,C,S,g.right)}function m(x,C,S,g,P){var E=S(x,P.key),z=S(C,P.key),q;if(E<=0&&(P.left&&(q=m(x,C,S,g,P.left),q)||z>0&&(q=g(P.key,P.value),q)))return q;if(z>0&&P.right)return m(x,C,S,g,P.right)}h.forEach=function(C,S,g){if(this.root)switch(arguments.length){case 1:return d(C,this.root);case 2:return v(S,this._compare,C,this.root);case 3:return this._compare(S,g)>=0?void 0:m(S,g,this._compare,C,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var x=[],C=this.root;C;)x.push(C),C=C.left;return new b(this,x)}}),Object.defineProperty(h,"end",{get:function(){for(var x=[],C=this.root;C;)x.push(C),C=C.right;return new b(this,x)}}),h.at=function(x){if(x<0)return new b(this,[]);for(var C=this.root,S=[];;){if(S.push(C),C.left){if(x=C.right._count)break;C=C.right}else break}return new b(this,[])},h.ge=function(x){for(var C=this._compare,S=this.root,g=[],P=0;S;){var E=C(x,S.key);g.push(S),E<=0&&(P=g.length),E<=0?S=S.left:S=S.right}return g.length=P,new b(this,g)},h.gt=function(x){for(var C=this._compare,S=this.root,g=[],P=0;S;){var E=C(x,S.key);g.push(S),E<0&&(P=g.length),E<0?S=S.left:S=S.right}return g.length=P,new b(this,g)},h.lt=function(x){for(var C=this._compare,S=this.root,g=[],P=0;S;){var E=C(x,S.key);g.push(S),E>0&&(P=g.length),E<=0?S=S.left:S=S.right}return g.length=P,new b(this,g)},h.le=function(x){for(var C=this._compare,S=this.root,g=[],P=0;S;){var E=C(x,S.key);g.push(S),E>=0&&(P=g.length),E<0?S=S.left:S=S.right}return g.length=P,new b(this,g)},h.find=function(x){for(var C=this._compare,S=this.root,g=[];S;){var P=C(x,S.key);if(g.push(S),P===0)return new b(this,g);P<=0?S=S.left:S=S.right}return new b(this,[])},h.remove=function(x){var C=this.find(x);return C?C.remove():this},h.get=function(x){for(var C=this._compare,S=this.root;S;){var g=C(x,S.key);if(g===0)return S.value;g<=0?S=S.left:S=S.right}};function b(x,C){this.tree=x,this._stack=C}var p=b.prototype;Object.defineProperty(p,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(p,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),p.clone=function(){return new b(this.tree,this._stack.slice())};function k(x,C){x.key=C.key,x.value=C.value,x.left=C.left,x.right=C.right,x._color=C._color,x._count=C._count}function M(x){for(var C,S,g,P,E=x.length-1;E>=0;--E){if(C=x[E],E===0){C._color=o;return}if(S=x[E-1],S.left===C){if(g=S.right,g.right&&g.right._color===a){if(g=S.right=l(g),P=g.right=l(g.right),S.right=g.left,g.left=S,g.right=P,g._color=S._color,C._color=o,S._color=o,P._color=o,c(S),c(g),E>1){var z=x[E-2];z.left===S?z.left=g:z.right=g}x[E-1]=g;return}else if(g.left&&g.left._color===a){if(g=S.right=l(g),P=g.left=l(g.left),S.right=P.left,g.left=P.right,P.left=S,P.right=g,P._color=S._color,S._color=o,g._color=o,C._color=o,c(S),c(g),c(P),E>1){var z=x[E-2];z.left===S?z.left=P:z.right=P}x[E-1]=P;return}if(g._color===o)if(S._color===a){S._color=o,S.right=u(a,g);return}else{S.right=u(a,g);continue}else{if(g=l(g),S.right=g.left,g.left=S,g._color=S._color,S._color=a,c(S),c(g),E>1){var z=x[E-2];z.left===S?z.left=g:z.right=g}x[E-1]=g,x[E]=S,E+11){var z=x[E-2];z.right===S?z.right=g:z.left=g}x[E-1]=g;return}else if(g.right&&g.right._color===a){if(g=S.left=l(g),P=g.right=l(g.right),S.left=P.right,g.right=P.left,P.right=S,P.left=g,P._color=S._color,S._color=o,g._color=o,C._color=o,c(S),c(g),c(P),E>1){var z=x[E-2];z.right===S?z.right=P:z.left=P}x[E-1]=P;return}if(g._color===o)if(S._color===a){S._color=o,S.left=u(a,g);return}else{S.left=u(a,g);continue}else{if(g=l(g),S.left=g.right,g.right=S,g._color=S._color,S._color=a,c(S),c(g),E>1){var z=x[E-2];z.right===S?z.right=g:z.left=g}x[E-1]=g,x[E]=S,E+1=0;--g){var S=x[g];S.left===x[g+1]?C[g]=new s(S._color,S.key,S.value,C[g+1],S.right,S._count):C[g]=new s(S._color,S.key,S.value,S.left,C[g+1],S._count)}if(S=C[C.length-1],S.left&&S.right){var P=C.length;for(S=S.left;S.right;)C.push(S),S=S.right;var E=C[P-1];C.push(new s(S._color,E.key,E.value,S.left,S.right,S._count)),C[P-1].key=S.key,C[P-1].value=S.value;for(var g=C.length-2;g>=P;--g)S=C[g],C[g]=new s(S._color,S.key,S.value,S.left,C[g+1],S._count);C[P-1].left=C[P]}if(S=C[C.length-1],S._color===a){var z=C[C.length-2];z.left===S?z.left=null:z.right===S&&(z.right=null),C.pop();for(var g=0;g0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(p,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(p,"index",{get:function(){var x=0,C=this._stack;if(C.length===0){var S=this.tree.root;return S?S._count:0}else C[C.length-1].left&&(x=C[C.length-1].left._count);for(var g=C.length-2;g>=0;--g)C[g+1]===C[g].right&&(++x,C[g].left&&(x+=C[g].left._count));return x},enumerable:!0}),p.next=function(){var x=this._stack;if(x.length!==0){var C=x[x.length-1];if(C.right)for(C=C.right;C;)x.push(C),C=C.left;else for(x.pop();x.length>0&&x[x.length-1].right===C;)C=x[x.length-1],x.pop()}},Object.defineProperty(p,"hasNext",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].right)return!0;for(var C=x.length-1;C>0;--C)if(x[C-1].left===x[C])return!0;return!1}}),p.update=function(x){var C=this._stack;if(C.length===0)throw new Error("Can't update empty node!");var S=new Array(C.length),g=C[C.length-1];S[S.length-1]=new s(g._color,g.key,x,g.left,g.right,g._count);for(var P=C.length-2;P>=0;--P)g=C[P],g.left===C[P+1]?S[P]=new s(g._color,g.key,g.value,S[P+1],g.right,g._count):S[P]=new s(g._color,g.key,g.value,g.left,S[P+1],g._count);return new f(this.tree._compare,S[0])},p.prev=function(){var x=this._stack;if(x.length!==0){var C=x[x.length-1];if(C.left)for(C=C.left;C;)x.push(C),C=C.right;else for(x.pop();x.length>0&&x[x.length-1].left===C;)C=x[x.length-1],x.pop()}},Object.defineProperty(p,"hasPrev",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].left)return!0;for(var C=x.length-1;C>0;--C)if(x[C-1].right===x[C])return!0;return!1}});function T(x,C){return xC?1:0}function L(x){return new f(x||T,null)}},3837:function(i,a,o){"use strict";i.exports=q;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=ArrayBuffer,v=DataView;function m(V){return d.isView(V)&&!(V instanceof v)}function b(V){return Array.isArray(V)||m(V)}function p(V,G){return V[0]=G[0],V[1]=G[1],V[2]=G[2],V}function k(V){this.gl=V,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.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],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","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],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=u(V)}var M=k.prototype;M.update=function(V){V=V||{};function G(be,Be,Le){if(Le in V){var me=V[Le],Pe=this[Le],ce;(be?b(me)&&b(me[0]):b(me))?this[Le]=ce=[Be(me[0]),Be(me[1]),Be(me[2])]:this[Le]=ce=[Be(me),Be(me),Be(me)];for(var He=0;He<3;++He)if(ce[He]!==Pe[He])return!0}return!1}var Z=G.bind(this,!1,Number),j=G.bind(this,!1,Boolean),N=G.bind(this,!1,String),H=G.bind(this,!0,function(be){if(b(be)){if(be.length===3)return[+be[0],+be[1],+be[2],1];if(be.length===4)return[+be[0],+be[1],+be[2],+be[3]]}return[0,0,0,1]}),ie,ae=!1,_e=!1;if("bounds"in V)for(var Ee=V.bounds,Ce=0;Ce<2;++Ce)for(var ge=0;ge<3;++ge)Ee[Ce][ge]!==this.bounds[Ce][ge]&&(_e=!0),this.bounds[Ce][ge]=Ee[Ce][ge];if("ticks"in V){ie=V.ticks,ae=!0,this.autoTicks=!1;for(var Ce=0;Ce<3;++Ce)this.tickSpacing[Ce]=0}else Z("tickSpacing")&&(this.autoTicks=!0,_e=!0);if(this._firstInit&&("ticks"in V||"tickSpacing"in V||(this.autoTicks=!0),_e=!0,ae=!0,this._firstInit=!1),_e&&this.autoTicks&&(ie=f.create(this.bounds,this.tickSpacing),ae=!0),ae){for(var Ce=0;Ce<3;++Ce)ie[Ce].sort(function(Be,Le){return Be.x-Le.x});f.equal(ie,this.ticks)?ae=!1:this.ticks=ie}j("tickEnable"),N("tickFont")&&(ae=!0),N("tickFontStyle")&&(ae=!0),N("tickFontWeight")&&(ae=!0),N("tickFontVariant")&&(ae=!0),Z("tickSize"),Z("tickAngle"),Z("tickPad"),H("tickColor");var re=N("labels");N("labelFont")&&(re=!0),N("labelFontStyle")&&(re=!0),N("labelFontWeight")&&(re=!0),N("labelFontVariant")&&(re=!0),j("labelEnable"),Z("labelSize"),Z("labelPad"),H("labelColor"),j("lineEnable"),j("lineMirror"),Z("lineWidth"),H("lineColor"),j("lineTickEnable"),j("lineTickMirror"),Z("lineTickLength"),Z("lineTickWidth"),H("lineTickColor"),j("gridEnable"),Z("gridWidth"),H("gridColor"),j("zeroEnable"),H("zeroLineColor"),Z("zeroLineWidth"),j("backgroundEnable"),H("backgroundColor");var Se=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],ke=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(re||ae)&&this._text.update(this.bounds,this.labels,Se,this.ticks,ke):this._text=s(this.gl,this.bounds,this.labels,Se,this.ticks,ke),this._lines&&ae&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};function T(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var L=[new T,new T,new T];function x(V,G,Z,j,N){for(var H=V.primalOffset,ie=V.primalMinor,ae=V.mirrorOffset,_e=V.mirrorMinor,Ee=j[G],Ce=0;Ce<3;++Ce)if(G!==Ce){var ge=H,re=ae,Se=ie,ke=_e;Ee&1<0?(Se[Ce]=-1,ke[Ce]=0):(Se[Ce]=0,ke[Ce]=1)}}var C=[0,0,0],S={model:h,view:h,projection:h,_ortho:!1};M.isOpaque=function(){return!0},M.isTransparent=function(){return!1},M.drawTransparent=function(V){};var g=0,P=[0,0,0],E=[0,0,0],z=[0,0,0];M.draw=function(V){V=V||S;for(var Le=this.gl,G=V.model||h,Z=V.view||h,j=V.projection||h,N=this.bounds,H=V._ortho||!1,ie=c(G,Z,j,N,H),ae=ie.cubeEdges,_e=ie.axis,Ee=Z[12],Ce=Z[13],ge=Z[14],re=Z[15],Se=H?2:1,ke=Se*this.pixelRatio*(j[3]*Ee+j[7]*Ce+j[11]*ge+j[15]*re)/Le.drawingBufferHeight,be=0;be<3;++be)this.lastCubeProps.cubeEdges[be]=ae[be],this.lastCubeProps.axis[be]=_e[be];for(var Be=L,be=0;be<3;++be)x(L[be],be,this.bounds,ae,_e);for(var Le=this.gl,me=C,be=0;be<3;++be)this.backgroundEnable[be]?me[be]=_e[be]:me[be]=0;this._background.draw(G,Z,j,N,me,this.backgroundColor),this._lines.bind(G,Z,j,this);for(var be=0;be<3;++be){var Pe=[0,0,0];_e[be]>0?Pe[be]=N[1][be]:Pe[be]=N[0][be];for(var ce=0;ce<2;++ce){var He=(be+1+ce)%3,lt=(be+1+(ce^1))%3;this.gridEnable[He]&&this._lines.drawGrid(He,lt,this.bounds,Pe,this.gridColor[He],this.gridWidth[He]*this.pixelRatio)}for(var ce=0;ce<2;++ce){var He=(be+1+ce)%3,lt=(be+1+(ce^1))%3;this.zeroEnable[lt]&&Math.min(N[0][lt],N[1][lt])<=0&&Math.max(N[0][lt],N[1][lt])>=0&&this._lines.drawZero(He,lt,this.bounds,Pe,this.zeroLineColor[lt],this.zeroLineWidth[lt]*this.pixelRatio)}}for(var be=0;be<3;++be){this.lineEnable[be]&&this._lines.drawAxisLine(be,this.bounds,Be[be].primalOffset,this.lineColor[be],this.lineWidth[be]*this.pixelRatio),this.lineMirror[be]&&this._lines.drawAxisLine(be,this.bounds,Be[be].mirrorOffset,this.lineColor[be],this.lineWidth[be]*this.pixelRatio);for(var mt=p(P,Be[be].primalMinor),Ht=p(E,Be[be].mirrorMinor),at=this.lineTickLength,ce=0;ce<3;++ce){var ct=ke/G[5*ce];mt[ce]*=at[ce]*ct,Ht[ce]*=at[ce]*ct}this.lineTickEnable[be]&&this._lines.drawAxisTicks(be,Be[be].primalOffset,mt,this.lineTickColor[be],this.lineTickWidth[be]*this.pixelRatio),this.lineTickMirror[be]&&this._lines.drawAxisTicks(be,Be[be].mirrorOffset,Ht,this.lineTickColor[be],this.lineTickWidth[be]*this.pixelRatio)}this._lines.unbind(),this._text.bind(G,Z,j,this.pixelRatio);var ar,Vt=.5,rr,tt;function je(dt){tt=[0,0,0],tt[dt]=1}function Ue(dt,Et,pt){var jt=(dt+1)%3,or=(dt+2)%3,mr=Et[jt],Ar=Et[or],ei=pt[jt],qr=pt[or];if(mr>0&&qr>0){je(jt);return}else if(mr>0&&qr<0){je(jt);return}else if(mr<0&&qr>0){je(jt);return}else if(mr<0&&qr<0){je(jt);return}else if(Ar>0&&ei>0){je(or);return}else if(Ar>0&&ei<0){je(or);return}else if(Ar<0&&ei>0){je(or);return}else if(Ar<0&&ei<0){je(or);return}}for(var be=0;be<3;++be){for(var Ae=Be[be].primalMinor,rt=Be[be].mirrorMinor,St=p(z,Be[be].primalOffset),ce=0;ce<3;++ce)this.lineTickEnable[be]&&(St[ce]+=ke*Ae[ce]*Math.max(this.lineTickLength[ce],0)/G[5*ce]);var Tt=[0,0,0];if(Tt[be]=1,this.tickEnable[be]){this.tickAngle[be]===-3600?(this.tickAngle[be]=0,this.tickAlign[be]="auto"):this.tickAlign[be]=-1,rr=1,ar=[this.tickAlign[be],Vt,rr],ar[0]==="auto"?ar[0]=g:ar[0]=parseInt(""+ar[0]),tt=[0,0,0],Ue(be,Ae,rt);for(var ce=0;ce<3;++ce)St[ce]+=ke*Ae[ce]*this.tickPad[ce]/G[5*ce];this._text.drawTicks(be,this.tickSize[be],this.tickAngle[be],St,this.tickColor[be],Tt,tt,ar)}if(this.labelEnable[be]){rr=0,tt=[0,0,0],this.labels[be].length>4&&(je(be),rr=1),ar=[this.labelAlign[be],Vt,rr],ar[0]==="auto"?ar[0]=g:ar[0]=parseInt(""+ar[0]);for(var ce=0;ce<3;++ce)St[ce]+=ke*Ae[ce]*this.labelPad[ce]/G[5*ce];St[be]+=.5*(N[0][be]+N[1][be]),this._text.drawLabel(be,this.labelSize[be],this.labelAngle[be],St,this.labelColor[be],[0,0,0],tt,ar)}}this._text.unbind()},M.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function q(V,G){var Z=new k(V);return Z.update(G),Z}},5304:function(i,a,o){"use strict";i.exports=h;var s=o(2762),l=o(8116),u=o(1879).bg;function c(d,v,m,b){this.gl=d,this.buffer=v,this.vao=m,this.shader=b}var f=c.prototype;f.draw=function(d,v,m,b,p,k){for(var M=!1,T=0;T<3;++T)M=M||p[T];if(M){var L=this.gl;L.enable(L.POLYGON_OFFSET_FILL),L.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:d,view:v,projection:m,bounds:b,enable:p,colors:k},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),L.disable(L.POLYGON_OFFSET_FILL)}},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(d){for(var v=[],m=[],b=0,p=0;p<3;++p)for(var k=(p+1)%3,M=(p+2)%3,T=[0,0,0],L=[0,0,0],x=-1;x<=1;x+=2){m.push(b,b+2,b+1,b+1,b+2,b+3),T[p]=x,L[p]=x;for(var C=-1;C<=1;C+=2){T[k]=C;for(var S=-1;S<=1;S+=2)T[M]=S,v.push(T[0],T[1],T[2],L[0],L[1],L[2]),b+=1}var g=k;k=M,M=g}var P=s(d,new Float32Array(v)),E=s(d,new Uint16Array(m),d.ELEMENT_ARRAY_BUFFER),z=l(d,[{buffer:P,type:d.FLOAT,size:3,offset:0,stride:24},{buffer:P,type:d.FLOAT,size:3,offset:12,stride:24}],E),q=u(d);return q.attributes.position.location=0,q.attributes.normal.location=1,new c(d,P,z,q)}},6429:function(i,a,o){"use strict";i.exports=x;var s=o(8828),l=o(6760),u=o(5202),c=o(3250),f=new Array(16),h=new Array(8),d=new Array(8),v=new Array(3),m=[0,0,0];(function(){for(var C=0;C<8;++C)h[C]=[1,1,1,1],d[C]=[1,1,1]})();function b(C,S,g){for(var P=0;P<4;++P){C[P]=g[12+P];for(var E=0;E<3;++E)C[P]+=S[E]*g[4*E+P]}}var p=[[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 k(C){for(var S=0;S_e&&(Z|=1<_e){Z|=1<d[q][1])&&(Be=q);for(var Le=-1,q=0;q<3;++q){var me=Be^1<d[Pe][0]&&(Pe=me)}}var ce=M;ce[0]=ce[1]=ce[2]=0,ce[s.log2(Le^Be)]=Be&Le,ce[s.log2(Be^Pe)]=Be&Pe;var He=Pe^7;He===Z||He===be?(He=Le^7,ce[s.log2(Pe^He)]=He&Pe):ce[s.log2(Le^He)]=He&Le;for(var lt=T,mt=Z,H=0;H<3;++H)mt&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ? + b - PI : + b; +} + +float look_horizontal_or_vertical(float a, float ratio) { + // ratio controls the ratio between being horizontal to (vertical + horizontal) + // if ratio is set to 0.5 then it is 50%, 50%. + // when using a higher ratio e.g. 0.75 the result would + // likely be more horizontal than vertical. + + float b = positive_angle(a); + + return + (b < ( ratio) * HALF_PI) ? 0.0 : + (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI : + (b < (2.0 + ratio) * HALF_PI) ? 0.0 : + (b < (4.0 - ratio) * HALF_PI) ? HALF_PI : + 0.0; +} + +float roundTo(float a, float b) { + return float(b * floor((a + 0.5 * b) / b)); +} + +float look_round_n_directions(float a, int n) { + float b = positive_angle(a); + float div = TWO_PI / float(n); + float c = roundTo(b, div); + return look_upwards(c); +} + +float applyAlignOption(float rawAngle, float delta) { + return + (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions + (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical + (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis + (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards + (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal + rawAngle; // otherwise return back raw input angle +} + +bool isAxisTitle = (axis.x == 0.0) && + (axis.y == 0.0) && + (axis.z == 0.0); + +void main() { + //Compute world offset + float axisDistance = position.z; + vec3 dataPosition = axisDistance * axis + offset; + + float beta = angle; // i.e. user defined attributes for each tick + + float axisAngle; + float clipAngle; + float flip; + + if (enableAlign) { + axisAngle = (isAxisTitle) ? HALF_PI : + computeViewAngle(dataPosition, dataPosition + axis); + clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir); + + axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0; + clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0; + + flip = (dot(vec2(cos(axisAngle), sin(axisAngle)), + vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0; + + beta += applyAlignOption(clipAngle, flip * PI); + } + + //Compute plane offset + vec2 planeCoord = position.xy * pixelScale; + + mat2 planeXform = scale * mat2( + cos(beta), sin(beta), + -sin(beta), cos(beta) + ); + + vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution; + + //Compute clip position + vec3 clipPosition = project(dataPosition); + + //Apply text offset in clip coordinates + clipPosition += vec3(viewOffset, 0.0); + + //Done + gl_Position = vec4(clipPosition, 1.0); +} +`]),h=s([`precision highp float; +#define GLSLIFY 1 + +uniform vec4 color; +void main() { + gl_FragColor = color; +}`]);a.Q=function(m){return l(m,f,h,null,[{name:"position",type:"vec3"}])};var d=s([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec3 normal; + +uniform mat4 model, view, projection; +uniform vec3 enable; +uniform vec3 bounds[2]; + +varying vec3 colorChannel; + +void main() { + + vec3 signAxis = sign(bounds[1] - bounds[0]); + + vec3 realNormal = signAxis * normal; + + if(dot(realNormal, enable) > 0.0) { + vec3 minRange = min(bounds[0], bounds[1]); + vec3 maxRange = max(bounds[0], bounds[1]); + vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); + gl_Position = projection * (view * (model * vec4(nPosition, 1.0))); + } else { + gl_Position = vec4(0,0,0,0); + } + + colorChannel = abs(realNormal); +} +`]),v=s([`precision highp float; +#define GLSLIFY 1 + +uniform vec4 colors[3]; + +varying vec3 colorChannel; + +void main() { + gl_FragColor = colorChannel.x * colors[0] + + colorChannel.y * colors[1] + + colorChannel.z * colors[2]; +}`]);a.bg=function(m){return l(m,d,v,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(i,a,o){"use strict";i.exports=k;var s=o(2762),l=o(8116),u=o(4359),c=o(1879).Q,f=window||process.global||{},h=f.__TEXT_CACHE||{};f.__TEXT_CACHE={};var d=3;function v(M,T,L,x){this.gl=M,this.shader=T,this.buffer=L,this.vao=x,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var m=v.prototype,b=[0,0];m.bind=function(M,T,L,x){this.vao.bind(),this.shader.bind();var C=this.shader.uniforms;C.model=M,C.view=T,C.projection=L,C.pixelScale=x,b[0]=this.gl.drawingBufferWidth,b[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=b},m.unbind=function(){this.vao.unbind()},m.update=function(M,T,L,x,C){var S=[];function g(H,ie,ae,_e,Ee,Ce){var ge=[ae.style,ae.weight,ae.variant,ae.family].join("_"),re=h[ge];re||(re=h[ge]={});var Se=re[ie];Se||(Se=re[ie]=p(ie,{triangles:!0,font:ae.family,fontStyle:ae.style,fontWeight:ae.weight,fontVariant:ae.variant,textAlign:"center",textBaseline:"middle",lineSpacing:Ee,styletags:Ce}));for(var ke=(_e||12)/12,be=Se.positions,Be=Se.cells,Le=0,me=Be.length;Le=0;--ce){var He=be[Pe[ce]];S.push(ke*He[0],-ke*He[1],H)}}for(var P=[0,0,0],E=[0,0,0],z=[0,0,0],q=[0,0,0],V=1.25,G={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},Z=0;Z<3;++Z){z[Z]=S.length/d|0,g(.5*(M[0][Z]+M[1][Z]),T[Z],L[Z],12,V,G),q[Z]=(S.length/d|0)-z[Z],P[Z]=S.length/d|0;for(var j=0;j=0&&(d=f.length-h-1);var v=Math.pow(10,d),m=Math.round(u*c*v),b=m+"";if(b.indexOf("e")>=0)return b;var p=m/v,k=m%v;m<0?(p=-Math.ceil(p)|0,k=-k|0):(p=Math.floor(p)|0,k=k|0);var M=""+p;if(m<0&&(M="-"+M),d){for(var T=""+k;T.length=u[0][h];--m)d.push({x:m*c[h],text:o(c[h],m)});f.push(d)}return f}function l(u,c){for(var f=0;f<3;++f){if(u[f].length!==c[f].length)return!1;for(var h=0;hM)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return p.bufferSubData(k,x,L),M}function v(p,k){for(var M=s.malloc(p.length,k),T=p.length,L=0;L=0;--T){if(k[T]!==M)return!1;M*=p[T]}return!0}h.update=function(p,k){if(typeof k!="number"&&(k=-1),this.bind(),typeof p=="object"&&typeof p.shape!="undefined"){var M=p.dtype;if(c.indexOf(M)<0&&(M="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var T=gl.getExtension("OES_element_index_uint");T&&M!=="uint16"?M="uint32":M="uint16"}if(M===p.dtype&&m(p.shape,p.stride))p.offset===0&&p.data.length===p.shape[0]?this.length=d(this.gl,this.type,this.length,this.usage,p.data,k):this.length=d(this.gl,this.type,this.length,this.usage,p.data.subarray(p.offset,p.shape[0]),k);else{var L=s.malloc(p.size,M),x=u(L,p.shape);l.assign(x,p),k<0?this.length=d(this.gl,this.type,this.length,this.usage,L,k):this.length=d(this.gl,this.type,this.length,this.usage,L.subarray(0,p.size),k),s.free(L)}}else if(Array.isArray(p)){var C;this.type===this.gl.ELEMENT_ARRAY_BUFFER?C=v(p,"uint16"):C=v(p,"float32"),k<0?this.length=d(this.gl,this.type,this.length,this.usage,C,k):this.length=d(this.gl,this.type,this.length,this.usage,C.subarray(0,p.length),k),s.free(C)}else if(typeof p=="object"&&typeof p.length=="number")this.length=d(this.gl,this.type,this.length,this.usage,p,k);else if(typeof p=="number"||p===void 0){if(k>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");p=p|0,p<=0&&(p=1),this.gl.bufferData(this.type,p|0,this.usage),this.length=p}else throw new Error("gl-buffer: Invalid data type")};function b(p,k,M,T){if(M=M||p.ARRAY_BUFFER,T=T||p.DYNAMIC_DRAW,M!==p.ARRAY_BUFFER&&M!==p.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(T!==p.DYNAMIC_DRAW&&T!==p.STATIC_DRAW&&T!==p.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 L=p.createBuffer(),x=new f(p,M,L,0,T);return x.update(k),x}i.exports=b},6405:function(i,a,o){"use strict";var s=o(2931);i.exports=function(u,c){var f=u.positions,h=u.vectors,d={positions:[],vertexIntensity:[],vertexIntensityBounds:u.vertexIntensityBounds,vectors:[],cells:[],coneOffset:u.coneOffset,colormap:u.colormap};if(u.positions.length===0)return c&&(c[0]=[0,0,0],c[1]=[0,0,0]),d;for(var v=0,m=1/0,b=-1/0,p=1/0,k=-1/0,M=1/0,T=-1/0,L=null,x=null,C=[],S=1/0,g=!1,P=u.coneSizemode==="raw",E=0;Ev&&(v=s.length(q)),E&&!P){var V=2*s.distance(L,z)/(s.length(x)+s.length(q));V?(S=Math.min(S,V),g=!1):g=!0}g||(L=z,x=q),C.push(q)}var G=[m,p,M],Z=[b,k,T];c&&(c[0]=G,c[1]=Z),v===0&&(v=1);var j=1/v;isFinite(S)||(S=1),d.vectorScale=S;var N=u.coneSize||(P?1:.5);u.absoluteConeSize&&(N=u.absoluteConeSize*j),d.coneScale=N;for(var E=0,H=0;E=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(C){this.pickId=C};function k(C){for(var S=v({colormap:C,nshades:256,format:"rgba"}),g=new Uint8Array(256*4),P=0;P<256;++P){for(var E=S[P],z=0;z<3;++z)g[4*P+z]=E[z];g[4*P+3]=E[3]*255}return d(g,[256,256,4],[4,0,1])}function M(C){for(var S=C.length,g=new Array(S),P=0;P0){var H=this.triShader;H.bind(),H.uniforms=V,this.triangleVAO.bind(),S.drawArrays(S.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},p.drawPick=function(C){C=C||{};for(var S=this.gl,g=C.model||m,P=C.view||m,E=C.projection||m,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)z[0][q]=Math.max(z[0][q],this.clipBounds[0][q]),z[1][q]=Math.min(z[1][q],this.clipBounds[1][q]);this._model=[].slice.call(g),this._view=[].slice.call(P),this._projection=[].slice.call(E),this._resolution=[S.drawingBufferWidth,S.drawingBufferHeight];var V={model:g,view:P,projection:E,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},G=this.pickShader;G.bind(),G.uniforms=V,this.triangleCount>0&&(this.triangleVAO.bind(),S.drawArrays(S.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},p.pick=function(C){if(!C||C.id!==this.pickId)return null;var S=C.value[0]+256*C.value[1]+65536*C.value[2],g=this.cells[S],P=this.positions[g[1]].slice(0,3),E={position:P,dataCoordinate:P,index:Math.floor(g[1]/48)};return this.traceType==="cone"?E.index=Math.floor(g[1]/48):this.traceType==="streamtube"&&(E.intensity=this.intensity[g[1]],E.velocity=this.vectors[g[1]].slice(0,3),E.divergence=this.vectors[g[1]][3],E.index=S),E},p.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 T(C,S){var g=s(C,S.meshShader.vertex,S.meshShader.fragment,null,S.meshShader.attributes);return g.attributes.position.location=0,g.attributes.color.location=2,g.attributes.uv.location=3,g.attributes.vector.location=4,g}function L(C,S){var g=s(C,S.pickShader.vertex,S.pickShader.fragment,null,S.pickShader.attributes);return g.attributes.position.location=0,g.attributes.id.location=1,g.attributes.vector.location=4,g}function x(C,S,g){var P=g.shaders;arguments.length===1&&(S=C,C=S.gl);var E=T(C,P),z=L(C,P),q=c(C,d(new Uint8Array([255,255,255,255]),[1,1,4]));q.generateMipmap(),q.minFilter=C.LINEAR_MIPMAP_LINEAR,q.magFilter=C.LINEAR;var V=l(C),G=l(C),Z=l(C),j=l(C),N=l(C),H=u(C,[{buffer:V,type:C.FLOAT,size:4},{buffer:N,type:C.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Z,type:C.FLOAT,size:4},{buffer:j,type:C.FLOAT,size:2},{buffer:G,type:C.FLOAT,size:4}]),ie=new b(C,q,E,z,V,G,N,Z,j,H,g.traceType||"cone");return ie.update(S),ie}i.exports=x},614:function(i,a,o){var s=o(3236),l=s([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the cone vertex and normal at the given index. +// +// The returned vertex is for a cone with its top at origin and height of 1.0, +// pointing in the direction of the vector attribute. +// +// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. +// These vertices are used to make up the triangles of the cone by the following: +// segment + 0 top vertex +// segment + 1 perimeter vertex a+1 +// segment + 2 perimeter vertex a +// segment + 3 center base vertex +// segment + 4 perimeter vertex a +// segment + 5 perimeter vertex a+1 +// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. +// To go from index to segment, floor(index / 6) +// To go from segment to angle, 2*pi * (segment/segmentCount) +// To go from index to segment index, index - (segment*6) +// +vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { + + const float segmentCount = 8.0; + + float index = rawIndex - floor(rawIndex / + (segmentCount * 6.0)) * + (segmentCount * 6.0); + + float segment = floor(0.001 + index/6.0); + float segmentIndex = index - (segment*6.0); + + normal = -normalize(d); + + if (segmentIndex > 2.99 && segmentIndex < 3.01) { + return mix(vec3(0.0), -d, coneOffset); + } + + float nextAngle = ( + (segmentIndex > 0.99 && segmentIndex < 1.01) || + (segmentIndex > 4.99 && segmentIndex < 5.01) + ) ? 1.0 : 0.0; + float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); + + vec3 v1 = mix(d, vec3(0.0), coneOffset); + vec3 v2 = v1 - d; + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d)*0.25; + vec3 y = v * sin(angle) * length(d)*0.25; + vec3 v3 = v2 + x + y; + if (segmentIndex < 3.0) { + vec3 tx = u * sin(angle); + vec3 ty = v * -cos(angle); + vec3 tangent = tx + ty; + normal = normalize(cross(v3 - v1, tangent)); + } + + if (segmentIndex == 0.0) { + return mix(d, vec3(0.0), coneOffset); + } + return v3; +} + +attribute vec3 vector; +attribute vec4 color, position; +attribute vec2 uv; + +uniform float vectorScale, coneScale, coneOffset; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 eyePosition, lightPosition; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + // Scale the vector magnitude to stay constant with + // model & view changes. + vec3 normal; + vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal); + vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * conePosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + // vec4 m_position = model * vec4(conePosition, 1.0); + vec4 t_position = view * conePosition; + gl_Position = projection * t_position; + + f_color = color; + f_data = conePosition.xyz; + f_position = position.xyz; + f_uv = uv; +} +`]),u=s([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform sampler2D texture; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = f_color * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * opacity; +} +`]),c=s([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the cone vertex and normal at the given index. +// +// The returned vertex is for a cone with its top at origin and height of 1.0, +// pointing in the direction of the vector attribute. +// +// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. +// These vertices are used to make up the triangles of the cone by the following: +// segment + 0 top vertex +// segment + 1 perimeter vertex a+1 +// segment + 2 perimeter vertex a +// segment + 3 center base vertex +// segment + 4 perimeter vertex a +// segment + 5 perimeter vertex a+1 +// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. +// To go from index to segment, floor(index / 6) +// To go from segment to angle, 2*pi * (segment/segmentCount) +// To go from index to segment index, index - (segment*6) +// +vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { + + const float segmentCount = 8.0; + + float index = rawIndex - floor(rawIndex / + (segmentCount * 6.0)) * + (segmentCount * 6.0); + + float segment = floor(0.001 + index/6.0); + float segmentIndex = index - (segment*6.0); + + normal = -normalize(d); + + if (segmentIndex > 2.99 && segmentIndex < 3.01) { + return mix(vec3(0.0), -d, coneOffset); + } + + float nextAngle = ( + (segmentIndex > 0.99 && segmentIndex < 1.01) || + (segmentIndex > 4.99 && segmentIndex < 5.01) + ) ? 1.0 : 0.0; + float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); + + vec3 v1 = mix(d, vec3(0.0), coneOffset); + vec3 v2 = v1 - d; + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d)*0.25; + vec3 y = v * sin(angle) * length(d)*0.25; + vec3 v3 = v2 + x + y; + if (segmentIndex < 3.0) { + vec3 tx = u * sin(angle); + vec3 ty = v * -cos(angle); + vec3 tangent = tx + ty; + normal = normalize(cross(v3 - v1, tangent)); + } + + if (segmentIndex == 0.0) { + return mix(d, vec3(0.0), coneOffset); + } + return v3; +} + +attribute vec4 vector; +attribute vec4 position; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform float vectorScale, coneScale, coneOffset; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + vec3 normal; + vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal); + vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + gl_Position = projection * (view * conePosition); + f_id = id; + f_position = position.xyz; +} +`]),f=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(i){i.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"}},5171:function(i,a,o){var s=o(737);i.exports=function(u){return s[u]}},9165:function(i,a,o){"use strict";i.exports=b;var s=o(2762),l=o(8116),u=o(3436),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(p,k,M,T){this.gl=p,this.shader=T,this.buffer=k,this.vao=M,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 h=f.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(p){var k=this.gl,M=this.shader.uniforms;this.shader.bind();var T=M.view=p.view||c,L=M.projection=p.projection||c;M.model=p.model||c,M.clipBounds=this.clipBounds,M.opacity=this.opacity;var x=T[12],C=T[13],S=T[14],g=T[15],P=p._ortho||!1,E=P?2:1,z=E*this.pixelRatio*(L[3]*x+L[7]*C+L[11]*S+L[15]*g)/k.drawingBufferHeight;this.vao.bind();for(var q=0;q<3;++q)k.lineWidth(this.lineWidth[q]*this.pixelRatio),M.capSize=this.capSize[q]*z,this.lineCount[q]&&k.drawArrays(k.LINES,this.lineOffset[q],this.lineCount[q]);this.vao.unbind()};function d(p,k){for(var M=0;M<3;++M)p[0][M]=Math.min(p[0][M],k[M]),p[1][M]=Math.max(p[1][M],k[M])}var v=function(){for(var p=new Array(3),k=0;k<3;++k){for(var M=[],T=1;T<=2;++T)for(var L=-1;L<=1;L+=2){var x=(T+k)%3,C=[0,0,0];C[x]=L,M.push(C)}p[k]=M}return p}();function m(p,k,M,T){for(var L=v[T],x=0;x0){var V=P.slice();V[S]+=z[1][S],L.push(P[0],P[1],P[2],q[0],q[1],q[2],q[3],0,0,0,V[0],V[1],V[2],q[0],q[1],q[2],q[3],0,0,0),d(this.bounds,V),C+=2+m(L,V,q,S)}}}this.lineCount[S]=C-this.lineOffset[S]}this.buffer.update(L)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function b(p){var k=p.gl,M=s(k),T=l(k,[{buffer:M,type:k.FLOAT,size:3,offset:0,stride:40},{buffer:M,type:k.FLOAT,size:4,offset:12,stride:40},{buffer:M,type:k.FLOAT,size:3,offset:28,stride:40}]),L=u(k);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var x=new f(k,M,T,L);return x.update(p),x}},3436:function(i,a,o){"use strict";var s=o(3236),l=o(9405),u=s([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position, offset; +attribute vec4 color; +uniform mat4 model, view, projection; +uniform float capSize; +varying vec4 fragColor; +varying vec3 fragPosition; + +void main() { + vec4 worldPosition = model * vec4(position, 1.0); + worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); + gl_Position = projection * (view * worldPosition); + fragColor = color; + fragPosition = position; +}`]),c=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float opacity; +varying vec3 fragPosition; +varying vec4 fragColor; + +void main() { + if ( + outOfRange(clipBounds[0], clipBounds[1], fragPosition) || + fragColor.a * opacity == 0. + ) discard; + + gl_FragColor = opacity * fragColor; +}`]);i.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(i,a,o){"use strict";var s=o(7766);i.exports=C;var l=null,u,c,f,h;function d(S){var g=S.getParameter(S.FRAMEBUFFER_BINDING),P=S.getParameter(S.RENDERBUFFER_BINDING),E=S.getParameter(S.TEXTURE_BINDING_2D);return[g,P,E]}function v(S,g){S.bindFramebuffer(S.FRAMEBUFFER,g[0]),S.bindRenderbuffer(S.RENDERBUFFER,g[1]),S.bindTexture(S.TEXTURE_2D,g[2])}function m(S,g){var P=S.getParameter(g.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(P+1);for(var E=0;E<=P;++E){for(var z=new Array(P),q=0;q1&&G.drawBuffersWEBGL(l[V]);var ie=P.getExtension("WEBGL_depth_texture");ie?Z?S.depth=p(P,z,q,ie.UNSIGNED_INT_24_8_WEBGL,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):j&&(S.depth=p(P,z,q,P.UNSIGNED_SHORT,P.DEPTH_COMPONENT,P.DEPTH_ATTACHMENT)):j&&Z?S._depth_rb=k(P,z,q,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):j?S._depth_rb=k(P,z,q,P.DEPTH_COMPONENT16,P.DEPTH_ATTACHMENT):Z&&(S._depth_rb=k(P,z,q,P.STENCIL_INDEX,P.STENCIL_ATTACHMENT));var ae=P.checkFramebufferStatus(P.FRAMEBUFFER);if(ae!==P.FRAMEBUFFER_COMPLETE){S._destroyed=!0,P.bindFramebuffer(P.FRAMEBUFFER,null),P.deleteFramebuffer(S.handle),S.handle=null,S.depth&&(S.depth.dispose(),S.depth=null),S._depth_rb&&(P.deleteRenderbuffer(S._depth_rb),S._depth_rb=null);for(var H=0;Hz||P<0||P>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");S._shape[0]=g,S._shape[1]=P;for(var q=d(E),V=0;Vq||P<0||P>q)throw new Error("gl-fbo: Parameters are too large for FBO");E=E||{};var V=1;if("color"in E){if(V=Math.max(E.color|0,0),V<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(V>1)if(z){if(V>S.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+V+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var G=S.UNSIGNED_BYTE,Z=S.getExtension("OES_texture_float");if(E.float&&V>0){if(!Z)throw new Error("gl-fbo: Context does not support floating point textures");G=S.FLOAT}else E.preferFloat&&V>0&&Z&&(G=S.FLOAT);var j=!0;"depth"in E&&(j=!!E.depth);var N=!1;return"stencil"in E&&(N=!!E.stencil),new T(S,g,P,G,V,j,N,z)}},2992:function(i,a,o){var s=o(3387).sprintf,l=o(5171),u=o(1848),c=o(1085);i.exports=f;function f(h,d,v){"use strict";var m=u(d)||"of unknown name (see npm glsl-shader-name)",b="unknown type";v!==void 0&&(b=v===l.FRAGMENT_SHADER?"fragment":"vertex");for(var p=s(`Error compiling %s shader %s: +`,b,m),k=s("%s%s",p,h),M=h.split(` +`),T={},L=0;L max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform sampler2D dashTexture; +uniform float dashScale; +uniform float opacity; + +varying vec3 worldPosition; +varying float pixelArcLength; +varying vec4 fragColor; + +void main() { + if ( + outOfRange(clipBounds[0], clipBounds[1], worldPosition) || + fragColor.a * opacity == 0. + ) discard; + + float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; + if(dashWeight < 0.5) { + discard; + } + gl_FragColor = fragColor * opacity; +} +`]),f=s([`precision highp float; +#define GLSLIFY 1 + +#define FLOAT_MAX 1.70141184e38 +#define FLOAT_MIN 1.17549435e-38 + +// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl +vec4 packFloat(float v) { + float av = abs(v); + + //Handle special cases + if(av < FLOAT_MIN) { + return vec4(0.0, 0.0, 0.0, 0.0); + } else if(v > FLOAT_MAX) { + return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; + } else if(v < -FLOAT_MAX) { + return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; + } + + vec4 c = vec4(0,0,0,0); + + //Compute exponent and mantissa + float e = floor(log2(av)); + float m = av * pow(2.0, -e) - 1.0; + + //Unpack mantissa + c[1] = floor(128.0 * m); + m -= c[1] / 128.0; + c[2] = floor(32768.0 * m); + m -= c[2] / 32768.0; + c[3] = floor(8388608.0 * m); + + //Unpack exponent + float ebias = e + 127.0; + c[0] = floor(ebias / 2.0); + ebias -= c[0] * 2.0; + c[1] += floor(ebias) * 128.0; + + //Unpack sign bit + c[0] += 128.0 * step(0.0, -v); + + //Scale back to range + return c / 255.0; +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform float pickId; +uniform vec3 clipBounds[2]; + +varying vec3 worldPosition; +varying float pixelArcLength; +varying vec4 fragColor; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; + + gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); +}`]),h=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];a.createShader=function(d){return l(d,u,c,null,h)},a.createPickShader=function(d){return l(d,u,f,null,h)}},5714:function(i,a,o){"use strict";i.exports=S;var s=o(2762),l=o(8116),u=o(7766),c=new Uint8Array(4),f=new Float32Array(c.buffer);function h(g,P,E,z){return c[0]=z,c[1]=E,c[2]=P,c[3]=g,f[0]}var d=o(2478),v=o(9618),m=o(7319),b=m.createShader,p=m.createPickShader,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function M(g,P){for(var E=0,z=0;z<3;++z){var q=g[z]-P[z];E+=q*q}return Math.sqrt(E)}function T(g){for(var P=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],E=0;E<3;++E)P[0][E]=Math.max(g[0][E],P[0][E]),P[1][E]=Math.min(g[1][E],P[1][E]);return P}function L(g,P,E,z){this.arcLength=g,this.position=P,this.index=E,this.dataCoordinate=z}function x(g,P,E,z,q,V){this.gl=g,this.shader=P,this.pickShader=E,this.buffer=z,this.vao=q,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=V,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var C=x.prototype;C.isTransparent=function(){return this.hasAlpha},C.isOpaque=function(){return!this.hasAlpha},C.pickSlots=1,C.setPickBase=function(g){this.pickId=g},C.drawTransparent=C.draw=function(g){if(this.vertexCount){var P=this.gl,E=this.shader,z=this.vao;E.bind(),E.uniforms={model:g.model||k,view:g.view||k,projection:g.projection||k,clipBounds:T(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[P.drawingBufferWidth,P.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(P.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},C.drawPick=function(g){if(this.vertexCount){var P=this.gl,E=this.pickShader,z=this.vao;E.bind(),E.uniforms={model:g.model||k,view:g.view||k,projection:g.projection||k,pickId:this.pickId,clipBounds:T(this.clipBounds),screenShape:[P.drawingBufferWidth,P.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(P.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},C.update=function(g){var P,E;this.dirty=!0;var z=!!g.connectGaps;"dashScale"in g&&(this.dashScale=g.dashScale),this.hasAlpha=!1,"opacity"in g&&(this.opacity=+g.opacity,this.opacity<1&&(this.hasAlpha=!0));var q=[],V=[],G=[],Z=0,j=0,N=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],H=g.position||g.positions;if(H){var ie=g.color||g.colors||[0,0,0,1],ae=g.lineWidth||1,_e=!1;e:for(P=1;P0){for(var ge=0;ge<24;++ge)q.push(q[q.length-12]);j+=2,_e=!0}continue e}N[0][E]=Math.min(N[0][E],Ee[E],Ce[E]),N[1][E]=Math.max(N[1][E],Ee[E],Ce[E])}var re,Se;Array.isArray(ie[0])?(re=ie.length>P-1?ie[P-1]:ie.length>0?ie[ie.length-1]:[0,0,0,1],Se=ie.length>P?ie[P]:ie.length>0?ie[ie.length-1]:[0,0,0,1]):re=Se=ie,re.length===3&&(re=[re[0],re[1],re[2],1]),Se.length===3&&(Se=[Se[0],Se[1],Se[2],1]),!this.hasAlpha&&re[3]<1&&(this.hasAlpha=!0);var ke;Array.isArray(ae)?ke=ae.length>P-1?ae[P-1]:ae.length>0?ae[ae.length-1]:[0,0,0,1]:ke=ae;var be=Z;if(Z+=M(Ee,Ce),_e){for(E=0;E<2;++E)q.push(Ee[0],Ee[1],Ee[2],Ce[0],Ce[1],Ce[2],be,ke,re[0],re[1],re[2],re[3]);j+=2,_e=!1}q.push(Ee[0],Ee[1],Ee[2],Ce[0],Ce[1],Ce[2],be,ke,re[0],re[1],re[2],re[3],Ee[0],Ee[1],Ee[2],Ce[0],Ce[1],Ce[2],be,-ke,re[0],re[1],re[2],re[3],Ce[0],Ce[1],Ce[2],Ee[0],Ee[1],Ee[2],Z,-ke,Se[0],Se[1],Se[2],Se[3],Ce[0],Ce[1],Ce[2],Ee[0],Ee[1],Ee[2],Z,ke,Se[0],Se[1],Se[2],Se[3]),j+=4}}if(this.buffer.update(q),V.push(Z),G.push(H[H.length-1].slice()),this.bounds=N,this.vertexCount=j,this.points=G,this.arcLength=V,"dashes"in g){var Be=g.dashes,Le=Be.slice();for(Le.unshift(0),P=1;P1.0001)return null;E+=P[L]}return Math.abs(E-1)>.001?null:[x,h(v,P),P]}},840:function(i,a,o){var s=o(3236),l=s([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position, normal; +attribute vec4 color; +attribute vec2 uv; + +uniform mat4 model + , view + , projection + , inverseModel; +uniform vec3 eyePosition + , lightPosition; + +varying vec3 f_normal + , f_lightDirection + , f_eyeDirection + , f_data; +varying vec4 f_color; +varying vec2 f_uv; + +vec4 project(vec3 p) { + return projection * (view * (model * vec4(p, 1.0))); +} + +void main() { + gl_Position = project(position); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * vec4(position , 1.0); + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + f_color = color; + f_data = position; + f_uv = uv; +} +`]),u=s([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness + , fresnel + , kambient + , kdiffuse + , kspecular; +uniform sampler2D texture; + +varying vec3 f_normal + , f_lightDirection + , f_eyeDirection + , f_data; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (f_color.a == 0.0 || + outOfRange(clipBounds[0], clipBounds[1], f_data) + ) discard; + + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d + + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * f_color.a; +} +`]),c=s([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec4 color; +attribute vec2 uv; + +uniform mat4 model, view, projection; + +varying vec4 f_color; +varying vec3 f_data; +varying vec2 f_uv; + +void main() { + gl_Position = projection * (view * (model * vec4(position, 1.0))); + f_color = color; + f_data = position; + f_uv = uv; +}`]),f=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform sampler2D texture; +uniform float opacity; + +varying vec4 f_color; +varying vec3 f_data; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; + + gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; +}`]),h=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 uv; +attribute float pointSize; + +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0); + } else { + gl_Position = projection * (view * (model * vec4(position, 1.0))); + } + gl_PointSize = pointSize; + f_color = color; + f_uv = uv; +}`]),d=s([`precision highp float; +#define GLSLIFY 1 + +uniform sampler2D texture; +uniform float opacity; + +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5); + if(dot(pointR, pointR) > 0.25) { + discard; + } + gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; +}`]),v=s([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec4 id; + +uniform mat4 model, view, projection; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + gl_Position = projection * (view * (model * vec4(position, 1.0))); + f_id = id; + f_position = position; +}`]),m=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]),b=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute float pointSize; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0.0, 0.0, 0.0, 0.0); + } else { + gl_Position = projection * (view * (model * vec4(position, 1.0))); + gl_PointSize = pointSize; + } + f_id = id; + f_position = position; +}`]),p=s([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; + +uniform mat4 model, view, projection; + +void main() { + gl_Position = projection * (view * (model * vec4(position, 1.0))); +}`]),k=s([`precision highp float; +#define GLSLIFY 1 + +uniform vec3 contourColor; + +void main() { + gl_FragColor = vec4(contourColor, 1.0); +} +`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.wireShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.pointShader={vertex:h,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},a.pickShader={vertex:v,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},a.pointPickShader={vertex:b,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},a.contourShader={vertex:p,fragment:k,attributes:[{name:"position",type:"vec3"}]}},7201:function(i,a,o){"use strict";var s=1e-6,l=1e-6,u=o(9405),c=o(2762),f=o(8116),h=o(7766),d=o(8406),v=o(6760),m=o(7608),b=o(9618),p=o(6729),k=o(7765),M=o(1888),T=o(840),L=o(7626),x=T.meshShader,C=T.wireShader,S=T.pointShader,g=T.pickShader,P=T.pointPickShader,E=T.contourShader,z=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function q(ge,re,Se,ke,be,Be,Le,me,Pe,ce,He,lt,mt,Ht,at,ct,ar,Vt,rr,tt,je,Ue,Ae,rt,St,Tt,dt){this.gl=ge,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=re,this.dirty=!0,this.triShader=Se,this.lineShader=ke,this.pointShader=be,this.pickShader=Be,this.pointPickShader=Le,this.contourShader=me,this.trianglePositions=Pe,this.triangleColors=He,this.triangleNormals=mt,this.triangleUVs=lt,this.triangleIds=ce,this.triangleVAO=Ht,this.triangleCount=0,this.lineWidth=1,this.edgePositions=at,this.edgeColors=ar,this.edgeUVs=Vt,this.edgeIds=ct,this.edgeVAO=rr,this.edgeCount=0,this.pointPositions=tt,this.pointColors=Ue,this.pointUVs=Ae,this.pointSizes=rt,this.pointIds=je,this.pointVAO=St,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Tt,this.contourVAO=dt,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 V=q.prototype;V.isOpaque=function(){return!this.hasAlpha},V.isTransparent=function(){return this.hasAlpha},V.pickSlots=1,V.setPickBase=function(ge){this.pickId=ge};function G(ge,re){if(!re||!re.length)return 1;for(var Se=0;Sege&&Se>0){var ke=(re[Se][0]-ge)/(re[Se][0]-re[Se-1][0]);return re[Se][1]*(1-ke)+ke*re[Se-1][1]}}return 1}function Z(ge,re){for(var Se=p({colormap:ge,nshades:256,format:"rgba"}),ke=new Uint8Array(256*4),be=0;be<256;++be){for(var Be=Se[be],Le=0;Le<3;++Le)ke[4*be+Le]=Be[Le];re?ke[4*be+3]=255*G(be/255,re):ke[4*be+3]=255*Be[3]}return b(ke,[256,256,4],[4,0,1])}function j(ge){for(var re=ge.length,Se=new Array(re),ke=0;ke0){var mt=this.triShader;mt.bind(),mt.uniforms=me,this.triangleVAO.bind(),re.drawArrays(re.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var mt=this.lineShader;mt.bind(),mt.uniforms=me,this.edgeVAO.bind(),re.lineWidth(this.lineWidth*this.pixelRatio),re.drawArrays(re.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var mt=this.pointShader;mt.bind(),mt.uniforms=me,this.pointVAO.bind(),re.drawArrays(re.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var mt=this.contourShader;mt.bind(),mt.uniforms=me,this.contourVAO.bind(),re.drawArrays(re.LINES,0,this.contourCount),this.contourVAO.unbind()}},V.drawPick=function(ge){ge=ge||{};for(var re=this.gl,Se=ge.model||z,ke=ge.view||z,be=ge.projection||z,Be=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],Le=0;Le<3;++Le)Be[0][Le]=Math.max(Be[0][Le],this.clipBounds[0][Le]),Be[1][Le]=Math.min(Be[1][Le],this.clipBounds[1][Le]);this._model=[].slice.call(Se),this._view=[].slice.call(ke),this._projection=[].slice.call(be),this._resolution=[re.drawingBufferWidth,re.drawingBufferHeight];var me={model:Se,view:ke,projection:be,clipBounds:Be,pickId:this.pickId/255},Pe=this.pickShader;if(Pe.bind(),Pe.uniforms=me,this.triangleCount>0&&(this.triangleVAO.bind(),re.drawArrays(re.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),re.lineWidth(this.lineWidth*this.pixelRatio),re.drawArrays(re.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Pe=this.pointPickShader;Pe.bind(),Pe.uniforms=me,this.pointVAO.bind(),re.drawArrays(re.POINTS,0,this.pointCount),this.pointVAO.unbind()}},V.pick=function(ge){if(!ge||ge.id!==this.pickId)return null;for(var re=ge.value[0]+256*ge.value[1]+65536*ge.value[2],Se=this.cells[re],ke=this.positions,be=new Array(Se.length),Be=0;BeMath.abs(g))p.rotate(z,0,0,-S*P*Math.PI*x.rotateSpeed/window.innerWidth);else if(!x._ortho){var q=-x.zoomSpeed*E*g/window.innerHeight*(z-p.lastT())/20;p.pan(z,0,0,M*(Math.exp(q)-1))}}},!0)},x.enableMouseListeners(),x}},799:function(i,a,o){var s=o(3236),l=o(9405),u=s([`precision mediump float; +#define GLSLIFY 1 +attribute vec2 position; +varying vec2 uv; +void main() { + uv = position; + gl_Position = vec4(position, 0, 1); +}`]),c=s([`precision mediump float; +#define GLSLIFY 1 + +uniform sampler2D accumBuffer; +varying vec2 uv; + +void main() { + vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); + gl_FragColor = min(vec4(1,1,1,1), accum); +}`]);i.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec2"}])}},4100:function(i,a,o){"use strict";var s=o(4437),l=o(3837),u=o(5445),c=o(4449),f=o(3589),h=o(2260),d=o(7169),v=o(351),m=o(4772),b=o(4040),p=o(799),k=o(9216)({tablet:!0,featureDetect:!0});i.exports={createScene:C,createCamera:s};function M(){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 T(g,P){var E=null;try{E=g.getContext("webgl",P),E||(E=g.getContext("experimental-webgl",P))}catch(z){return null}return E}function L(g){var P=Math.round(Math.log(Math.abs(g))/Math.log(10));if(P<0){var E=Math.round(Math.pow(10,-P));return Math.ceil(g*E)/E}else if(P>0){var E=Math.round(Math.pow(10,P));return Math.ceil(g/E)*E}return Math.ceil(g)}function x(g){return typeof g=="boolean"?g:!0}function C(g){g=g||{},g.camera=g.camera||{};var P=g.canvas;if(!P)if(P=document.createElement("canvas"),g.container){var E=g.container;E.appendChild(P)}else document.body.appendChild(P);var z=g.gl;if(z||(g.glOptions&&(k=!!g.glOptions.preserveDrawingBuffer),z=T(P,g.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:k})),!z)throw new Error("webgl not supported");var q=g.bounds||[[-10,-10,-10],[10,10,10]],V=new M,G=h(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!k}),Z=p(z),j=g.cameraObject&&g.cameraObject._ortho===!0||g.camera.projection&&g.camera.projection.type==="orthographic"||!1,N={eye:g.camera.eye||[2,0,0],center:g.camera.center||[0,0,0],up:g.camera.up||[0,1,0],zoomMin:g.camera.zoomMax||.1,zoomMax:g.camera.zoomMin||100,mode:g.camera.mode||"turntable",_ortho:j},H=g.axes||{},ie=l(z,H);ie.enable=!H.disable;var ae=g.spikes||{},_e=c(z,ae),Ee=[],Ce=[],ge=[],re=[],Se=!0,Le=!0,ke=new Array(16),be=new Array(16),Be={view:null,projection:ke,model:be,_ortho:!1},Le=!0,me=[z.drawingBufferWidth,z.drawingBufferHeight],Pe=g.cameraObject||s(P,N),ce={gl:z,contextLost:!1,pixelRatio:g.pixelRatio||1,canvas:P,selection:V,camera:Pe,axes:ie,axesPixels:null,spikes:_e,bounds:q,objects:Ee,shape:me,aspect:g.aspectRatio||[1,1,1],pickRadius:g.pickRadius||10,zNear:g.zNear||.01,zFar:g.zFar||1e3,fovy:g.fovy||Math.PI/4,clearColor:g.clearColor||[0,0,0,0],autoResize:x(g.autoResize),autoBounds:x(g.autoBounds),autoScale:!!g.autoScale,autoCenter:x(g.autoCenter),clipToBounds:x(g.clipToBounds),snapToData:!!g.snapToData,onselect:g.onselect||null,onrender:g.onrender||null,onclick:g.onclick||null,cameraParams:Be,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(tt){this.aspect[0]=tt.x,this.aspect[1]=tt.y,this.aspect[2]=tt.z,Le=!0},setBounds:function(tt,je){this.bounds[0][tt]=je.min,this.bounds[1][tt]=je.max},setClearColor:function(tt){this.clearColor=tt},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)}},He=[z.drawingBufferWidth/ce.pixelRatio|0,z.drawingBufferHeight/ce.pixelRatio|0];function lt(){if(!ce._stopped&&ce.autoResize){var tt=P.parentNode,je=1,Ue=1;tt&&tt!==document.body?(je=tt.clientWidth,Ue=tt.clientHeight):(je=window.innerWidth,Ue=window.innerHeight);var Ae=Math.ceil(je*ce.pixelRatio)|0,rt=Math.ceil(Ue*ce.pixelRatio)|0;if(Ae!==P.width||rt!==P.height){P.width=Ae,P.height=rt;var St=P.style;St.position=St.position||"absolute",St.left="0px",St.top="0px",St.width=je+"px",St.height=Ue+"px",Se=!0}}}ce.autoResize&<(),window.addEventListener("resize",lt);function mt(){for(var tt=Ee.length,je=re.length,Ue=0;Ue0&&ge[je-1]===0;)ge.pop(),re.pop().dispose()}ce.update=function(tt){ce._stopped||(tt=tt||{},Se=!0,Le=!0)},ce.add=function(tt){ce._stopped||(tt.axes=ie,Ee.push(tt),Ce.push(-1),Se=!0,Le=!0,mt())},ce.remove=function(tt){if(!ce._stopped){var je=Ee.indexOf(tt);je<0||(Ee.splice(je,1),Ce.pop(),Se=!0,Le=!0,mt())}},ce.dispose=function(){if(!ce._stopped&&(ce._stopped=!0,window.removeEventListener("resize",lt),P.removeEventListener("webglcontextlost",Ht),ce.mouseListener.enabled=!1,!ce.contextLost)){ie.dispose(),_e.dispose();for(var tt=0;ttV.distance)continue;for(var pt=0;pt1e-6?(k=Math.acos(M),T=Math.sin(k),L=Math.sin((1-u)*k)/T,x=Math.sin(u*k)/T):(L=1-u,x=u),o[0]=L*c+x*v,o[1]=L*f+x*m,o[2]=L*h+x*b,o[3]=L*d+x*p,o}},5964:function(i){"use strict";i.exports=function(a){return!a&&a!==0?"":a.toString()}},9366:function(i,a,o){"use strict";var s=o(4359);i.exports=u;var l={};function u(c,f,h){var d=[f.style,f.weight,f.variant,f.family].join("_"),v=l[d];if(v||(v=l[d]={}),c in v)return v[c];var m={textAlign:"center",textBaseline:"middle",lineHeight:1,font:f.family,fontStyle:f.style,fontWeight:f.weight,fontVariant:f.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};m.triangles=!0;var b=s(c,m);m.triangles=!1;var p=s(c,m),k,M;if(h&&h!==1){for(k=0;k max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform vec4 highlightId; +uniform float highlightScale; +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float scale = 1.0; + if(distance(highlightId, id) < 0.0001) { + scale = highlightScale; + } + + vec4 worldPosition = model * vec4(position, 1); + vec4 viewPosition = view * worldPosition; + viewPosition = viewPosition / viewPosition.w; + vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0)); + + gl_Position = clipPosition; + interpColor = color; + pickId = id; + dataCoordinate = position; + } +}`]),c=l([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform vec2 screenSize; +uniform vec3 clipBounds[2]; +uniform float highlightScale, pixelRatio; +uniform vec4 highlightId; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float scale = pixelRatio; + if(distance(highlightId.bgr, id.bgr) < 0.001) { + scale *= highlightScale; + } + + vec4 worldPosition = model * vec4(position, 1.0); + vec4 viewPosition = view * worldPosition; + vec4 clipPosition = projection * viewPosition; + clipPosition /= clipPosition.w; + + gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0); + interpColor = color; + pickId = id; + dataCoordinate = position; + } +}`]),f=l([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform float highlightScale; +uniform vec4 highlightId; +uniform vec3 axes[2]; +uniform mat4 model, view, projection; +uniform vec2 screenSize; +uniform vec3 clipBounds[2]; +uniform float scale, pixelRatio; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float lscale = pixelRatio * scale; + if(distance(highlightId, id) < 0.0001) { + lscale *= highlightScale; + } + + vec4 clipCenter = projection * (view * (model * vec4(position, 1))); + vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y; + vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1))); + + gl_Position = clipPosition; + interpColor = color; + pickId = id; + dataCoordinate = dataPosition; + } +} +`]),h=l([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 fragClipBounds[2]; +uniform float opacity; + +varying vec4 interpColor; +varying vec3 dataCoordinate; + +void main() { + if ( + outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) || + interpColor.a * opacity == 0. + ) discard; + gl_FragColor = interpColor * opacity; +} +`]),d=l([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 fragClipBounds[2]; +uniform float pickGroup; + +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; + + gl_FragColor = vec4(pickGroup, pickId.bgr); +}`]),v=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],m={vertex:u,fragment:h,attributes:v},b={vertex:c,fragment:h,attributes:v},p={vertex:f,fragment:h,attributes:v},k={vertex:u,fragment:d,attributes:v},M={vertex:c,fragment:d,attributes:v},T={vertex:f,fragment:d,attributes:v};function L(x,C){var S=s(x,C),g=S.attributes;return g.position.location=0,g.color.location=1,g.glyph.location=2,g.id.location=3,S}a.createPerspective=function(x){return L(x,m)},a.createOrtho=function(x){return L(x,b)},a.createProject=function(x){return L(x,p)},a.createPickPerspective=function(x){return L(x,k)},a.createPickOrtho=function(x){return L(x,M)},a.createPickProject=function(x){return L(x,T)}},8418:function(i,a,o){"use strict";var s=o(5219),l=o(2762),u=o(8116),c=o(1888),f=o(6760),h=o(1283),d=o(9366),v=o(5964),m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],b=ArrayBuffer,p=DataView;function k(be){return b.isView(be)&&!(be instanceof p)}function M(be){return Array.isArray(be)||k(be)}i.exports=ke;function T(be,Be){var Le=be[0],me=be[1],Pe=be[2],ce=be[3];return be[0]=Be[0]*Le+Be[4]*me+Be[8]*Pe+Be[12]*ce,be[1]=Be[1]*Le+Be[5]*me+Be[9]*Pe+Be[13]*ce,be[2]=Be[2]*Le+Be[6]*me+Be[10]*Pe+Be[14]*ce,be[3]=Be[3]*Le+Be[7]*me+Be[11]*Pe+Be[15]*ce,be}function L(be,Be,Le,me){return T(me,me,Le),T(me,me,Be),T(me,me,be)}function x(be,Be){this.index=be,this.dataCoordinate=this.position=Be}function C(be){return be===!0||be>1?1:be}function S(be,Be,Le,me,Pe,ce,He,lt,mt,Ht,at,ct){this.gl=be,this.pixelRatio=1,this.shader=Be,this.orthoShader=Le,this.projectShader=me,this.pointBuffer=Pe,this.colorBuffer=ce,this.glyphBuffer=He,this.idBuffer=lt,this.vao=mt,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=Ht,this.pickOrthoShader=at,this.pickProjectShader=ct,this.points=[],this._selectResult=new x(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 g=S.prototype;g.pickSlots=1,g.setPickBase=function(be){this.pickId=be},g.isTransparent=function(){if(this.hasAlpha)return!0;for(var be=0;be<3;++be)if(this.axesProject[be]&&this.projectHasAlpha)return!0;return!1},g.isOpaque=function(){if(!this.hasAlpha)return!0;for(var be=0;be<3;++be)if(this.axesProject[be]&&!this.projectHasAlpha)return!0;return!1};var P=[0,0],E=[0,0,0],z=[0,0,0],q=[0,0,0,1],V=[0,0,0,1],G=m.slice(),Z=[0,0,0],j=[[0,0,0],[0,0,0]];function N(be){return be[0]=be[1]=be[2]=0,be}function H(be,Be){return be[0]=Be[0],be[1]=Be[1],be[2]=Be[2],be[3]=1,be}function ie(be,Be,Le,me){return be[0]=Be[0],be[1]=Be[1],be[2]=Be[2],be[Le]=me,be}function ae(be){for(var Be=j,Le=0;Le<2;++Le)for(var me=0;me<3;++me)Be[Le][me]=Math.max(Math.min(be[Le][me],1e8),-1e8);return Be}function _e(be,Be,Le,me){var Pe=Be.axesProject,ce=Be.gl,He=be.uniforms,lt=Le.model||m,mt=Le.view||m,Ht=Le.projection||m,at=Be.axesBounds,ct=ae(Be.clipBounds),ar;Be.axes&&Be.axes.lastCubeProps?ar=Be.axes.lastCubeProps.axis:ar=[1,1,1],P[0]=2/ce.drawingBufferWidth,P[1]=2/ce.drawingBufferHeight,be.bind(),He.view=mt,He.projection=Ht,He.screenSize=P,He.highlightId=Be.highlightId,He.highlightScale=Be.highlightScale,He.clipBounds=ct,He.pickGroup=Be.pickId/255,He.pixelRatio=me;for(var Vt=0;Vt<3;++Vt)if(Pe[Vt]){He.scale=Be.projectScale[Vt],He.opacity=Be.projectOpacity[Vt];for(var rr=G,tt=0;tt<16;++tt)rr[tt]=0;for(var tt=0;tt<4;++tt)rr[5*tt]=1;rr[5*Vt]=0,ar[Vt]<0?rr[12+Vt]=at[0][Vt]:rr[12+Vt]=at[1][Vt],f(rr,lt,rr),He.model=rr;var je=(Vt+1)%3,Ue=(Vt+2)%3,Ae=N(E),rt=N(z);Ae[je]=1,rt[Ue]=1;var St=L(Ht,mt,lt,H(q,Ae)),Tt=L(Ht,mt,lt,H(V,rt));if(Math.abs(St[1])>Math.abs(Tt[1])){var dt=St;St=Tt,Tt=dt,dt=Ae,Ae=rt,rt=dt;var Et=je;je=Ue,Ue=Et}St[0]<0&&(Ae[je]=-1),Tt[1]>0&&(rt[Ue]=-1);for(var pt=0,jt=0,tt=0;tt<4;++tt)pt+=Math.pow(lt[4*je+tt],2),jt+=Math.pow(lt[4*Ue+tt],2);Ae[je]/=Math.sqrt(pt),rt[Ue]/=Math.sqrt(jt),He.axes[0]=Ae,He.axes[1]=rt,He.fragClipBounds[0]=ie(Z,ct[0],Vt,-1e8),He.fragClipBounds[1]=ie(Z,ct[1],Vt,1e8),Be.vao.bind(),Be.vao.draw(ce.TRIANGLES,Be.vertexCount),Be.lineWidth>0&&(ce.lineWidth(Be.lineWidth*me),Be.vao.draw(ce.LINES,Be.lineVertexCount,Be.vertexCount)),Be.vao.unbind()}}var Ee=[-1e8,-1e8,-1e8],Ce=[1e8,1e8,1e8],ge=[Ee,Ce];function re(be,Be,Le,me,Pe,ce,He){var lt=Le.gl;if((ce===Le.projectHasAlpha||He)&&_e(Be,Le,me,Pe),ce===Le.hasAlpha||He){be.bind();var mt=be.uniforms;mt.model=me.model||m,mt.view=me.view||m,mt.projection=me.projection||m,P[0]=2/lt.drawingBufferWidth,P[1]=2/lt.drawingBufferHeight,mt.screenSize=P,mt.highlightId=Le.highlightId,mt.highlightScale=Le.highlightScale,mt.fragClipBounds=ge,mt.clipBounds=Le.axes.bounds,mt.opacity=Le.opacity,mt.pickGroup=Le.pickId/255,mt.pixelRatio=Pe,Le.vao.bind(),Le.vao.draw(lt.TRIANGLES,Le.vertexCount),Le.lineWidth>0&&(lt.lineWidth(Le.lineWidth*Pe),Le.vao.draw(lt.LINES,Le.lineVertexCount,Le.vertexCount)),Le.vao.unbind()}}g.draw=function(be){var Be=this.useOrtho?this.orthoShader:this.shader;re(Be,this.projectShader,this,be,this.pixelRatio,!1,!1)},g.drawTransparent=function(be){var Be=this.useOrtho?this.orthoShader:this.shader;re(Be,this.projectShader,this,be,this.pixelRatio,!0,!1)},g.drawPick=function(be){var Be=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;re(Be,this.pickProjectShader,this,be,1,!0,!0)},g.pick=function(be){if(!be||be.id!==this.pickId)return null;var Be=be.value[2]+(be.value[1]<<8)+(be.value[0]<<16);if(Be>=this.pointCount||Be<0)return null;var Le=this.points[Be],me=this._selectResult;me.index=Be;for(var Pe=0;Pe<3;++Pe)me.position[Pe]=me.dataCoordinate[Pe]=Le[Pe];return me},g.highlight=function(be){if(!be)this.highlightId=[1,1,1,1];else{var Be=be.index,Le=Be&255,me=Be>>8&255,Pe=Be>>16&255;this.highlightId=[Le/255,me/255,Pe/255,0]}};function Se(be,Be,Le,me){var Pe;M(be)?Be0){var jr=0,gt=Ue,Ge=[0,0,0,1],Je=[0,0,0,1],We=M(ar)&&M(ar[0]),et=M(tt)&&M(tt[0]);e:for(var me=0;me0?1-jt[0][0]:Ir<0?1+jt[1][0]:1,Yr*=Yr>0?1-jt[0][1]:Yr<0?1+jt[1][1]:1;for(var _i=[Ir,Yr],Fn=Et.cells||[],An=Et.positions||[],Tt=0;Ttthis.buffer.length){l.free(this.buffer);for(var M=this.buffer=l.mallocUint8(c(k*p*4)),T=0;TM)for(p=M;pk)for(p=k;p=0){for(var j=Z.type.charAt(Z.type.length-1)|0,N=new Array(j),H=0;H=0;)ie+=1;V[G]=ie}var ae=new Array(M.length);function _e(){x.program=c.program(C,x._vref,x._fref,q,V);for(var Ee=0;Ee=0){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new s("","Invalid data type for attribute "+x+": "+C);f(v,m,S[0],p,g,k,x)}else if(C.indexOf("mat")>=0){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new s("","Invalid data type for attribute "+x+": "+C);h(v,m,S,p,g,k,x)}else throw new s("","Unknown data type for attribute "+x+": "+C);break}}return k}},3327:function(i,a,o){"use strict";var s=o(216),l=o(8866);i.exports=f;function u(h){return function(){return h}}function c(h,d){for(var v=new Array(h),m=0;m4)throw new l("","Invalid data type");switch(ie.charAt(0)){case"b":case"i":h["uniform"+ae+"iv"](m[V],G);break;case"v":h["uniform"+ae+"fv"](m[V],G);break;default:throw new l("","Unrecognized data type for vector "+name+": "+ie)}}else if(ie.indexOf("mat")===0&&ie.length===4){if(ae=ie.charCodeAt(ie.length-1)-48,ae<2||ae>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+ie);h["uniformMatrix"+ae+"fv"](m[V],!1,G);break}else throw new l("","Unknown uniform data type for "+name+": "+ie)}}}}}function k(C,S){if(typeof S!="object")return[[C,S]];var g=[];for(var P in S){var E=S[P],z=C;parseInt(P)+""===P?z+="["+P+"]":z+="."+P,typeof E=="object"?g.push.apply(g,k(z,E)):g.push([z,E])}return g}function M(C){switch(C){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var S=C.indexOf("vec");if(0<=S&&S<=1&&C.length===4+S){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new l("","Invalid data type");return C.charAt(0)==="b"?c(g,!1):c(g,0)}else if(C.indexOf("mat")===0&&C.length===4){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+C);return c(g*g,0)}else throw new l("","Unknown uniform data type for "+name+": "+C)}}function T(C,S,g){if(typeof g=="object"){var P=L(g);Object.defineProperty(C,S,{get:u(P),set:p(g),enumerable:!0,configurable:!1})}else m[g]?Object.defineProperty(C,S,{get:b(g),set:p(g),enumerable:!0,configurable:!1}):C[S]=M(v[g].type)}function L(C){var S;if(Array.isArray(C)){S=new Array(C.length);for(var g=0;g1){v[0]in h||(h[v[0]]=[]),h=h[v[0]];for(var m=1;m1)for(var k=0;k 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the tube vertex and normal at the given index. +// +// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. +// +// Each tube segment is made up of a ring of vertices. +// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. +// The indexes of tube segments run from 0 to 8. +// +vec3 getTubePosition(vec3 d, float index, out vec3 normal) { + float segmentCount = 8.0; + + float angle = 2.0 * 3.14159 * (index / segmentCount); + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d); + vec3 y = v * sin(angle) * length(d); + vec3 v3 = x + y; + + normal = normalize(v3); + + return v3; +} + +attribute vec4 vector; +attribute vec4 color, position; +attribute vec2 uv; + +uniform float vectorScale, tubeScale; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 eyePosition, lightPosition; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + // Scale the vector magnitude to stay constant with + // model & view changes. + vec3 normal; + vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); + vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * tubePosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + // vec4 m_position = model * vec4(tubePosition, 1.0); + vec4 t_position = view * tubePosition; + gl_Position = projection * t_position; + + f_color = color; + f_data = tubePosition.xyz; + f_position = position.xyz; + f_uv = uv; +} +`]),u=s([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform sampler2D texture; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = f_color * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * opacity; +} +`]),c=s([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the tube vertex and normal at the given index. +// +// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. +// +// Each tube segment is made up of a ring of vertices. +// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. +// The indexes of tube segments run from 0 to 8. +// +vec3 getTubePosition(vec3 d, float index, out vec3 normal) { + float segmentCount = 8.0; + + float angle = 2.0 * 3.14159 * (index / segmentCount); + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d); + vec3 y = v * sin(angle) * length(d); + vec3 v3 = x + y; + + normal = normalize(v3); + + return v3; +} + +attribute vec4 vector; +attribute vec4 position; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform float tubeScale; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + vec3 normal; + vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); + vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + gl_Position = projection * (view * tubePosition); + f_id = id; + f_position = position.xyz; +} +`]),f=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(i,a,o){"use strict";var s=o(2931),l=o(9970),u=["xyz","xzy","yxz","yzx","zxy","zyx"],c=function(T,L,x,C){for(var S=T.points,g=T.velocities,P=T.divergences,E=[],z=[],q=[],V=[],G=[],Z=[],j=0,N=0,H=l.create(),ie=l.create(),ae=8,_e=0;_e0)for(var re=0;reL)return C-1}return C},d=function(T,L,x){return Tx?x:T},v=function(T,L,x){var C=L.vectors,S=L.meshgrid,g=T[0],P=T[1],E=T[2],z=S[0].length,q=S[1].length,V=S[2].length,G=h(S[0],g),Z=h(S[1],P),j=h(S[2],E),N=G+1,H=Z+1,ie=j+1;if(G=d(G,0,z-1),N=d(N,0,z-1),Z=d(Z,0,q-1),H=d(H,0,q-1),j=d(j,0,V-1),ie=d(ie,0,V-1),G<0||Z<0||j<0||N>z-1||H>q-1||ie>V-1)return s.create();var ae=S[0][G],_e=S[0][N],Ee=S[1][Z],Ce=S[1][H],ge=S[2][j],re=S[2][ie],Se=(g-ae)/(_e-ae),ke=(P-Ee)/(Ce-Ee),be=(E-ge)/(re-ge);isFinite(Se)||(Se=.5),isFinite(ke)||(ke=.5),isFinite(be)||(be=.5);var Be,Le,me,Pe,ce,He;switch(x.reversedX&&(G=z-1-G,N=z-1-N),x.reversedY&&(Z=q-1-Z,H=q-1-H),x.reversedZ&&(j=V-1-j,ie=V-1-ie),x.filled){case 5:ce=j,He=ie,me=Z*V,Pe=H*V,Be=G*V*q,Le=N*V*q;break;case 4:ce=j,He=ie,Be=G*V,Le=N*V,me=Z*V*z,Pe=H*V*z;break;case 3:me=Z,Pe=H,ce=j*q,He=ie*q,Be=G*q*V,Le=N*q*V;break;case 2:me=Z,Pe=H,Be=G*q,Le=N*q,ce=j*q*z,He=ie*q*z;break;case 1:Be=G,Le=N,ce=j*z,He=ie*z,me=Z*z*V,Pe=H*z*V;break;default:Be=G,Le=N,me=Z*z,Pe=H*z,ce=j*z*q,He=ie*z*q;break}var lt=C[Be+me+ce],mt=C[Be+me+He],Ht=C[Be+Pe+ce],at=C[Be+Pe+He],ct=C[Le+me+ce],ar=C[Le+me+He],Vt=C[Le+Pe+ce],rr=C[Le+Pe+He],tt=s.create(),je=s.create(),Ue=s.create(),Ae=s.create();s.lerp(tt,lt,ct,Se),s.lerp(je,mt,ar,Se),s.lerp(Ue,Ht,Vt,Se),s.lerp(Ae,at,rr,Se);var rt=s.create(),St=s.create();s.lerp(rt,tt,Ue,ke),s.lerp(St,je,Ae,ke);var Tt=s.create();return s.lerp(Tt,rt,St,be),Tt},m=function(T,L){var x=L[0],C=L[1],S=L[2];return T[0]=x<0?-x:x,T[1]=C<0?-C:C,T[2]=S<0?-S:S,T},b=function(T){var L=1/0;T.sort(function(g,P){return g-P});for(var x=T.length,C=1;CN||rrH||ttie)},_e=s.distance(L[0],L[1]),Ee=10*_e/C,Ce=Ee*Ee,ge=1,re=0,Se=x.length;Se>1&&(ge=p(x));for(var ke=0;kere&&(re=lt),ce.push(lt),V.push({points:Be,velocities:Le,divergences:ce});for(var mt=0;mtCe&&s.scale(Ht,Ht,Ee/Math.sqrt(at)),s.add(Ht,Ht,be),me=z(Ht),s.squaredDistance(Pe,Ht)-Ce>-1e-4*Ce){Be.push(Ht),Pe=Ht,Le.push(me);var He=q(Ht,me),lt=s.length(He);isFinite(lt)&<>re&&(re=lt),ce.push(lt)}be=Ht}}var ct=f(V,T.colormap,re,ge);return g?ct.tubeScale=g:(re===0&&(re=1),ct.tubeScale=S*.5*ge/re),ct};var k=o(6740),M=o(6405).createMesh;i.exports.createTubeMesh=function(T,L){return M(T,L,{shaders:k,traceType:"streamtube"})}},990:function(i,a,o){var s=o(9405),l=o(3236),u=l([`precision highp float; +#define GLSLIFY 1 + +attribute vec4 uv; +attribute vec3 f; +attribute vec3 normal; + +uniform vec3 objectOffset; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 lightPosition, eyePosition; +uniform sampler2D colormap; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + vec3 localCoordinate = vec3(uv.zw, f.x); + worldCoordinate = objectOffset + localCoordinate; + mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); + vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 1.0); + vec4 clipPosition = projection * (view * worldPosition); + gl_Position = clipPosition; + kill = f.y; + value = f.z; + planeCoordinate = uv.xy; + + vColor = texture2D(colormap, vec2(value, value)); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * worldPosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + lightDirection = lightPosition - cameraCoordinate.xyz; + eyeDirection = eyePosition - cameraCoordinate.xyz; + surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); +} +`]),c=l([`precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float beckmannSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness) { + return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 lowerBound, upperBound; +uniform float contourTint; +uniform vec4 contourColor; +uniform sampler2D colormap; +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform float vertexColor; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + if ( + kill > 0.0 || + vColor.a == 0.0 || + outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) + ) discard; + + vec3 N = normalize(surfaceNormal); + vec3 V = normalize(eyeDirection); + vec3 L = normalize(lightDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = max(beckmannSpecular(L, V, N, roughness), 0.); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + //decide how to interpolate color \u2014 in vertex or in fragment + vec4 surfaceColor = + step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + + step(.5, vertexColor) * vColor; + + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; +} +`]),f=l([`precision highp float; +#define GLSLIFY 1 + +attribute vec4 uv; +attribute float f; + +uniform vec3 objectOffset; +uniform mat3 permutation; +uniform mat4 model, view, projection; +uniform float height, zOffset; +uniform sampler2D colormap; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + vec3 dataCoordinate = permutation * vec3(uv.xy, height); + worldCoordinate = objectOffset + dataCoordinate; + mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); + vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0); + + vec4 clipPosition = projection * (view * worldPosition); + clipPosition.z += zOffset; + + gl_Position = clipPosition; + value = f + objectOffset.z; + kill = -1.0; + planeCoordinate = uv.zw; + + vColor = texture2D(colormap, vec2(value, value)); + + //Don't do lighting for contours + surfaceNormal = vec3(1,0,0); + eyeDirection = vec3(0,1,0); + lightDirection = vec3(0,0,1); +} +`]),h=l([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec2 shape; +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 surfaceNormal; + +vec2 splitFloat(float v) { + float vh = 255.0 * v; + float upper = floor(vh); + float lower = fract(vh); + return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); +} + +void main() { + if ((kill > 0.0) || + (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; + + vec2 ux = splitFloat(planeCoordinate.x / shape.x); + vec2 uy = splitFloat(planeCoordinate.y / shape.y); + gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); +} +`]);a.createShader=function(d){var v=s(d,u,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},a.createPickShader=function(d){var v=s(d,u,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},a.createContourShader=function(d){var v=s(d,f,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v},a.createPickContourShader=function(d){var v=s(d,f,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v}},9499:function(i,a,o){"use strict";i.exports=Be;var s=o(8828),l=o(2762),u=o(8116),c=o(7766),f=o(1888),h=o(6729),d=o(5298),v=o(9994),m=o(9618),b=o(3711),p=o(6760),k=o(7608),M=o(2478),T=o(6199),L=o(990),x=L.createShader,C=L.createContourShader,S=L.createPickShader,g=L.createPickContourShader,P=4*10,E=[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]],q=[[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 Le=0;Le<3;++Le){var me=q[Le],Pe=(Le+1)%3,ce=(Le+2)%3;me[Pe+0]=1,me[ce+3]=1,me[Le+6]=1}})();function V(Le,me,Pe,ce,He){this.position=Le,this.index=me,this.uv=Pe,this.level=ce,this.dataCoordinate=He}var G=256;function Z(Le,me,Pe,ce,He,lt,mt,Ht,at,ct,ar,Vt,rr,tt,je){this.gl=Le,this.shape=me,this.bounds=Pe,this.objectOffset=je,this.intensityBounds=[],this._shader=ce,this._pickShader=He,this._coordinateBuffer=lt,this._vao=mt,this._colorMap=Ht,this._contourShader=at,this._contourPickShader=ct,this._contourBuffer=ar,this._contourVAO=Vt,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new V([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=rr,this._dynamicVAO=tt,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=[m(f.mallocFloat(1024),[0,0]),m(f.mallocFloat(1024),[0,0]),m(f.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 j=Z.prototype;j.genColormap=function(Le,me){var Pe=!1,ce=v([h({colormap:Le,nshades:G,format:"rgba"}).map(function(He,lt){var mt=me?N(lt/255,me):He[3];return mt<1&&(Pe=!0),[He[0],He[1],He[2],255*mt]})]);return d.divseq(ce,255),this.hasAlphaScale=Pe,ce},j.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},j.isOpaque=function(){return!this.isTransparent()},j.pickSlots=1,j.setPickBase=function(Le){this.pickId=Le};function N(Le,me){if(!me||!me.length)return 1;for(var Pe=0;PeLe&&Pe>0){var ce=(me[Pe][0]-Le)/(me[Pe][0]-me[Pe-1][0]);return me[Pe][1]*(1-ce)+ce*me[Pe-1][1]}}return 1}var H=[0,0,0],ie={showSurface:!1,showContour:!1,projections:[E.slice(),E.slice(),E.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function ae(Le,me){var Pe,ce,He,lt=me.axes&&me.axes.lastCubeProps.axis||H,mt=me.showSurface,Ht=me.showContour;for(Pe=0;Pe<3;++Pe)for(mt=mt||me.surfaceProject[Pe],ce=0;ce<3;++ce)Ht=Ht||me.contourProject[Pe][ce];for(Pe=0;Pe<3;++Pe){var at=ie.projections[Pe];for(ce=0;ce<16;++ce)at[ce]=0;for(ce=0;ce<4;++ce)at[5*ce]=1;at[5*Pe]=0,at[12+Pe]=me.axesBounds[+(lt[Pe]>0)][Pe],p(at,Le.model,at);var ct=ie.clipBounds[Pe];for(He=0;He<2;++He)for(ce=0;ce<3;++ce)ct[He][ce]=Le.clipBounds[He][ce];ct[0][Pe]=-1e8,ct[1][Pe]=1e8}return ie.showSurface=mt,ie.showContour=Ht,ie}var _e={model:E,view:E,projection:E,inverseModel:E.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},Ee=E.slice(),Ce=[1,0,0,0,1,0,0,0,1];function ge(Le,me){Le=Le||{};var Pe=this.gl;Pe.disable(Pe.CULL_FACE),this._colorMap.bind(0);var ce=_e;ce.model=Le.model||E,ce.view=Le.view||E,ce.projection=Le.projection||E,ce.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ce.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ce.objectOffset=this.objectOffset,ce.contourColor=this.contourColor[0],ce.inverseModel=k(ce.inverseModel,ce.model);for(var He=0;He<2;++He)for(var lt=ce.clipBounds[He],mt=0;mt<3;++mt)lt[mt]=Math.min(Math.max(this.clipBounds[He][mt],-1e8),1e8);ce.kambient=this.ambientLight,ce.kdiffuse=this.diffuseLight,ce.kspecular=this.specularLight,ce.roughness=this.roughness,ce.fresnel=this.fresnel,ce.opacity=this.opacity,ce.height=0,ce.permutation=Ce,ce.vertexColor=this.vertexColor;var Ht=Ee;for(p(Ht,ce.view,ce.model),p(Ht,ce.projection,Ht),k(Ht,Ht),He=0;He<3;++He)ce.eyePosition[He]=Ht[12+He]/Ht[15];var at=Ht[15];for(He=0;He<3;++He)at+=this.lightPosition[He]*Ht[4*He+3];for(He=0;He<3;++He){var ct=Ht[12+He];for(mt=0;mt<3;++mt)ct+=Ht[4*mt+He]*this.lightPosition[mt];ce.lightPosition[He]=ct/at}var ar=ae(ce,this);if(ar.showSurface){for(this._shader.bind(),this._shader.uniforms=ce,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Pe.TRIANGLES,this._vertexCount),He=0;He<3;++He)!this.surfaceProject[He]||!this.vertexCount||(this._shader.uniforms.model=ar.projections[He],this._shader.uniforms.clipBounds=ar.clipBounds[He],this._vao.draw(Pe.TRIANGLES,this._vertexCount));this._vao.unbind()}if(ar.showContour){var Vt=this._contourShader;ce.kambient=1,ce.kdiffuse=0,ce.kspecular=0,ce.opacity=1,Vt.bind(),Vt.uniforms=ce;var rr=this._contourVAO;for(rr.bind(),He=0;He<3;++He)for(Vt.uniforms.permutation=q[He],Pe.lineWidth(this.contourWidth[He]*this.pixelRatio),mt=0;mt>4)/16)/255,He=Math.floor(ce),lt=ce-He,mt=me[1]*(Le.value[1]+(Le.value[2]&15)/16)/255,Ht=Math.floor(mt),at=mt-Ht;He+=1,Ht+=1;var ct=Pe.position;ct[0]=ct[1]=ct[2]=0;for(var ar=0;ar<2;++ar)for(var Vt=ar?lt:1-lt,rr=0;rr<2;++rr)for(var tt=rr?at:1-at,je=He+ar,Ue=Ht+rr,Ae=Vt*tt,rt=0;rt<3;++rt)ct[rt]+=this._field[rt].get(je,Ue)*Ae;for(var St=this._pickResult.level,Tt=0;Tt<3;++Tt)if(St[Tt]=M.le(this.contourLevels[Tt],ct[Tt]),St[Tt]<0)this.contourLevels[Tt].length>0&&(St[Tt]=0);else if(St[Tt]Math.abs(Et-ct[Tt])&&(St[Tt]+=1)}for(Pe.index[0]=lt<.5?He:He+1,Pe.index[1]=at<.5?Ht:Ht+1,Pe.uv[0]=ce/me[0],Pe.uv[1]=mt/me[1],rt=0;rt<3;++rt)Pe.dataCoordinate[rt]=this._field[rt].get(Pe.index[0],Pe.index[1]);return Pe},j.padField=function(Le,me){var Pe=me.shape.slice(),ce=Le.shape.slice();d.assign(Le.lo(1,1).hi(Pe[0],Pe[1]),me),d.assign(Le.lo(1).hi(Pe[0],1),me.hi(Pe[0],1)),d.assign(Le.lo(1,ce[1]-1).hi(Pe[0],1),me.lo(0,Pe[1]-1).hi(Pe[0],1)),d.assign(Le.lo(0,1).hi(1,Pe[1]),me.hi(1)),d.assign(Le.lo(ce[0]-1,1).hi(1,Pe[1]),me.lo(Pe[0]-1)),Le.set(0,0,me.get(0,0)),Le.set(0,ce[1]-1,me.get(0,Pe[1]-1)),Le.set(ce[0]-1,0,me.get(Pe[0]-1,0)),Le.set(ce[0]-1,ce[1]-1,me.get(Pe[0]-1,Pe[1]-1))};function Se(Le,me){return Array.isArray(Le)?[me(Le[0]),me(Le[1]),me(Le[2])]:[me(Le),me(Le),me(Le)]}function ke(Le){return Array.isArray(Le)?Le.length===3?[Le[0],Le[1],Le[2],1]:[Le[0],Le[1],Le[2],Le[3]]:[0,0,0,1]}function be(Le){if(Array.isArray(Le)){if(Array.isArray(Le))return[ke(Le[0]),ke(Le[1]),ke(Le[2])];var me=ke(Le);return[me.slice(),me.slice(),me.slice()]}}j.update=function(Le){Le=Le||{},this.objectOffset=Le.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in Le&&(this.contourWidth=Se(Le.contourWidth,Number)),"showContour"in Le&&(this.showContour=Se(Le.showContour,Boolean)),"showSurface"in Le&&(this.showSurface=!!Le.showSurface),"contourTint"in Le&&(this.contourTint=Se(Le.contourTint,Boolean)),"contourColor"in Le&&(this.contourColor=be(Le.contourColor)),"contourProject"in Le&&(this.contourProject=Se(Le.contourProject,function(yn){return Se(yn,Boolean)})),"surfaceProject"in Le&&(this.surfaceProject=Le.surfaceProject),"dynamicColor"in Le&&(this.dynamicColor=be(Le.dynamicColor)),"dynamicTint"in Le&&(this.dynamicTint=Se(Le.dynamicTint,Number)),"dynamicWidth"in Le&&(this.dynamicWidth=Se(Le.dynamicWidth,Number)),"opacity"in Le&&(this.opacity=Le.opacity),"opacityscale"in Le&&(this.opacityscale=Le.opacityscale),"colorBounds"in Le&&(this.colorBounds=Le.colorBounds),"vertexColor"in Le&&(this.vertexColor=Le.vertexColor?1:0),"colormap"in Le&&this._colorMap.setPixels(this.genColormap(Le.colormap,this.opacityscale));var me=Le.field||Le.coords&&Le.coords[2]||null,Pe=!1;if(me||(this._field[2].shape[0]||this._field[2].shape[2]?me=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):me=this._field[2].hi(0,0)),"field"in Le||"coords"in Le){var ce=(me.shape[0]+2)*(me.shape[1]+2);ce>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(ce))),this._field[2]=m(this._field[2].data,[me.shape[0]+2,me.shape[1]+2]),this.padField(this._field[2],me),this.shape=me.shape.slice();for(var He=this.shape,lt=0;lt<2;++lt)this._field[2].size>this._field[lt].data.length&&(f.freeFloat(this._field[lt].data),this._field[lt].data=f.mallocFloat(this._field[2].size)),this._field[lt]=m(this._field[lt].data,[He[0]+2,He[1]+2]);if(Le.coords){var mt=Le.coords;if(!Array.isArray(mt)||mt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(lt=0;lt<2;++lt){var Ht=mt[lt];for(rr=0;rr<2;++rr)if(Ht.shape[rr]!==He[rr])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[lt],Ht)}}else if(Le.ticks){var at=Le.ticks;if(!Array.isArray(at)||at.length!==2)throw new Error("gl-surface: invalid ticks");for(lt=0;lt<2;++lt){var ct=at[lt];if((Array.isArray(ct)||ct.length)&&(ct=m(ct)),ct.shape[0]!==He[lt])throw new Error("gl-surface: invalid tick length");var ar=m(ct.data,He);ar.stride[lt]=ct.stride[0],ar.stride[lt^1]=0,this.padField(this._field[lt],ar)}}else{for(lt=0;lt<2;++lt){var Vt=[0,0];Vt[lt]=1,this._field[lt]=m(this._field[lt].data,[He[0]+2,He[1]+2],Vt,0)}this._field[0].set(0,0,0);for(var rr=0;rr0){for(var en=0;en<5;++en)Pi.pop();We-=1}continue e}}}Fn.push(We)}this._contourOffsets[ai]=un,this._contourCounts[ai]=Fn}var fn=f.mallocFloat(Pi.length);for(lt=0;ltV||z<0||z>V)throw new Error("gl-texture2d: Invalid texture size");return P._shape=[E,z],P.bind(),q.texImage2D(q.TEXTURE_2D,0,P.format,E,z,0,P.format,P.type,null),P._mipLevels=[0],P}function p(P,E,z,q,V,G){this.gl=P,this.handle=E,this.format=V,this.type=G,this._shape=[z,q],this._mipLevels=[0],this._magFilter=P.NEAREST,this._minFilter=P.NEAREST,this._wrapS=P.CLAMP_TO_EDGE,this._wrapT=P.CLAMP_TO_EDGE,this._anisoSamples=1;var Z=this,j=[this._wrapS,this._wrapT];Object.defineProperties(j,[{get:function(){return Z._wrapS},set:function(H){return Z.wrapS=H}},{get:function(){return Z._wrapT},set:function(H){return Z.wrapT=H}}]),this._wrapVector=j;var N=[this._shape[0],this._shape[1]];Object.defineProperties(N,[{get:function(){return Z._shape[0]},set:function(H){return Z.width=H}},{get:function(){return Z._shape[1]},set:function(H){return Z.height=H}}]),this._shapeVector=N}var k=p.prototype;Object.defineProperties(k,{minFilter:{get:function(){return this._minFilter},set:function(P){this.bind();var E=this.gl;if(this.type===E.FLOAT&&c.indexOf(P)>=0&&(E.getExtension("OES_texture_float_linear")||(P=E.NEAREST)),f.indexOf(P)<0)throw new Error("gl-texture2d: Unknown filter mode "+P);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MIN_FILTER,P),this._minFilter=P}},magFilter:{get:function(){return this._magFilter},set:function(P){this.bind();var E=this.gl;if(this.type===E.FLOAT&&c.indexOf(P)>=0&&(E.getExtension("OES_texture_float_linear")||(P=E.NEAREST)),f.indexOf(P)<0)throw new Error("gl-texture2d: Unknown filter mode "+P);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MAG_FILTER,P),this._magFilter=P}},mipSamples:{get:function(){return this._anisoSamples},set:function(P){var E=this._anisoSamples;if(this._anisoSamples=Math.max(P,1)|0,E!==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(P){if(this.bind(),h.indexOf(P)<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,P),this._wrapS=P}},wrapT:{get:function(){return this._wrapT},set:function(P){if(this.bind(),h.indexOf(P)<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,P),this._wrapT=P}},wrap:{get:function(){return this._wrapVector},set:function(P){if(Array.isArray(P)||(P=[P,P]),P.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var E=0;E<2;++E)if(h.indexOf(P[E])<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);this._wrapS=P[0],this._wrapT=P[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),P}},shape:{get:function(){return this._shapeVector},set:function(P){if(!Array.isArray(P))P=[P|0,P|0];else if(P.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return b(this,P[0]|0,P[1]|0),[P[0]|0,P[1]|0]}},width:{get:function(){return this._shape[0]},set:function(P){return P=P|0,b(this,P,this._shape[1]),P}},height:{get:function(){return this._shape[1]},set:function(P){return P=P|0,b(this,this._shape[0],P),P}}}),k.bind=function(P){var E=this.gl;return P!==void 0&&E.activeTexture(E.TEXTURE0+(P|0)),E.bindTexture(E.TEXTURE_2D,this.handle),P!==void 0?P|0:E.getParameter(E.ACTIVE_TEXTURE)-E.TEXTURE0},k.dispose=function(){this.gl.deleteTexture(this.handle)},k.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var P=Math.min(this._shape[0],this._shape[1]),E=0;P>0;++E,P>>>=1)this._mipLevels.indexOf(E)<0&&this._mipLevels.push(E)},k.setPixels=function(P,E,z,q){var V=this.gl;this.bind(),Array.isArray(E)?(q=z,z=E[1]|0,E=E[0]|0):(E=E||0,z=z||0),q=q||0;var G=v(P)?P:P.raw;if(G){var Z=this._mipLevels.indexOf(q)<0;Z?(V.texImage2D(V.TEXTURE_2D,0,this.format,this.format,this.type,G),this._mipLevels.push(q)):V.texSubImage2D(V.TEXTURE_2D,q,E,z,this.format,this.type,G)}else if(P.shape&&P.stride&&P.data){if(P.shape.length<2||E+P.shape[1]>this._shape[1]>>>q||z+P.shape[0]>this._shape[0]>>>q||E<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");T(V,E,z,q,this.format,this.type,this._mipLevels,P)}else throw new Error("gl-texture2d: Unsupported data type")};function M(P,E){return P.length===3?E[2]===1&&E[1]===P[0]*P[2]&&E[0]===P[2]:E[0]===1&&E[1]===P[0]}function T(P,E,z,q,V,G,Z,j){var N=j.dtype,H=j.shape.slice();if(H.length<2||H.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var ie=0,ae=0,_e=M(H,j.stride.slice());N==="float32"?ie=P.FLOAT:N==="float64"?(ie=P.FLOAT,_e=!1,N="float32"):N==="uint8"?ie=P.UNSIGNED_BYTE:(ie=P.UNSIGNED_BYTE,_e=!1,N="uint8");var Ee=1;if(H.length===2)ae=P.LUMINANCE,H=[H[0],H[1],1],j=s(j.data,H,[j.stride[0],j.stride[1],1],j.offset);else if(H.length===3){if(H[2]===1)ae=P.ALPHA;else if(H[2]===2)ae=P.LUMINANCE_ALPHA;else if(H[2]===3)ae=P.RGB;else if(H[2]===4)ae=P.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");Ee=H[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((ae===P.LUMINANCE||ae===P.ALPHA)&&(V===P.LUMINANCE||V===P.ALPHA)&&(ae=V),ae!==V)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var Ce=j.size,ge=Z.indexOf(q)<0;if(ge&&Z.push(q),ie===G&&_e)j.offset===0&&j.data.length===Ce?ge?P.texImage2D(P.TEXTURE_2D,q,V,H[0],H[1],0,V,G,j.data):P.texSubImage2D(P.TEXTURE_2D,q,E,z,H[0],H[1],V,G,j.data):ge?P.texImage2D(P.TEXTURE_2D,q,V,H[0],H[1],0,V,G,j.data.subarray(j.offset,j.offset+Ce)):P.texSubImage2D(P.TEXTURE_2D,q,E,z,H[0],H[1],V,G,j.data.subarray(j.offset,j.offset+Ce));else{var re;G===P.FLOAT?re=u.mallocFloat32(Ce):re=u.mallocUint8(Ce);var Se=s(re,H,[H[2],H[2]*H[0],1]);ie===P.FLOAT&&G===P.UNSIGNED_BYTE?m(Se,j):l.assign(Se,j),ge?P.texImage2D(P.TEXTURE_2D,q,V,H[0],H[1],0,V,G,re.subarray(0,Ce)):P.texSubImage2D(P.TEXTURE_2D,q,E,z,H[0],H[1],V,G,re.subarray(0,Ce)),G===P.FLOAT?u.freeFloat32(re):u.freeUint8(re)}}function L(P){var E=P.createTexture();return P.bindTexture(P.TEXTURE_2D,E),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MIN_FILTER,P.NEAREST),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MAG_FILTER,P.NEAREST),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,P.CLAMP_TO_EDGE),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,P.CLAMP_TO_EDGE),E}function x(P,E,z,q,V){var G=P.getParameter(P.MAX_TEXTURE_SIZE);if(E<0||E>G||z<0||z>G)throw new Error("gl-texture2d: Invalid texture shape");if(V===P.FLOAT&&!P.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var Z=L(P);return P.texImage2D(P.TEXTURE_2D,0,q,E,z,0,q,V,null),new p(P,Z,E,z,q,V)}function C(P,E,z,q,V,G){var Z=L(P);return P.texImage2D(P.TEXTURE_2D,0,V,V,G,E),new p(P,Z,z,q,V,G)}function S(P,E){var z=E.dtype,q=E.shape.slice(),V=P.getParameter(P.MAX_TEXTURE_SIZE);if(q[0]<0||q[0]>V||q[1]<0||q[1]>V)throw new Error("gl-texture2d: Invalid texture size");var G=M(q,E.stride.slice()),Z=0;z==="float32"?Z=P.FLOAT:z==="float64"?(Z=P.FLOAT,G=!1,z="float32"):z==="uint8"?Z=P.UNSIGNED_BYTE:(Z=P.UNSIGNED_BYTE,G=!1,z="uint8");var j=0;if(q.length===2)j=P.LUMINANCE,q=[q[0],q[1],1],E=s(E.data,q,[E.stride[0],E.stride[1],1],E.offset);else if(q.length===3)if(q[2]===1)j=P.ALPHA;else if(q[2]===2)j=P.LUMINANCE_ALPHA;else if(q[2]===3)j=P.RGB;else if(q[2]===4)j=P.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");Z===P.FLOAT&&!P.getExtension("OES_texture_float")&&(Z=P.UNSIGNED_BYTE,G=!1);var N,H,ie=E.size;if(G)E.offset===0&&E.data.length===ie?N=E.data:N=E.data.subarray(E.offset,E.offset+ie);else{var ae=[q[2],q[2]*q[0],1];H=u.malloc(ie,z);var _e=s(H,q,ae,0);(z==="float32"||z==="float64")&&Z===P.UNSIGNED_BYTE?m(_e,E):l.assign(_e,E),N=H.subarray(0,ie)}var Ee=L(P);return P.texImage2D(P.TEXTURE_2D,0,j,q[0],q[1],0,j,Z,N),G||u.free(H),new p(P,Ee,q[0],q[1],j,Z)}function g(P){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||d(P),typeof arguments[1]=="number")return x(P,arguments[1],arguments[2],arguments[3]||P.RGBA,arguments[4]||P.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return x(P,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||P.RGBA,arguments[3]||P.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var E=arguments[1],z=v(E)?E:E.raw;if(z)return C(P,z,E.width|0,E.height|0,arguments[2]||P.RGBA,arguments[3]||P.UNSIGNED_BYTE);if(E.shape&&E.data&&E.stride)return S(P,E)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(i){"use strict";function a(o,s,l){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var u=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(l){if(l.length>u)throw new Error("gl-vao: Too many vertex attributes");for(var c=0;c1?0:Math.acos(m)}},9226:function(i){i.exports=a;function a(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}},3126:function(i){i.exports=a;function a(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}},3990:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}},1091:function(i){i.exports=a;function a(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}},5911:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2];return o[0]=c*v-f*d,o[1]=f*h-u*v,o[2]=u*d-c*h,o}},5455:function(i,a,o){i.exports=o(7056)},7056:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return Math.sqrt(l*l+u*u+c*c)}},4008:function(i,a,o){i.exports=o(6690)},6690:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o}},244:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}},2613:function(i){i.exports=1e-6},9922:function(i,a,o){i.exports=l;var s=o(2613);function l(u,c){var f=u[0],h=u[1],d=u[2],v=c[0],m=c[1],b=c[2];return Math.abs(f-v)<=s*Math.max(1,Math.abs(f),Math.abs(v))&&Math.abs(h-m)<=s*Math.max(1,Math.abs(h),Math.abs(m))&&Math.abs(d-b)<=s*Math.max(1,Math.abs(d),Math.abs(b))}},9265:function(i){i.exports=a;function a(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}},2681:function(i){i.exports=a;function a(o,s){return o[0]=Math.floor(s[0]),o[1]=Math.floor(s[1]),o[2]=Math.floor(s[2]),o}},5137:function(i,a,o){i.exports=l;var s=o(1091)();function l(u,c,f,h,d,v){var m,b;for(c||(c=3),f||(f=0),h?b=Math.min(h*c+f,u.length):b=u.length,m=f;m0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}},7636:function(i){i.exports=a;function a(o,s){s=s||1;var l=Math.random()*2*Math.PI,u=Math.random()*2-1,c=Math.sqrt(1-u*u)*s;return o[0]=Math.cos(l)*c,o[1]=Math.sin(l)*c,o[2]=u*s,o}},6894:function(i){i.exports=a;function a(o,s,l,u){var c=l[1],f=l[2],h=s[1]-c,d=s[2]-f,v=Math.sin(u),m=Math.cos(u);return o[0]=s[0],o[1]=c+h*m-d*v,o[2]=f+h*v+d*m,o}},109:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[2],h=s[0]-c,d=s[2]-f,v=Math.sin(u),m=Math.cos(u);return o[0]=c+d*v+h*m,o[1]=s[1],o[2]=f+d*m-h*v,o}},8692:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[1],h=s[0]-c,d=s[1]-f,v=Math.sin(u),m=Math.cos(u);return o[0]=c+h*m-d*v,o[1]=f+h*v+d*m,o[2]=s[2],o}},2447:function(i){i.exports=a;function a(o,s){return o[0]=Math.round(s[0]),o[1]=Math.round(s[1]),o[2]=Math.round(s[2]),o}},6621:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o}},8489:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o}},1463:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s,o[1]=l,o[2]=u,o}},6141:function(i,a,o){i.exports=o(2953)},5486:function(i,a,o){i.exports=o(3066)},2953:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return l*l+u*u+c*c}},3066:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2];return s*s+l*l+u*u}},2229:function(i,a,o){i.exports=o(6843)},6843:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o}},492:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2];return o[0]=u*l[0]+c*l[3]+f*l[6],o[1]=u*l[1]+c*l[4]+f*l[7],o[2]=u*l[2]+c*l[5]+f*l[8],o}},5673:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[3]*u+l[7]*c+l[11]*f+l[15];return h=h||1,o[0]=(l[0]*u+l[4]*c+l[8]*f+l[12])/h,o[1]=(l[1]*u+l[5]*c+l[9]*f+l[13])/h,o[2]=(l[2]*u+l[6]*c+l[10]*f+l[14])/h,o}},264:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2],m=l[3],b=m*u+d*f-v*c,p=m*c+v*u-h*f,k=m*f+h*c-d*u,M=-h*u-d*c-v*f;return o[0]=b*m+M*-h+p*-v-k*-d,o[1]=p*m+M*-d+k*-h-b*-v,o[2]=k*m+M*-v+b*-d-p*-h,o}},4361:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o[3]=s[3]+l[3],o}},2335:function(i){i.exports=a;function a(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}},2933:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}},7536:function(i){i.exports=a;function a(){var o=new Float32Array(4);return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o}},4691:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return Math.sqrt(l*l+u*u+c*c+f*f)}},1373:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o[3]=s[3]/l[3],o}},3750:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]*s[3]}},3390:function(i){i.exports=a;function a(o,s,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}},9970:function(i,a,o){i.exports={create:o(7536),clone:o(2335),fromValues:o(3390),copy:o(2933),set:o(4578),add:o(4361),subtract:o(6860),multiply:o(3576),divide:o(1373),min:o(2334),max:o(160),scale:o(9288),scaleAndAdd:o(4844),distance:o(4691),squaredDistance:o(7960),length:o(6808),squaredLength:o(483),negate:o(1498),inverse:o(4494),normalize:o(5177),dot:o(3750),lerp:o(2573),random:o(9131),transformMat4:o(5352),transformQuat:o(4041)}},4494:function(i){i.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}},6808:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return Math.sqrt(s*s+l*l+u*u+c*c)}},2573:function(i){i.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2],d=s[3];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=h+u*(l[2]-h),o[3]=d+u*(l[3]-d),o}},160:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o[3]=Math.max(s[3],l[3]),o}},2334:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o[3]=Math.min(s[3],l[3]),o}},3576:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o[3]=s[3]*l[3],o}},1498:function(i){i.exports=a;function a(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o[3]=-s[3],o}},5177:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=l*l+u*u+c*c+f*f;return h>0&&(h=1/Math.sqrt(h),o[0]=l*h,o[1]=u*h,o[2]=c*h,o[3]=f*h),o}},9131:function(i,a,o){var s=o(5177),l=o(9288);i.exports=u;function u(c,f){return f=f||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),s(c,c),l(c,c,f),c}},9288:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o}},4844:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o[3]=s[3]+l[3]*u,o}},4578:function(i){i.exports=a;function a(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}},7960:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return l*l+u*u+c*c+f*f}},483:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return s*s+l*l+u*u+c*c}},6860:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o[3]=s[3]-l[3],o}},5352:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3];return o[0]=l[0]*u+l[4]*c+l[8]*f+l[12]*h,o[1]=l[1]*u+l[5]*c+l[9]*f+l[13]*h,o[2]=l[2]*u+l[6]*c+l[10]*f+l[14]*h,o[3]=l[3]*u+l[7]*c+l[11]*f+l[15]*h,o}},4041:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2],m=l[3],b=m*u+d*f-v*c,p=m*c+v*u-h*f,k=m*f+h*c-d*u,M=-h*u-d*c-v*f;return o[0]=b*m+M*-h+p*-v-k*-d,o[1]=p*m+M*-d+k*-h-b*-v,o[2]=k*m+M*-v+b*-d-p*-h,o[3]=s[3],o}},1848:function(i,a,o){var s=o(4905),l=o(6468);i.exports=u;function u(c){for(var f=Array.isArray(c)?c:s(c),h=0;h0)continue;Tt=Ae.slice(0,1).join("")}return Pe(Tt),Ce+=Tt.length,N=N.slice(Tt.length),N.length}while(!0)}function rr(){return/[^a-fA-F0-9]/.test(Z)?(Pe(N.join("")),G=h,q):(N.push(Z),j=Z,q+1)}function tt(){return Z==="."||/[eE]/.test(Z)?(N.push(Z),G=M,j=Z,q+1):Z==="x"&&N.length===1&&N[0]==="0"?(G=g,N.push(Z),j=Z,q+1):/[^\d]/.test(Z)?(Pe(N.join("")),G=h,q):(N.push(Z),j=Z,q+1)}function je(){return Z==="f"&&(N.push(Z),j=Z,q+=1),/[eE]/.test(Z)||(Z==="-"||Z==="+")&&/[eE]/.test(j)?(N.push(Z),j=Z,q+1):/[^\d]/.test(Z)?(Pe(N.join("")),G=h,q):(N.push(Z),j=Z,q+1)}function Ue(){if(/[^\d\w_]/.test(Z)){var Ae=N.join("");return me[Ae]?G=x:Le[Ae]?G=L:G=T,Pe(N.join("")),G=h,q}return N.push(Z),j=Z,q+1}}},3508:function(i,a,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\_|texture)/.test(l)}),i.exports=s.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"])},6852:function(i){i.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"]},7932:function(i,a,o){var s=o(620);i.exports=s.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"])},620:function(i){i.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"]},7827:function(i){i.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(i,a,o){var s=o(5874);i.exports=l;function l(u,c){var f=s(c),h=[];return h=h.concat(f(u)),h=h.concat(f(null)),h}},3236:function(i){i.exports=function(a){typeof a=="string"&&(a=[a]);for(var o=[].slice.call(arguments,1),s=[],l=0;l>1,b=-7,p=l?c-1:0,k=l?-1:1,M=o[s+p];for(p+=k,f=M&(1<<-b)-1,M>>=-b,b+=d;b>0;f=f*256+o[s+p],p+=k,b-=8);for(h=f&(1<<-b)-1,f>>=-b,b+=u;b>0;h=h*256+o[s+p],p+=k,b-=8);if(f===0)f=1-m;else{if(f===v)return h?NaN:(M?-1:1)*(1/0);h=h+Math.pow(2,u),f=f-m}return(M?-1:1)*h*Math.pow(2,f-u)},a.write=function(o,s,l,u,c,f){var h,d,v,m=f*8-c-1,b=(1<>1,k=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=u?0:f-1,T=u?1:-1,L=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(d=isNaN(s)?1:0,h=b):(h=Math.floor(Math.log(s)/Math.LN2),s*(v=Math.pow(2,-h))<1&&(h--,v*=2),h+p>=1?s+=k/v:s+=k*Math.pow(2,1-p),s*v>=2&&(h++,v/=2),h+p>=b?(d=0,h=b):h+p>=1?(d=(s*v-1)*Math.pow(2,c),h=h+p):(d=s*Math.pow(2,p-1)*Math.pow(2,c),h=0));c>=8;o[l+M]=d&255,M+=T,d/=256,c-=8);for(h=h<0;o[l+M]=h&255,M+=T,h/=256,m-=8);o[l+M-T]|=L*128}},8954:function(i,a,o){"use strict";i.exports=p;var s=o(3250),l=o(6803).Fw;function u(k,M,T){this.vertices=k,this.adjacent=M,this.boundary=T,this.lastVisited=-1}u.prototype.flip=function(){var k=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=k;var M=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=M};function c(k,M,T){this.vertices=k,this.cell=M,this.index=T}function f(k,M){return l(k.vertices,M.vertices)}function h(k){return function(){var M=this.tuple;return k.apply(this,M)}}function d(k){var M=s[k+1];return M||(M=s),h(M)}var v=[];function m(k,M,T){this.dimension=k,this.vertices=M,this.simplices=T,this.interior=T.filter(function(C){return!C.boundary}),this.tuple=new Array(k+1);for(var L=0;L<=k;++L)this.tuple[L]=this.vertices[L];var x=v[k];x||(x=v[k]=d(k)),this.orient=x}var b=m.prototype;b.handleBoundaryDegeneracy=function(k,M){var T=this.dimension,L=this.vertices.length-1,x=this.tuple,C=this.vertices,S=[k];for(k.lastVisited=-L;S.length>0;){k=S.pop();for(var g=k.adjacent,P=0;P<=T;++P){var E=g[P];if(!(!E.boundary||E.lastVisited<=-L)){for(var z=E.vertices,q=0;q<=T;++q){var V=z[q];V<0?x[q]=M:x[q]=C[V]}var G=this.orient();if(G>0)return E;E.lastVisited=-L,G===0&&S.push(E)}}}return null},b.walk=function(k,M){var T=this.vertices.length-1,L=this.dimension,x=this.vertices,C=this.tuple,S=M?this.interior.length*Math.random()|0:this.interior.length-1,g=this.interior[S];e:for(;!g.boundary;){for(var P=g.vertices,E=g.adjacent,z=0;z<=L;++z)C[z]=x[P[z]];g.lastVisited=T;for(var z=0;z<=L;++z){var q=E[z];if(!(q.lastVisited>=T)){var V=C[z];C[z]=k;var G=this.orient();if(C[z]=V,G<0){g=q;continue e}else q.boundary?q.lastVisited=-T:q.lastVisited=T}}return}return g},b.addPeaks=function(k,M){var T=this.vertices.length-1,L=this.dimension,x=this.vertices,C=this.tuple,S=this.interior,g=this.simplices,P=[M];M.lastVisited=T,M.vertices[M.vertices.indexOf(-1)]=T,M.boundary=!1,S.push(M);for(var E=[];P.length>0;){var M=P.pop(),z=M.vertices,q=M.adjacent,V=z.indexOf(T);if(!(V<0)){for(var G=0;G<=L;++G)if(G!==V){var Z=q[G];if(!(!Z.boundary||Z.lastVisited>=T)){var j=Z.vertices;if(Z.lastVisited!==-T){for(var N=0,H=0;H<=L;++H)j[H]<0?(N=H,C[H]=k):C[H]=x[j[H]];var ie=this.orient();if(ie>0){j[N]=T,Z.boundary=!1,S.push(Z),P.push(Z),Z.lastVisited=T;continue}else Z.lastVisited=-T}var ae=Z.adjacent,_e=z.slice(),Ee=q.slice(),Ce=new u(_e,Ee,!0);g.push(Ce);var ge=ae.indexOf(M);if(!(ge<0)){ae[ge]=Ce,Ee[V]=Z,_e[G]=-1,Ee[G]=M,q[G]=Ce,Ce.flip();for(var H=0;H<=L;++H){var re=_e[H];if(!(re<0||re===T)){for(var Se=new Array(L-1),ke=0,be=0;be<=L;++be){var Be=_e[be];Be<0||be===H||(Se[ke++]=Be)}E.push(new c(Se,Ce,H))}}}}}}}E.sort(f);for(var G=0;G+1=0?S[P++]=g[z]:E=z&1;if(E===(k&1)){var q=S[0];S[0]=S[1],S[1]=q}M.push(S)}}return M};function p(k,M){var T=k.length;if(T===0)throw new Error("Must have at least d+1 points");var L=k[0].length;if(T<=L)throw new Error("Must input at least d+1 points");var x=k.slice(0,L+1),C=s.apply(void 0,x);if(C===0)throw new Error("Input not in general position");for(var S=new Array(L+1),g=0;g<=L;++g)S[g]=g;C<0&&(S[0]=1,S[1]=0);for(var P=new u(S,new Array(L+1),!1),E=P.adjacent,z=new Array(L+2),g=0;g<=L;++g){for(var q=S.slice(),V=0;V<=L;++V)V===g&&(q[V]=-1);var G=q[0];q[0]=q[1],q[1]=G;var Z=new u(q,new Array(L+1),!0);E[g]=Z,z[g]=Z}z[L+1]=P;for(var g=0;g<=L;++g)for(var q=E[g].vertices,j=E[g].adjacent,V=0;V<=L;++V){var N=q[V];if(N<0){j[V]=P;continue}for(var H=0;H<=L;++H)E[H].vertices.indexOf(N)<0&&(j[V]=E[H])}for(var ie=new m(L,x,z),ae=!!M,g=L+1;g3*(z+1)?m(this,E):this.left.insert(E):this.left=C([E]);else if(E[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?m(this,E):this.right.insert(E):this.right=C([E]);else{var q=s.ge(this.leftPoints,E,L),V=s.ge(this.rightPoints,E,x);this.leftPoints.splice(q,0,E),this.rightPoints.splice(V,0,E)}},h.remove=function(E){var z=this.count-this.leftPoints;if(E[1]3*(z-1))return b(this,E);var V=this.left.remove(E);return V===c?(this.left=null,this.count-=1,u):(V===u&&(this.count-=1),V)}else if(E[0]>this.mid){if(!this.right)return l;var G=this.left?this.left.count:0;if(4*G>3*(z-1))return b(this,E);var V=this.right.remove(E);return V===c?(this.right=null,this.count-=1,u):(V===u&&(this.count-=1),V)}else{if(this.count===1)return this.leftPoints[0]===E?c:l;if(this.leftPoints.length===1&&this.leftPoints[0]===E){if(this.left&&this.right){for(var Z=this,j=this.left;j.right;)Z=j,j=j.right;if(Z===this)j.right=this.right;else{var N=this.left,V=this.right;Z.count-=j.count,Z.right=j.left,j.left=N,j.right=V}d(this,j),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?d(this,this.left):d(this,this.right);return u}for(var N=s.ge(this.leftPoints,E,L);N=0&&E[V][1]>=z;--V){var G=q(E[V]);if(G)return G}}function M(E,z){for(var q=0;qthis.mid){if(this.right){var q=this.right.queryPoint(E,z);if(q)return q}return k(this.rightPoints,E,z)}else return M(this.leftPoints,z)},h.queryInterval=function(E,z,q){if(Ethis.mid&&this.right){var V=this.right.queryInterval(E,z,q);if(V)return V}return zthis.mid?k(this.rightPoints,E,q):M(this.leftPoints,q)};function T(E,z){return E-z}function L(E,z){var q=E[0]-z[0];return q||E[1]-z[1]}function x(E,z){var q=E[1]-z[1];return q||E[0]-z[0]}function C(E){if(E.length===0)return null;for(var z=[],q=0;q>1],G=[],Z=[],j=[],q=0;q13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}},395:function(i){function a(o,s,l){return o*(1-l)+s*l}i.exports=a},2652:function(i,a,o){var s=o(4335),l=o(6864),u=o(1903),c=o(9921),f=o(7608),h=o(5665),d={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},v=l(),m=l(),b=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],k=[0,0,0];i.exports=function(C,S,g,P,E,z){if(S||(S=[0,0,0]),g||(g=[0,0,0]),P||(P=[0,0,0]),E||(E=[0,0,0,1]),z||(z=[0,0,0,1]),!s(v,C)||(u(m,v),m[3]=0,m[7]=0,m[11]=0,m[15]=1,Math.abs(c(m)<1e-8)))return!1;var q=v[3],V=v[7],G=v[11],Z=v[12],j=v[13],N=v[14],H=v[15];if(q!==0||V!==0||G!==0){b[0]=q,b[1]=V,b[2]=G,b[3]=H;var ie=f(m,m);if(!ie)return!1;h(m,m),M(E,b,m)}else E[0]=E[1]=E[2]=0,E[3]=1;if(S[0]=Z,S[1]=j,S[2]=N,T(p,v),g[0]=d.length(p[0]),d.normalize(p[0],p[0]),P[0]=d.dot(p[0],p[1]),L(p[1],p[1],p[0],1,-P[0]),g[1]=d.length(p[1]),d.normalize(p[1],p[1]),P[0]/=g[1],P[1]=d.dot(p[0],p[2]),L(p[2],p[2],p[0],1,-P[1]),P[2]=d.dot(p[1],p[2]),L(p[2],p[2],p[1],1,-P[2]),g[2]=d.length(p[2]),d.normalize(p[2],p[2]),P[1]/=g[2],P[2]/=g[2],d.cross(k,p[1],p[2]),d.dot(p[0],k)<0)for(var ae=0;ae<3;ae++)g[ae]*=-1,p[ae][0]*=-1,p[ae][1]*=-1,p[ae][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(z[0]=-z[0]),p[0][2]>p[2][0]&&(z[1]=-z[1]),p[1][0]>p[0][1]&&(z[2]=-z[2]),!0};function M(x,C,S){var g=C[0],P=C[1],E=C[2],z=C[3];return x[0]=S[0]*g+S[4]*P+S[8]*E+S[12]*z,x[1]=S[1]*g+S[5]*P+S[9]*E+S[13]*z,x[2]=S[2]*g+S[6]*P+S[10]*E+S[14]*z,x[3]=S[3]*g+S[7]*P+S[11]*E+S[15]*z,x}function T(x,C){x[0][0]=C[0],x[0][1]=C[1],x[0][2]=C[2],x[1][0]=C[4],x[1][1]=C[5],x[1][2]=C[6],x[2][0]=C[8],x[2][1]=C[9],x[2][2]=C[10]}function L(x,C,S,g,P){x[0]=C[0]*g+S[0]*P,x[1]=C[1]*g+S[1]*P,x[2]=C[2]*g+S[2]*P}},4335:function(i){i.exports=function(o,s){var l=s[15];if(l===0)return!1;for(var u=1/l,c=0;c<16;c++)o[c]=s[c]*u;return!0}},7442:function(i,a,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),h=b(),d=b(),v=b();i.exports=m;function m(M,T,L,x){if(c(T)===0||c(L)===0)return!1;var C=u(T,h.translate,h.scale,h.skew,h.perspective,h.quaternion),S=u(L,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!C||!S?!1:(s(v.translate,h.translate,d.translate,x),s(v.skew,h.skew,d.skew,x),s(v.scale,h.scale,d.scale,x),s(v.perspective,h.perspective,d.perspective,x),f(v.quaternion,h.quaternion,d.quaternion,x),l(M,v.translate,v.scale,v.skew,v.perspective,v.quaternion),!0)}function b(){return{translate:p(),scale:p(1),skew:p(),perspective:k(),quaternion:k()}}function p(M){return[M||0,M||0,M||0]}function k(){return[0,0,0,1]}},7182:function(i,a,o){var s={identity:o(7894),translate:o(7656),multiply:o(6760),create:o(6864),scale:o(2504),fromRotationTranslation:o(6743)},l=s.create(),u=s.create();i.exports=function(f,h,d,v,m,b){return s.identity(f),s.fromRotationTranslation(f,b,h),f[3]=m[0],f[7]=m[1],f[11]=m[2],f[15]=m[3],s.identity(u),v[2]!==0&&(u[9]=v[2],s.multiply(f,f,u)),v[1]!==0&&(u[9]=0,u[8]=v[1],s.multiply(f,f,u)),v[0]!==0&&(u[8]=0,u[4]=v[0],s.multiply(f,f,u)),s.scale(f,f,d),f}},1811:function(i,a,o){"use strict";var s=o(2478),l=o(7442),u=o(7608),c=o(5567),f=o(2408),h=o(7089),d=o(6582),v=o(7656),m=o(2504),b=o(3536),p=[0,0,0];i.exports=L;function k(x){this._components=x.slice(),this._time=[0],this.prevMatrix=x.slice(),this.nextMatrix=x.slice(),this.computedMatrix=x.slice(),this.computedInverse=x.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 M=k.prototype;M.recalcMatrix=function(x){var C=this._time,S=s.le(C,x),g=this.computedMatrix;if(!(S<0)){var P=this._components;if(S===C.length-1)for(var E=16*S,z=0;z<16;++z)g[z]=P[E++];else{for(var q=C[S+1]-C[S],E=16*S,V=this.prevMatrix,G=!0,z=0;z<16;++z)V[z]=P[E++];for(var Z=this.nextMatrix,z=0;z<16;++z)Z[z]=P[E++],G=G&&V[z]===Z[z];if(q<1e-6||G)for(var z=0;z<16;++z)g[z]=V[z];else l(g,V,Z,(x-C[S])/q)}var j=this.computedUp;j[0]=g[1],j[1]=g[5],j[2]=g[9],b(j,j);var N=this.computedInverse;u(N,g);var H=this.computedEye,ie=N[15];H[0]=N[12]/ie,H[1]=N[13]/ie,H[2]=N[14]/ie;for(var ae=this.computedCenter,_e=Math.exp(this.computedRadius[0]),z=0;z<3;++z)ae[z]=H[z]-g[2+4*z]*_e}},M.idle=function(x){if(!(x1&&s(u[d[p-2]],u[d[p-1]],b)<=0;)p-=1,d.pop();for(d.push(m),p=v.length;p>1&&s(u[v[p-2]],u[v[p-1]],b)>=0;)p-=1,v.pop();v.push(m)}for(var k=new Array(v.length+d.length-2),M=0,f=0,T=d.length;f0;--L)k[M++]=v[L];return k}},351:function(i,a,o){"use strict";i.exports=l;var s=o(4687);function l(u,c){c||(c=u,u=window);var f=0,h=0,d=0,v={shift:!1,alt:!1,control:!1,meta:!1},m=!1;function b(E){var z=!1;return"altKey"in E&&(z=z||E.altKey!==v.alt,v.alt=!!E.altKey),"shiftKey"in E&&(z=z||E.shiftKey!==v.shift,v.shift=!!E.shiftKey),"ctrlKey"in E&&(z=z||E.ctrlKey!==v.control,v.control=!!E.ctrlKey),"metaKey"in E&&(z=z||E.metaKey!==v.meta,v.meta=!!E.metaKey),z}function p(E,z){var q=s.x(z),V=s.y(z);"buttons"in z&&(E=z.buttons|0),(E!==f||q!==h||V!==d||b(z))&&(f=E|0,h=q||0,d=V||0,c&&c(f,h,d,v))}function k(E){p(0,E)}function M(){(f||h||d||v.shift||v.alt||v.meta||v.control)&&(h=d=0,f=0,v.shift=v.alt=v.control=v.meta=!1,c&&c(0,0,0,v))}function T(E){b(E)&&c&&c(f,h,d,v)}function L(E){s.buttons(E)===0?p(0,E):p(f,E)}function x(E){p(f|s.buttons(E),E)}function C(E){p(f&~s.buttons(E),E)}function S(){m||(m=!0,u.addEventListener("mousemove",L),u.addEventListener("mousedown",x),u.addEventListener("mouseup",C),u.addEventListener("mouseleave",k),u.addEventListener("mouseenter",k),u.addEventListener("mouseout",k),u.addEventListener("mouseover",k),u.addEventListener("blur",M),u.addEventListener("keyup",T),u.addEventListener("keydown",T),u.addEventListener("keypress",T),u!==window&&(window.addEventListener("blur",M),window.addEventListener("keyup",T),window.addEventListener("keydown",T),window.addEventListener("keypress",T)))}function g(){m&&(m=!1,u.removeEventListener("mousemove",L),u.removeEventListener("mousedown",x),u.removeEventListener("mouseup",C),u.removeEventListener("mouseleave",k),u.removeEventListener("mouseenter",k),u.removeEventListener("mouseout",k),u.removeEventListener("mouseover",k),u.removeEventListener("blur",M),u.removeEventListener("keyup",T),u.removeEventListener("keydown",T),u.removeEventListener("keypress",T),u!==window&&(window.removeEventListener("blur",M),window.removeEventListener("keyup",T),window.removeEventListener("keydown",T),window.removeEventListener("keypress",T)))}S();var P={element:u};return Object.defineProperties(P,{enabled:{get:function(){return m},set:function(E){E?S():g()},enumerable:!0},buttons:{get:function(){return f},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return d},enumerable:!0},mods:{get:function(){return v},enumerable:!0}}),P}},24:function(i){var a={left:0,top:0};i.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,h=l.clientY||0,d=s(u);return c[0]=f-d.left,c[1]=h-d.top,c}function s(l){return l===window||l===document||l===document.body?a:l.getBoundingClientRect()}},4687:function(i,a){"use strict";function o(c){if(typeof c=="object"){if("buttons"in c)return c.buttons;if("which"in c){var f=c.which;if(f===2)return 4;if(f===3)return 2;if(f>0)return 1<=0)return 1<0){if(Ee=1,re[ke++]=v(S[z],M,T,L),z+=ie,x>0)for(_e=1,q=S[z],be=re[ke]=v(q,M,T,L),me=re[ke+Be],He=re[ke+Pe],Ht=re[ke+lt],(be!==me||be!==He||be!==Ht)&&(G=S[z+V],j=S[z+Z],H=S[z+N],h(_e,Ee,q,G,j,H,be,me,He,Ht,M,T,L),at=Se[ke]=Ce++),ke+=1,z+=ie,_e=2;_e0)for(_e=1,q=S[z],be=re[ke]=v(q,M,T,L),me=re[ke+Be],He=re[ke+Pe],Ht=re[ke+lt],(be!==me||be!==He||be!==Ht)&&(G=S[z+V],j=S[z+Z],H=S[z+N],h(_e,Ee,q,G,j,H,be,me,He,Ht,M,T,L),at=Se[ke]=Ce++,Ht!==He&&d(Se[ke+Pe],at,j,H,He,Ht,M,T,L)),ke+=1,z+=ie,_e=2;_e0){if(_e=1,re[ke++]=v(S[z],M,T,L),z+=ie,C>0)for(Ee=1,q=S[z],be=re[ke]=v(q,M,T,L),He=re[ke+Pe],me=re[ke+Be],Ht=re[ke+lt],(be!==He||be!==me||be!==Ht)&&(G=S[z+V],j=S[z+Z],H=S[z+N],h(_e,Ee,q,G,j,H,be,He,me,Ht,M,T,L),at=Se[ke]=Ce++),ke+=1,z+=ie,Ee=2;Ee0)for(Ee=1,q=S[z],be=re[ke]=v(q,M,T,L),He=re[ke+Pe],me=re[ke+Be],Ht=re[ke+lt],(be!==He||be!==me||be!==Ht)&&(G=S[z+V],j=S[z+Z],H=S[z+N],h(_e,Ee,q,G,j,H,be,He,me,Ht,M,T,L),at=Se[ke]=Ce++,Ht!==He&&d(Se[ke+Pe],at,H,G,Ht,He,M,T,L)),ke+=1,z+=ie,Ee=2;Ee 0"),typeof f.vertex!="function"&&h("Must specify vertex creation function"),typeof f.cell!="function"&&h("Must specify cell creation function"),typeof f.phase!="function"&&h("Must specify phase function");for(var b=f.getters||[],p=new Array(v),k=0;k=0?p[k]=!0:p[k]=!1;return u(f.vertex,f.cell,f.phase,m,d,p)}},6199:function(i,a,o){"use strict";var s=o(1338),l={zero:function(L,x,C,S){var g=L[0],P=C[0];S|=0;var E=0,z=P;for(E=0;E2&&E[1]>2&&S(P.pick(-1,-1).lo(1,1).hi(E[0]-2,E[1]-2),g.pick(-1,-1,0).lo(1,1).hi(E[0]-2,E[1]-2),g.pick(-1,-1,1).lo(1,1).hi(E[0]-2,E[1]-2)),E[1]>2&&(C(P.pick(0,-1).lo(1).hi(E[1]-2),g.pick(0,-1,1).lo(1).hi(E[1]-2)),x(g.pick(0,-1,0).lo(1).hi(E[1]-2))),E[1]>2&&(C(P.pick(E[0]-1,-1).lo(1).hi(E[1]-2),g.pick(E[0]-1,-1,1).lo(1).hi(E[1]-2)),x(g.pick(E[0]-1,-1,0).lo(1).hi(E[1]-2))),E[0]>2&&(C(P.pick(-1,0).lo(1).hi(E[0]-2),g.pick(-1,0,0).lo(1).hi(E[0]-2)),x(g.pick(-1,0,1).lo(1).hi(E[0]-2))),E[0]>2&&(C(P.pick(-1,E[1]-1).lo(1).hi(E[0]-2),g.pick(-1,E[1]-1,0).lo(1).hi(E[0]-2)),x(g.pick(-1,E[1]-1,1).lo(1).hi(E[0]-2))),g.set(0,0,0,0),g.set(0,0,1,0),g.set(E[0]-1,0,0,0),g.set(E[0]-1,0,1,0),g.set(0,E[1]-1,0,0),g.set(0,E[1]-1,1,0),g.set(E[0]-1,E[1]-1,0,0),g.set(E[0]-1,E[1]-1,1,0),g}}function T(L){var x=L.join(),E=v[x];if(E)return E;for(var C=L.length,S=[b,p],g=1;g<=C;++g)S.push(k(g));var P=M,E=P.apply(void 0,S);return v[x]=E,E}i.exports=function(x,C,S){if(Array.isArray(S)||(typeof S=="string"?S=s(C.dimension,S):S=s(C.dimension,"clamp")),C.size===0)return x;if(C.dimension===0)return x.set(0),x;var g=T(S);return g(x,C)}},4317:function(i){"use strict";function a(c,f){var h=Math.floor(f),d=f-h,v=0<=h&&h0;){j<64?(x=j,j=0):(x=64,j-=64);for(var N=v[1]|0;N>0;){N<64?(C=N,N=0):(C=64,N-=64),p=G+j*g+N*P,T=Z+j*z+N*q;var H=0,ie=0,ae=0,_e=E,Ee=g-S*E,Ce=P-x*g,ge=V,re=z-S*V,Se=q-x*z;for(ae=0;ae0;){q<64?(x=q,q=0):(x=64,q-=64);for(var V=v[0]|0;V>0;){V<64?(L=V,V=0):(L=64,V-=64),p=E+q*S+V*C,T=z+q*P+V*g;var G=0,Z=0,j=S,N=C-x*S,H=P,ie=g-x*P;for(Z=0;Z0;){Z<64?(C=Z,Z=0):(C=64,Z-=64);for(var j=v[0]|0;j>0;){j<64?(L=j,j=0):(L=64,j-=64);for(var N=v[1]|0;N>0;){N<64?(x=N,N=0):(x=64,N-=64),p=V+Z*P+j*S+N*g,T=G+Z*q+j*E+N*z;var H=0,ie=0,ae=0,_e=P,Ee=S-C*P,Ce=g-L*S,ge=q,re=E-C*q,Se=z-L*E;for(ae=0;aek;){H=0,ie=G-x;t:for(j=0;j_e)break t;ie+=E,H+=z}for(H=G,ie=G-x,j=0;j>1,N=j-V,H=j+V,ie=G,ae=N,_e=j,Ee=H,Ce=Z,ge=M+1,re=T-1,Se=!0,ke,be,Be,Le,me,Pe,ce,He,lt,mt=0,Ht=0,at=0,ct,ar,Vt,rr,tt,je,Ue,Ae,rt,St,Tt,dt,Et,pt,jt,or,mr=P,Ar=b(mr),ei=b(mr);ar=C*ie,Vt=C*ae,or=x;e:for(ct=0;ct0){be=ie,ie=ae,ae=be;break e}if(at<0)break e;or+=z}ar=C*Ee,Vt=C*Ce,or=x;e:for(ct=0;ct0){be=Ee,Ee=Ce,Ce=be;break e}if(at<0)break e;or+=z}ar=C*ie,Vt=C*_e,or=x;e:for(ct=0;ct0){be=ie,ie=_e,_e=be;break e}if(at<0)break e;or+=z}ar=C*ae,Vt=C*_e,or=x;e:for(ct=0;ct0){be=ae,ae=_e,_e=be;break e}if(at<0)break e;or+=z}ar=C*ie,Vt=C*Ee,or=x;e:for(ct=0;ct0){be=ie,ie=Ee,Ee=be;break e}if(at<0)break e;or+=z}ar=C*_e,Vt=C*Ee,or=x;e:for(ct=0;ct0){be=_e,_e=Ee,Ee=be;break e}if(at<0)break e;or+=z}ar=C*ae,Vt=C*Ce,or=x;e:for(ct=0;ct0){be=ae,ae=Ce,Ce=be;break e}if(at<0)break e;or+=z}ar=C*ae,Vt=C*_e,or=x;e:for(ct=0;ct0){be=ae,ae=_e,_e=be;break e}if(at<0)break e;or+=z}ar=C*Ee,Vt=C*Ce,or=x;e:for(ct=0;ct0){be=Ee,Ee=Ce,Ce=be;break e}if(at<0)break e;or+=z}for(ar=C*ie,Vt=C*ae,rr=C*_e,tt=C*Ee,je=C*Ce,Ue=C*G,Ae=C*j,rt=C*Z,jt=0,or=x,ct=0;ct0)re--;else if(at<0){for(ar=C*Pe,Vt=C*ge,rr=C*re,or=x,ct=0;ct0)for(;;){ce=x+re*C,jt=0;e:for(ct=0;ct0){if(--reZ){e:for(;;){for(ce=x+ge*C,jt=0,or=x,ct=0;ct1&&k?T(p,k[0],k[1]):T(p)}var d={"uint32,1,0":function(m,b){return function(p){var k=p.data,M=p.offset|0,T=p.shape,L=p.stride,x=L[0]|0,C=T[0]|0,S=L[1]|0,g=T[1]|0,P=S,E=S,z=1;C<=32?m(0,C-1,k,M,x,S,C,g,P,E,z):b(0,C-1,k,M,x,S,C,g,P,E,z)}}};function v(m,b){var p=[b,m].join(","),k=d[p],M=c(m,b),T=h(m,b,M);return k(M,T)}i.exports=v},446:function(i,a,o){"use strict";var s=o(7640),l={};function u(c){var f=c.order,h=c.dtype,d=[f,h],v=d.join(":"),m=l[v];return m||(l[v]=m=s(f,h)),m(c),c}i.exports=u},9618:function(i,a,o){var s=o(7163),l=typeof Float64Array!="undefined";function u(b,p){return b[0]-p[0]}function c(){var b=this.stride,p=new Array(b.length),k;for(k=0;k=0&&(S=x|0,C+=P*S,g-=S),new M(this.data,g,P,C)},T.step=function(x){var C=this.shape[0],S=this.stride[0],g=this.offset,P=0,E=Math.ceil;return typeof x=="number"&&(P=x|0,P<0?(g+=S*(C-1),C=E(-C/P)):C=E(C/P),S*=P),new M(this.data,C,S,g)},T.transpose=function(x){x=x===void 0?0:x|0;var C=this.shape,S=this.stride;return new M(this.data,C[x],S[x],this.offset)},T.pick=function(x){var C=[],S=[],g=this.offset;typeof x=="number"&&x>=0?g=g+this.stride[0]*x|0:(C.push(this.shape[0]),S.push(this.stride[0]));var P=p[C.length+1];return P(this.data,C,S,g)},function(x,C,S,g){return new M(x,C[0],S[0],g)}},2:function(b,p,k){function M(L,x,C,S,g,P){this.data=L,this.shape=[x,C],this.stride=[S,g],this.offset=P|0}var T=M.prototype;return T.dtype=b,T.dimension=2,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(T,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),T.set=function(x,C,S){return b==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C,S):this.data[this.offset+this.stride[0]*x+this.stride[1]*C]=S},T.get=function(x,C){return b==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C):this.data[this.offset+this.stride[0]*x+this.stride[1]*C]},T.index=function(x,C){return this.offset+this.stride[0]*x+this.stride[1]*C},T.hi=function(x,C){return new M(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof C!="number"||C<0?this.shape[1]:C|0,this.stride[0],this.stride[1],this.offset)},T.lo=function(x,C){var S=this.offset,g=0,P=this.shape[0],E=this.shape[1],z=this.stride[0],q=this.stride[1];return typeof x=="number"&&x>=0&&(g=x|0,S+=z*g,P-=g),typeof C=="number"&&C>=0&&(g=C|0,S+=q*g,E-=g),new M(this.data,P,E,z,q,S)},T.step=function(x,C){var S=this.shape[0],g=this.shape[1],P=this.stride[0],E=this.stride[1],z=this.offset,q=0,V=Math.ceil;return typeof x=="number"&&(q=x|0,q<0?(z+=P*(S-1),S=V(-S/q)):S=V(S/q),P*=q),typeof C=="number"&&(q=C|0,q<0?(z+=E*(g-1),g=V(-g/q)):g=V(g/q),E*=q),new M(this.data,S,g,P,E,z)},T.transpose=function(x,C){x=x===void 0?0:x|0,C=C===void 0?1:C|0;var S=this.shape,g=this.stride;return new M(this.data,S[x],S[C],g[x],g[C],this.offset)},T.pick=function(x,C){var S=[],g=[],P=this.offset;typeof x=="number"&&x>=0?P=P+this.stride[0]*x|0:(S.push(this.shape[0]),g.push(this.stride[0])),typeof C=="number"&&C>=0?P=P+this.stride[1]*C|0:(S.push(this.shape[1]),g.push(this.stride[1]));var E=p[S.length+1];return E(this.data,S,g,P)},function(x,C,S,g){return new M(x,C[0],C[1],S[0],S[1],g)}},3:function(b,p,k){function M(L,x,C,S,g,P,E,z){this.data=L,this.shape=[x,C,S],this.stride=[g,P,E],this.offset=z|0}var T=M.prototype;return T.dtype=b,T.dimension=3,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(T,"order",{get:function(){var x=Math.abs(this.stride[0]),C=Math.abs(this.stride[1]),S=Math.abs(this.stride[2]);return x>C?C>S?[2,1,0]:x>S?[1,2,0]:[1,0,2]:x>S?[2,0,1]:S>C?[0,1,2]:[0,2,1]}}),T.set=function(x,C,S,g){return b==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S,g):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S]=g},T.get=function(x,C,S){return b==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S]},T.index=function(x,C,S){return this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S},T.hi=function(x,C,S){return new M(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof S!="number"||S<0?this.shape[2]:S|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},T.lo=function(x,C,S){var g=this.offset,P=0,E=this.shape[0],z=this.shape[1],q=this.shape[2],V=this.stride[0],G=this.stride[1],Z=this.stride[2];return typeof x=="number"&&x>=0&&(P=x|0,g+=V*P,E-=P),typeof C=="number"&&C>=0&&(P=C|0,g+=G*P,z-=P),typeof S=="number"&&S>=0&&(P=S|0,g+=Z*P,q-=P),new M(this.data,E,z,q,V,G,Z,g)},T.step=function(x,C,S){var g=this.shape[0],P=this.shape[1],E=this.shape[2],z=this.stride[0],q=this.stride[1],V=this.stride[2],G=this.offset,Z=0,j=Math.ceil;return typeof x=="number"&&(Z=x|0,Z<0?(G+=z*(g-1),g=j(-g/Z)):g=j(g/Z),z*=Z),typeof C=="number"&&(Z=C|0,Z<0?(G+=q*(P-1),P=j(-P/Z)):P=j(P/Z),q*=Z),typeof S=="number"&&(Z=S|0,Z<0?(G+=V*(E-1),E=j(-E/Z)):E=j(E/Z),V*=Z),new M(this.data,g,P,E,z,q,V,G)},T.transpose=function(x,C,S){x=x===void 0?0:x|0,C=C===void 0?1:C|0,S=S===void 0?2:S|0;var g=this.shape,P=this.stride;return new M(this.data,g[x],g[C],g[S],P[x],P[C],P[S],this.offset)},T.pick=function(x,C,S){var g=[],P=[],E=this.offset;typeof x=="number"&&x>=0?E=E+this.stride[0]*x|0:(g.push(this.shape[0]),P.push(this.stride[0])),typeof C=="number"&&C>=0?E=E+this.stride[1]*C|0:(g.push(this.shape[1]),P.push(this.stride[1])),typeof S=="number"&&S>=0?E=E+this.stride[2]*S|0:(g.push(this.shape[2]),P.push(this.stride[2]));var z=p[g.length+1];return z(this.data,g,P,E)},function(x,C,S,g){return new M(x,C[0],C[1],C[2],S[0],S[1],S[2],g)}},4:function(b,p,k){function M(L,x,C,S,g,P,E,z,q,V){this.data=L,this.shape=[x,C,S,g],this.stride=[P,E,z,q],this.offset=V|0}var T=M.prototype;return T.dtype=b,T.dimension=4,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(T,"order",{get:k}),T.set=function(x,C,S,g,P){return b==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S+this.stride[3]*g,P):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S+this.stride[3]*g]=P},T.get=function(x,C,S,g){return b==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S+this.stride[3]*g):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S+this.stride[3]*g]},T.index=function(x,C,S,g){return this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S+this.stride[3]*g},T.hi=function(x,C,S,g){return new M(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof S!="number"||S<0?this.shape[2]:S|0,typeof g!="number"||g<0?this.shape[3]:g|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},T.lo=function(x,C,S,g){var P=this.offset,E=0,z=this.shape[0],q=this.shape[1],V=this.shape[2],G=this.shape[3],Z=this.stride[0],j=this.stride[1],N=this.stride[2],H=this.stride[3];return typeof x=="number"&&x>=0&&(E=x|0,P+=Z*E,z-=E),typeof C=="number"&&C>=0&&(E=C|0,P+=j*E,q-=E),typeof S=="number"&&S>=0&&(E=S|0,P+=N*E,V-=E),typeof g=="number"&&g>=0&&(E=g|0,P+=H*E,G-=E),new M(this.data,z,q,V,G,Z,j,N,H,P)},T.step=function(x,C,S,g){var P=this.shape[0],E=this.shape[1],z=this.shape[2],q=this.shape[3],V=this.stride[0],G=this.stride[1],Z=this.stride[2],j=this.stride[3],N=this.offset,H=0,ie=Math.ceil;return typeof x=="number"&&(H=x|0,H<0?(N+=V*(P-1),P=ie(-P/H)):P=ie(P/H),V*=H),typeof C=="number"&&(H=C|0,H<0?(N+=G*(E-1),E=ie(-E/H)):E=ie(E/H),G*=H),typeof S=="number"&&(H=S|0,H<0?(N+=Z*(z-1),z=ie(-z/H)):z=ie(z/H),Z*=H),typeof g=="number"&&(H=g|0,H<0?(N+=j*(q-1),q=ie(-q/H)):q=ie(q/H),j*=H),new M(this.data,P,E,z,q,V,G,Z,j,N)},T.transpose=function(x,C,S,g){x=x===void 0?0:x|0,C=C===void 0?1:C|0,S=S===void 0?2:S|0,g=g===void 0?3:g|0;var P=this.shape,E=this.stride;return new M(this.data,P[x],P[C],P[S],P[g],E[x],E[C],E[S],E[g],this.offset)},T.pick=function(x,C,S,g){var P=[],E=[],z=this.offset;typeof x=="number"&&x>=0?z=z+this.stride[0]*x|0:(P.push(this.shape[0]),E.push(this.stride[0])),typeof C=="number"&&C>=0?z=z+this.stride[1]*C|0:(P.push(this.shape[1]),E.push(this.stride[1])),typeof S=="number"&&S>=0?z=z+this.stride[2]*S|0:(P.push(this.shape[2]),E.push(this.stride[2])),typeof g=="number"&&g>=0?z=z+this.stride[3]*g|0:(P.push(this.shape[3]),E.push(this.stride[3]));var q=p[P.length+1];return q(this.data,P,E,z)},function(x,C,S,g){return new M(x,C[0],C[1],C[2],C[3],S[0],S[1],S[2],S[3],g)}},5:function(p,k,M){function T(x,C,S,g,P,E,z,q,V,G,Z,j){this.data=x,this.shape=[C,S,g,P,E],this.stride=[z,q,V,G,Z],this.offset=j|0}var L=T.prototype;return L.dtype=p,L.dimension=5,Object.defineProperty(L,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(L,"order",{get:M}),L.set=function(C,S,g,P,E,z){return p==="generic"?this.data.set(this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*g+this.stride[3]*P+this.stride[4]*E,z):this.data[this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*g+this.stride[3]*P+this.stride[4]*E]=z},L.get=function(C,S,g,P,E){return p==="generic"?this.data.get(this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*g+this.stride[3]*P+this.stride[4]*E):this.data[this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*g+this.stride[3]*P+this.stride[4]*E]},L.index=function(C,S,g,P,E){return this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*g+this.stride[3]*P+this.stride[4]*E},L.hi=function(C,S,g,P,E){return new T(this.data,typeof C!="number"||C<0?this.shape[0]:C|0,typeof S!="number"||S<0?this.shape[1]:S|0,typeof g!="number"||g<0?this.shape[2]:g|0,typeof P!="number"||P<0?this.shape[3]:P|0,typeof E!="number"||E<0?this.shape[4]:E|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},L.lo=function(C,S,g,P,E){var z=this.offset,q=0,V=this.shape[0],G=this.shape[1],Z=this.shape[2],j=this.shape[3],N=this.shape[4],H=this.stride[0],ie=this.stride[1],ae=this.stride[2],_e=this.stride[3],Ee=this.stride[4];return typeof C=="number"&&C>=0&&(q=C|0,z+=H*q,V-=q),typeof S=="number"&&S>=0&&(q=S|0,z+=ie*q,G-=q),typeof g=="number"&&g>=0&&(q=g|0,z+=ae*q,Z-=q),typeof P=="number"&&P>=0&&(q=P|0,z+=_e*q,j-=q),typeof E=="number"&&E>=0&&(q=E|0,z+=Ee*q,N-=q),new T(this.data,V,G,Z,j,N,H,ie,ae,_e,Ee,z)},L.step=function(C,S,g,P,E){var z=this.shape[0],q=this.shape[1],V=this.shape[2],G=this.shape[3],Z=this.shape[4],j=this.stride[0],N=this.stride[1],H=this.stride[2],ie=this.stride[3],ae=this.stride[4],_e=this.offset,Ee=0,Ce=Math.ceil;return typeof C=="number"&&(Ee=C|0,Ee<0?(_e+=j*(z-1),z=Ce(-z/Ee)):z=Ce(z/Ee),j*=Ee),typeof S=="number"&&(Ee=S|0,Ee<0?(_e+=N*(q-1),q=Ce(-q/Ee)):q=Ce(q/Ee),N*=Ee),typeof g=="number"&&(Ee=g|0,Ee<0?(_e+=H*(V-1),V=Ce(-V/Ee)):V=Ce(V/Ee),H*=Ee),typeof P=="number"&&(Ee=P|0,Ee<0?(_e+=ie*(G-1),G=Ce(-G/Ee)):G=Ce(G/Ee),ie*=Ee),typeof E=="number"&&(Ee=E|0,Ee<0?(_e+=ae*(Z-1),Z=Ce(-Z/Ee)):Z=Ce(Z/Ee),ae*=Ee),new T(this.data,z,q,V,G,Z,j,N,H,ie,ae,_e)},L.transpose=function(C,S,g,P,E){C=C===void 0?0:C|0,S=S===void 0?1:S|0,g=g===void 0?2:g|0,P=P===void 0?3:P|0,E=E===void 0?4:E|0;var z=this.shape,q=this.stride;return new T(this.data,z[C],z[S],z[g],z[P],z[E],q[C],q[S],q[g],q[P],q[E],this.offset)},L.pick=function(C,S,g,P,E){var z=[],q=[],V=this.offset;typeof C=="number"&&C>=0?V=V+this.stride[0]*C|0:(z.push(this.shape[0]),q.push(this.stride[0])),typeof S=="number"&&S>=0?V=V+this.stride[1]*S|0:(z.push(this.shape[1]),q.push(this.stride[1])),typeof g=="number"&&g>=0?V=V+this.stride[2]*g|0:(z.push(this.shape[2]),q.push(this.stride[2])),typeof P=="number"&&P>=0?V=V+this.stride[3]*P|0:(z.push(this.shape[3]),q.push(this.stride[3])),typeof E=="number"&&E>=0?V=V+this.stride[4]*E|0:(z.push(this.shape[4]),q.push(this.stride[4]));var G=k[z.length+1];return G(this.data,z,q,V)},function(C,S,g,P){return new T(C,S[0],S[1],S[2],S[3],S[4],g[0],g[1],g[2],g[3],g[4],P)}}};function h(b,p){var k=p===-1?"T":String(p),M=f[k];return p===-1?M(b):p===0?M(b,v[b][0]):M(b,v[b],c)}function d(b){if(s(b))return"buffer";if(l)switch(Object.prototype.toString.call(b)){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(b)?"array":"generic"}var v={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function m(b,p,k,M){if(b===void 0){var g=v.array[0];return g([])}else typeof b=="number"&&(b=[b]);p===void 0&&(p=[b.length]);var T=p.length;if(k===void 0){k=new Array(T);for(var L=T-1,x=1;L>=0;--L)k[L]=x,x*=p[L]}if(M===void 0){M=0;for(var L=0;L>>0;i.exports=c;function c(f,h){if(isNaN(f)||isNaN(h))return NaN;if(f===h)return f;if(f===0)return h<0?-l:l;var d=s.hi(f),v=s.lo(f);return h>f==f>0?v===u?(d+=1,v=0):v+=1:v===0?(v=u,d-=1):v-=1,s.pack(v,d)}},8406:function(i,a){var o=1e-6,s=1e-6;a.vertexNormals=function(l,u,c){for(var f=u.length,h=new Array(f),d=c===void 0?o:c,v=0;vd)for(var z=h[p],q=1/Math.sqrt(S*P),E=0;E<3;++E){var V=(E+1)%3,G=(E+2)%3;z[E]+=q*(g[V]*C[G]-g[G]*C[V])}}for(var v=0;vd)for(var q=1/Math.sqrt(Z),E=0;E<3;++E)z[E]*=q;else for(var E=0;E<3;++E)z[E]=0}return h},a.faceNormals=function(l,u,c){for(var f=l.length,h=new Array(f),d=c===void 0?s:c,v=0;vd?L=1/Math.sqrt(L):L=0;for(var p=0;p<3;++p)T[p]*=L;h[v]=T}return h}},4081:function(i){"use strict";i.exports=a;function a(o,s,l,u,c,f,h,d,v,m){var b=s+f+m;if(p>0){var p=Math.sqrt(b+1);o[0]=.5*(h-v)/p,o[1]=.5*(d-u)/p,o[2]=.5*(l-f)/p,o[3]=.5*p}else{var k=Math.max(s,f,m),p=Math.sqrt(2*k-b+1);s>=k?(o[0]=.5*p,o[1]=.5*(c+l)/p,o[2]=.5*(d+u)/p,o[3]=.5*(h-v)/p):f>=k?(o[0]=.5*(l+c)/p,o[1]=.5*p,o[2]=.5*(v+h)/p,o[3]=.5*(d-u)/p):(o[0]=.5*(u+d)/p,o[1]=.5*(h+v)/p,o[2]=.5*p,o[3]=.5*(l-c)/p)}return o}},9977:function(i,a,o){"use strict";i.exports=p;var s=o(9215),l=o(6582),u=o(7399),c=o(7608),f=o(4081);function h(k,M,T){return Math.sqrt(Math.pow(k,2)+Math.pow(M,2)+Math.pow(T,2))}function d(k,M,T,L){return Math.sqrt(Math.pow(k,2)+Math.pow(M,2)+Math.pow(T,2)+Math.pow(L,2))}function v(k,M){var T=M[0],L=M[1],x=M[2],C=M[3],S=d(T,L,x,C);S>1e-6?(k[0]=T/S,k[1]=L/S,k[2]=x/S,k[3]=C/S):(k[0]=k[1]=k[2]=0,k[3]=1)}function m(k,M,T){this.radius=s([T]),this.center=s(M),this.rotation=s(k),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 b=m.prototype;b.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},b.recalcMatrix=function(k){this.radius.curve(k),this.center.curve(k),this.rotation.curve(k);var M=this.computedRotation;v(M,M);var T=this.computedMatrix;u(T,M);var L=this.computedCenter,x=this.computedEye,C=this.computedUp,S=Math.exp(this.computedRadius[0]);x[0]=L[0]+S*T[2],x[1]=L[1]+S*T[6],x[2]=L[2]+S*T[10],C[0]=T[1],C[1]=T[5],C[2]=T[9];for(var g=0;g<3;++g){for(var P=0,E=0;E<3;++E)P+=T[g+4*E]*x[E];T[12+g]=-P}},b.getMatrix=function(k,M){this.recalcMatrix(k);var T=this.computedMatrix;if(M){for(var L=0;L<16;++L)M[L]=T[L];return M}return T},b.idle=function(k){this.center.idle(k),this.radius.idle(k),this.rotation.idle(k)},b.flush=function(k){this.center.flush(k),this.radius.flush(k),this.rotation.flush(k)},b.pan=function(k,M,T,L){M=M||0,T=T||0,L=L||0,this.recalcMatrix(k);var x=this.computedMatrix,C=x[1],S=x[5],g=x[9],P=h(C,S,g);C/=P,S/=P,g/=P;var E=x[0],z=x[4],q=x[8],V=E*C+z*S+q*g;E-=C*V,z-=S*V,q-=g*V;var G=h(E,z,q);E/=G,z/=G,q/=G;var Z=x[2],j=x[6],N=x[10],H=Z*C+j*S+N*g,ie=Z*E+j*z+N*q;Z-=H*C+ie*E,j-=H*S+ie*z,N-=H*g+ie*q;var ae=h(Z,j,N);Z/=ae,j/=ae,N/=ae;var _e=E*M+C*T,Ee=z*M+S*T,Ce=q*M+g*T;this.center.move(k,_e,Ee,Ce);var ge=Math.exp(this.computedRadius[0]);ge=Math.max(1e-4,ge+L),this.radius.set(k,Math.log(ge))},b.rotate=function(k,M,T,L){this.recalcMatrix(k),M=M||0,T=T||0;var x=this.computedMatrix,C=x[0],S=x[4],g=x[8],P=x[1],E=x[5],z=x[9],q=x[2],V=x[6],G=x[10],Z=M*C+T*P,j=M*S+T*E,N=M*g+T*z,H=-(V*N-G*j),ie=-(G*Z-q*N),ae=-(q*j-V*Z),_e=Math.sqrt(Math.max(0,1-Math.pow(H,2)-Math.pow(ie,2)-Math.pow(ae,2))),Ee=d(H,ie,ae,_e);Ee>1e-6?(H/=Ee,ie/=Ee,ae/=Ee,_e/=Ee):(H=ie=ae=0,_e=1);var Ce=this.computedRotation,ge=Ce[0],re=Ce[1],Se=Ce[2],ke=Ce[3],be=ge*_e+ke*H+re*ae-Se*ie,Be=re*_e+ke*ie+Se*H-ge*ae,Le=Se*_e+ke*ae+ge*ie-re*H,me=ke*_e-ge*H-re*ie-Se*ae;if(L){H=q,ie=V,ae=G;var Pe=Math.sin(L)/h(H,ie,ae);H*=Pe,ie*=Pe,ae*=Pe,_e=Math.cos(M),be=be*_e+me*H+Be*ae-Le*ie,Be=Be*_e+me*ie+Le*H-be*ae,Le=Le*_e+me*ae+be*ie-Be*H,me=me*_e-be*H-Be*ie-Le*ae}var ce=d(be,Be,Le,me);ce>1e-6?(be/=ce,Be/=ce,Le/=ce,me/=ce):(be=Be=Le=0,me=1),this.rotation.set(k,be,Be,Le,me)},b.lookAt=function(k,M,T,L){this.recalcMatrix(k),T=T||this.computedCenter,M=M||this.computedEye,L=L||this.computedUp;var x=this.computedMatrix;l(x,M,T,L);var C=this.computedRotation;f(C,x[0],x[1],x[2],x[4],x[5],x[6],x[8],x[9],x[10]),v(C,C),this.rotation.set(k,C[0],C[1],C[2],C[3]);for(var S=0,g=0;g<3;++g)S+=Math.pow(T[g]-M[g],2);this.radius.set(k,.5*Math.log(Math.max(S,1e-6))),this.center.set(k,T[0],T[1],T[2])},b.translate=function(k,M,T,L){this.center.move(k,M||0,T||0,L||0)},b.setMatrix=function(k,M){var T=this.computedRotation;f(T,M[0],M[1],M[2],M[4],M[5],M[6],M[8],M[9],M[10]),v(T,T),this.rotation.set(k,T[0],T[1],T[2],T[3]);var L=this.computedMatrix;c(L,M);var x=L[15];if(Math.abs(x)>1e-6){var C=L[12]/x,S=L[13]/x,g=L[14]/x;this.recalcMatrix(k);var P=Math.exp(this.computedRadius[0]);this.center.set(k,C-L[2]*P,S-L[6]*P,g-L[10]*P),this.radius.idle(k)}else this.center.idle(k),this.radius.idle(k)},b.setDistance=function(k,M){M>0&&this.radius.set(k,Math.log(M))},b.setDistanceLimits=function(k,M){k>0?k=Math.log(k):k=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,k),this.radius.bounds[0][0]=k,this.radius.bounds[1][0]=M},b.getDistanceLimits=function(k){var M=this.radius.bounds;return k?(k[0]=Math.exp(M[0][0]),k[1]=Math.exp(M[1][0]),k):[Math.exp(M[0][0]),Math.exp(M[1][0])]},b.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]}},b.fromJSON=function(k){var M=this.lastT(),T=k.center;T&&this.center.set(M,T[0],T[1],T[2]);var L=k.rotation;L&&this.rotation.set(M,L[0],L[1],L[2],L[3]);var x=k.distance;x&&x>0&&this.radius.set(M,Math.log(x)),this.setDistanceLimits(k.zoomMin,k.zoomMax)};function p(k){k=k||{};var M=k.center||[0,0,0],T=k.rotation||[0,0,0,1],L=k.radius||1;M=[].slice.call(M,0,3),T=[].slice.call(T,0,4),v(T,T);var x=new m(T,M,Math.log(L));return x.setDistanceLimits(k.zoomMin,k.zoomMax),("eye"in k||"up"in k)&&x.lookAt(0,k.eye,k.center,k.up),x}},1371:function(i,a,o){"use strict";var s=o(3233);i.exports=function(u,c,f){return f=typeof f!="undefined"?f+"":" ",s(f,c)+u}},3202:function(i){i.exports=function(o,s){s||(s=[0,""]),o=String(o);var l=parseFloat(o,10);return s[0]=l,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}},3088:function(i,a,o){"use strict";i.exports=l;var s=o(3140);function l(u,c){for(var f=c.length|0,h=u.length,d=[new Array(f),new Array(f)],v=0;v0){z=d[G][P][0],V=G;break}q=z[V^1];for(var Z=0;Z<2;++Z)for(var j=d[Z][P],N=0;N0&&(z=H,q=ie,V=Z)}return E||z&&p(z,V),q}function M(g,P){var E=d[P][g][0],z=[g];p(E,P);for(var q=E[P^1],V=P;;){for(;q!==g;)z.push(q),q=k(z[z.length-2],q,!1);if(d[0][g].length+d[1][g].length===0)break;var G=z[z.length-1],Z=g,j=z[1],N=k(G,Z,!0);if(s(c[G],c[Z],c[j],c[N])<0)break;z.push(g),q=k(G,Z)}return z}function T(g,P){return P[1]===P[P.length-1]}for(var v=0;v0;){var C=d[0][v].length,S=M(v,L);T(x,S)?x.push.apply(x,S):(x.length>0&&b.push(x),x=S)}x.length>0&&b.push(x)}return b}},5609:function(i,a,o){"use strict";i.exports=l;var s=o(3134);function l(u,c){for(var f=s(u,c.length),h=new Array(c.length),d=new Array(c.length),v=[],m=0;m0;){var p=v.pop();h[p]=!1;for(var k=f[p],m=0;m0}C=C.filter(S);for(var g=C.length,P=new Array(g),E=new Array(g),x=0;x0;){var ce=Le.pop(),He=Ee[ce];h(He,function(ct,ar){return ct-ar});var lt=He.length,mt=me[ce],Ht;if(mt===0){var j=C[ce];Ht=[j]}for(var x=0;x=0)&&(me[at]=mt^1,Le.push(at),mt===0)){var j=C[at];Be(j)||(j.reverse(),Ht.push(j))}}mt===0&&Pe.push(Ht)}return Pe}},5085:function(i,a,o){i.exports=k;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function h(M){return function(T,L){var x=M[T];return x?!!x.queryPoint(L,f):!1}}function d(M){for(var T={},L=0;L0&&T[x]===L[0])C=M[x-1];else return 1;for(var S=1;C;){var g=C.key,P=s(L,g[0],g[1]);if(g[0][0]0)S=-1,C=C.right;else return 0;else if(P>0)C=C.left;else if(P<0)S=1,C=C.right;else return 0}return S}}function m(M){return 1}function b(M){return function(L){return M(L[0],L[1])?0:1}}function p(M,T){return function(x){return M(x[0],x[1])?0:T(x)}}function k(M){for(var T=M.length,L=[],x=[],C=0,S=0;S=m?(g=1,E=m+2*k+T):(g=-k/m,E=k*g+T)):(g=0,M>=0?(P=0,E=T):-M>=p?(P=1,E=p+2*M+T):(P=-M/p,E=M*P+T));else if(P<0)P=0,k>=0?(g=0,E=T):-k>=m?(g=1,E=m+2*k+T):(g=-k/m,E=k*g+T);else{var z=1/S;g*=z,P*=z,E=g*(m*g+b*P+2*k)+P*(b*g+p*P+2*M)+T}else{var q,V,G,Z;g<0?(q=b+k,V=p+M,V>q?(G=V-q,Z=m-2*b+p,G>=Z?(g=1,P=0,E=m+2*k+T):(g=G/Z,P=1-g,E=g*(m*g+b*P+2*k)+P*(b*g+p*P+2*M)+T)):(g=0,V<=0?(P=1,E=p+2*M+T):M>=0?(P=0,E=T):(P=-M/p,E=M*P+T))):P<0?(q=b+M,V=m+k,V>q?(G=V-q,Z=m-2*b+p,G>=Z?(P=1,g=0,E=p+2*M+T):(P=G/Z,g=1-P,E=g*(m*g+b*P+2*k)+P*(b*g+p*P+2*M)+T)):(P=0,V<=0?(g=1,E=m+2*k+T):k>=0?(g=0,E=T):(g=-k/m,E=k*g+T))):(G=p+M-b-k,G<=0?(g=0,P=1,E=p+2*M+T):(Z=m-2*b+p,G>=Z?(g=1,P=0,E=m+2*k+T):(g=G/Z,P=1-g,E=g*(m*g+b*P+2*k)+P*(b*g+p*P+2*M)+T)))}for(var j=1-g-P,v=0;v0){var p=f[d-1];if(s(m,p)===0&&u(p)!==b){d-=1;continue}}f[d++]=m}}return f.length=d,f}},3233:function(i){"use strict";var a="",o;i.exports=s;function s(l,u){if(typeof l!="string")throw new TypeError("expected a string");if(u===1)return l;if(u===2)return l+l;var c=l.length*u;if(o!==l||typeof o=="undefined")o=l,a="";else if(a.length>=c)return a.substr(0,c);for(;c>a.length&&u>1;)u&1&&(a+=l),u>>=1,l+=l;return a+=l,a=a.substr(0,c),a}},3025:function(i,a,o){i.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(i){"use strict";i.exports=a;function a(o){for(var s=o.length,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,h=o[c];l=f+h;var d=l-f,v=h-d;v&&(o[--u]=l,l=v)}for(var m=0,c=u;c0){if(V<=0)return G;Z=q+V}else if(q<0){if(V>=0)return G;Z=-(q+V)}else return G;var j=d*Z;return G>=j||G<=-j?G:M(P,E,z)},function(P,E,z,q){var V=P[0]-q[0],G=E[0]-q[0],Z=z[0]-q[0],j=P[1]-q[1],N=E[1]-q[1],H=z[1]-q[1],ie=P[2]-q[2],ae=E[2]-q[2],_e=z[2]-q[2],Ee=G*H,Ce=Z*N,ge=Z*j,re=V*H,Se=V*N,ke=G*j,be=ie*(Ee-Ce)+ae*(ge-re)+_e*(Se-ke),Be=(Math.abs(Ee)+Math.abs(Ce))*Math.abs(ie)+(Math.abs(ge)+Math.abs(re))*Math.abs(ae)+(Math.abs(Se)+Math.abs(ke))*Math.abs(_e),Le=v*Be;return be>Le||-be>Le?be:T(P,E,z,q)}];function x(g){var P=L[g.length];return P||(P=L[g.length]=k(g.length)),P.apply(void 0,g)}function C(g,P,E,z,q,V,G){return function(j,N,H,ie,ae){switch(arguments.length){case 0:case 1:return 0;case 2:return z(j,N);case 3:return q(j,N,H);case 4:return V(j,N,H,ie);case 5:return G(j,N,H,ie,ae)}for(var _e=new Array(arguments.length),Ee=0;Ee0&&m>0||v<0&&m<0)return!1;var b=s(h,c,f),p=s(d,c,f);return b>0&&p>0||b<0&&p<0?!1:v===0&&m===0&&b===0&&p===0?l(c,f,h,d):!0}},8545:function(i){"use strict";i.exports=o;function a(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,d=s-f,v=d+h;return v?[v,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return a(s[0],-l[0]);var f=u+c,h=new Array(f),d=0,v=0,m=0,b=Math.abs,p=s[v],k=b(p),M=-l[m],T=b(M),L,x;k=c?(L=p,v+=1,v=c?(L=p,v+=1,v>1,M=f[2*k+1];if(M===m)return k;m>1,M=f[2*k+1];if(M===m)return k;m>1,M=f[2*k+1];if(M===m)return k;m>1,M=f[2*k+1];if(M===m)return k;m>1,Z=d(P[G],E);Z<=0?(Z===0&&(V=G),z=G+1):Z>0&&(q=G-1)}return V}s=p;function k(P,E){for(var z=new Array(P.length),q=0,V=z.length;q=P.length||d(P[Ee],G)!==0););}return z}s=k;function M(P,E){if(!E)return k(b(L(P,0)),P,0);for(var z=new Array(E),q=0;q>>H&1&&N.push(V[H]);E.push(N)}return m(E)}s=T;function L(P,E){if(E<0)return[];for(var z=[],q=(1<0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},a.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},a.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}a.countTrailingZeros=s,a.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;u[c]=h<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},a.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},a.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},a.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},2014:function(i,a,o){"use strict";"use restrict";var s=o(3105),l=o(4623);function u(g){for(var P=0,E=Math.max,z=0,q=g.length;z>1,G=h(g[V],P);G<=0?(G===0&&(q=V),E=V+1):G>0&&(z=V-1)}return q}a.findCell=b;function p(g,P){for(var E=new Array(g.length),z=0,q=E.length;z=g.length||h(g[_e],V)!==0););}return E}a.incidence=p;function k(g,P){if(!P)return p(m(T(g,0)),g,0);for(var E=new Array(P),z=0;z>>N&1&&j.push(q[N]);P.push(j)}return v(P)}a.explode=M;function T(g,P){if(P<0)return[];for(var E=[],z=(1<>1:(re>>1)-1}function z(re){for(var Se=P(re);;){var ke=Se,be=2*re+1,Be=2*(re+1),Le=re;if(be0;){var ke=E(re);if(ke>=0){var be=P(ke);if(Se0){var re=j[0];return g(0,ie-1),ie-=1,z(0),re}return-1}function G(re,Se){var ke=j[re];return k[ke]===Se?re:(k[ke]=-1/0,q(re),V(),k[ke]=Se,ie+=1,q(ie-1))}function Z(re){if(!M[re]){M[re]=!0;var Se=b[re],ke=p[re];b[ke]>=0&&(b[ke]=Se),p[Se]>=0&&(p[Se]=ke),N[Se]>=0&&G(N[Se],S(Se)),N[ke]>=0&&G(N[ke],S(ke))}}for(var j=[],N=new Array(v),T=0;T>1;T>=0;--T)z(T);for(;;){var ae=V();if(ae<0||k[ae]>d)break;Z(ae)}for(var _e=[],T=0;T=0&&ke>=0&&Se!==ke){var be=N[Se],Be=N[ke];be!==Be&&ge.push([be,Be])}}),l.unique(l.normalize(ge)),{positions:_e,edges:ge}}},1303:function(i,a,o){"use strict";i.exports=u;var s=o(3250);function l(c,f){var h,d;if(f[0][0]f[1][0])h=f[1],d=f[0];else{var v=Math.min(c[0][1],c[1][1]),m=Math.max(c[0][1],c[1][1]),b=Math.min(f[0][1],f[1][1]),p=Math.max(f[0][1],f[1][1]);return mp?v-p:m-p}var k,M;c[0][1]f[1][0])h=f[1],d=f[0];else return l(f,c);var v,m;if(c[0][0]c[1][0])v=c[1],m=c[0];else return-l(c,f);var b=s(h,d,m),p=s(h,d,v);if(b<0){if(p<=0)return b}else if(b>0){if(p>=0)return b}else if(p)return p;if(b=s(m,v,d),p=s(m,v,h),b<0){if(p<=0)return b}else if(b>0){if(p>=0)return b}else if(p)return p;return d[0]-m[0]}},4209:function(i,a,o){"use strict";i.exports=p;var s=o(2478),l=o(3840),u=o(3250),c=o(1303);function f(k,M,T){this.slabs=k,this.coordinates=M,this.horizontal=T}var h=f.prototype;function d(k,M){return k.y-M}function v(k,M){for(var T=null;k;){var L=k.key,x,C;L[0][0]0)if(M[0]!==L[1][0])T=k,k=k.right;else{var g=v(k.right,M);if(g)return g;k=k.left}else{if(M[0]!==L[1][0])return k;var g=v(k.right,M);if(g)return g;k=k.left}}return T}h.castUp=function(k){var M=s.le(this.coordinates,k[0]);if(M<0)return-1;var T=this.slabs[M],L=v(this.slabs[M],k),x=-1;if(L&&(x=L.value),this.coordinates[M]===k[0]){var C=null;if(L&&(C=L.key),M>0){var S=v(this.slabs[M-1],k);S&&(C?c(S.key,C)>0&&(C=S.key,x=S.value):(x=S.value,C=S.key))}var g=this.horizontal[M];if(g.length>0){var P=s.ge(g,k[1],d);if(P=g.length)return x;E=g[P]}}if(E.start)if(C){var z=u(C[0],C[1],[k[0],E.y]);C[0][0]>C[1][0]&&(z=-z),z>0&&(x=E.index)}else x=E.index;else E.y!==k[1]&&(x=E.index)}}}return x};function m(k,M,T,L){this.y=k,this.index=M,this.start=T,this.closed=L}function b(k,M,T,L){this.x=k,this.segment=M,this.create=T,this.index=L}function p(k){for(var M=k.length,T=2*M,L=new Array(T),x=0;x1&&(M=1);for(var T=1-M,L=v.length,x=new Array(L),C=0;C0||k>0&&x<0){var C=c(M,x,T,k);b.push(C),p.push(C.slice())}x<0?p.push(T.slice()):x>0?b.push(T.slice()):(b.push(T.slice()),p.push(T.slice())),k=x}return{positive:b,negative:p}}function h(v,m){for(var b=[],p=u(v[v.length-1],m),k=v[v.length-1],M=v[0],T=0;T0||p>0&&L<0)&&b.push(c(k,L,M,p)),L>=0&&b.push(M.slice()),p=L}return b}function d(v,m){for(var b=[],p=u(v[v.length-1],m),k=v[v.length-1],M=v[0],T=0;T0||p>0&&L<0)&&b.push(c(k,L,M,p)),L<=0&&b.push(M.slice()),p=L}return b}},3387:function(i,a,o){var s;(function(){"use strict";var l={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 u(v){return f(d(v),arguments)}function c(v,m){return u.apply(null,[v].concat(m||[]))}function f(v,m){var b=1,p=v.length,k,M="",T,L,x,C,S,g,P,E;for(T=0;T=0),x.type){case"b":k=parseInt(k,10).toString(2);break;case"c":k=String.fromCharCode(parseInt(k,10));break;case"d":case"i":k=parseInt(k,10);break;case"j":k=JSON.stringify(k,null,x.width?parseInt(x.width):0);break;case"e":k=x.precision?parseFloat(k).toExponential(x.precision):parseFloat(k).toExponential();break;case"f":k=x.precision?parseFloat(k).toFixed(x.precision):parseFloat(k);break;case"g":k=x.precision?String(Number(k.toPrecision(x.precision))):parseFloat(k);break;case"o":k=(parseInt(k,10)>>>0).toString(8);break;case"s":k=String(k),k=x.precision?k.substring(0,x.precision):k;break;case"t":k=String(!!k),k=x.precision?k.substring(0,x.precision):k;break;case"T":k=Object.prototype.toString.call(k).slice(8,-1).toLowerCase(),k=x.precision?k.substring(0,x.precision):k;break;case"u":k=parseInt(k,10)>>>0;break;case"v":k=k.valueOf(),k=x.precision?k.substring(0,x.precision):k;break;case"x":k=(parseInt(k,10)>>>0).toString(16);break;case"X":k=(parseInt(k,10)>>>0).toString(16).toUpperCase();break}l.json.test(x.type)?M+=k:(l.number.test(x.type)&&(!P||x.sign)?(E=P?"+":"-",k=k.toString().replace(l.sign,"")):E="",S=x.pad_char?x.pad_char==="0"?"0":x.pad_char.charAt(1):" ",g=x.width-(E+k).length,C=x.width&&g>0?S.repeat(g):"",M+=x.align?E+k+C:S==="0"?E+C+k:C+E+k)}return M}var h=Object.create(null);function d(v){if(h[v])return h[v];for(var m=v,b,p=[],k=0;m;){if((b=l.text.exec(m))!==null)p.push(b[0]);else if((b=l.modulo.exec(m))!==null)p.push("%");else if((b=l.placeholder.exec(m))!==null){if(b[2]){k|=1;var M=[],T=b[2],L=[];if((L=l.key.exec(T))!==null)for(M.push(L[1]);(T=T.substring(L[0].length))!=="";)if((L=l.key_access.exec(T))!==null)M.push(L[1]);else if((L=l.index_access.exec(T))!==null)M.push(L[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");b[2]=M}else k|=2;if(k===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");p.push({placeholder:b[0],param_no:b[1],keys:b[2],sign:b[3],pad_char:b[4],align:b[5],width:b[6],precision:b[7],type:b[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");m=m.substring(b[0].length)}return h[v]=p}a.sprintf=u,a.vsprintf=c,typeof window!="undefined"&&(window.sprintf=u,window.vsprintf=c,s=function(){return{sprintf:u,vsprintf:c}}.call(a,o,a,i),s!==void 0&&(i.exports=s))})()},3711:function(i,a,o){"use strict";i.exports=d;var s=o(2640),l=o(781),u={"2d":function(v,m,b){var p=v({order:m,scalarArguments:3,getters:b==="generic"?[0]:void 0,phase:function(M,T,L,x){return M>x|0},vertex:function(M,T,L,x,C,S,g,P,E,z,q,V,G){var Z=(g<<0)+(P<<1)+(E<<2)+(z<<3)|0;if(!(Z===0||Z===15))switch(Z){case 0:q.push([M-.5,T-.5]);break;case 1:q.push([M-.25-.25*(x+L-2*G)/(L-x),T-.25-.25*(C+L-2*G)/(L-C)]);break;case 2:q.push([M-.75-.25*(-x-L+2*G)/(x-L),T-.25-.25*(S+x-2*G)/(x-S)]);break;case 3:q.push([M-.5,T-.5-.5*(C+L+S+x-4*G)/(L-C+x-S)]);break;case 4:q.push([M-.25-.25*(S+C-2*G)/(C-S),T-.75-.25*(-C-L+2*G)/(C-L)]);break;case 5:q.push([M-.5-.5*(x+L+S+C-4*G)/(L-x+C-S),T-.5]);break;case 6:q.push([M-.5-.25*(-x-L+S+C)/(x-L+C-S),T-.5-.25*(-C-L+S+x)/(C-L+x-S)]);break;case 7:q.push([M-.75-.25*(S+C-2*G)/(C-S),T-.75-.25*(S+x-2*G)/(x-S)]);break;case 8:q.push([M-.75-.25*(-S-C+2*G)/(S-C),T-.75-.25*(-S-x+2*G)/(S-x)]);break;case 9:q.push([M-.5-.25*(x+L+-S-C)/(L-x+S-C),T-.5-.25*(C+L+-S-x)/(L-C+S-x)]);break;case 10:q.push([M-.5-.5*(-x-L+-S-C+4*G)/(x-L+S-C),T-.5]);break;case 11:q.push([M-.25-.25*(-S-C+2*G)/(S-C),T-.75-.25*(C+L-2*G)/(L-C)]);break;case 12:q.push([M-.5,T-.5-.5*(-C-L+-S-x+4*G)/(C-L+S-x)]);break;case 13:q.push([M-.75-.25*(x+L-2*G)/(L-x),T-.25-.25*(-S-x+2*G)/(S-x)]);break;case 14:q.push([M-.25-.25*(-x-L+2*G)/(x-L),T-.25-.25*(-C-L+2*G)/(C-L)]);break;case 15:q.push([M-.5,T-.5]);break}},cell:function(M,T,L,x,C,S,g,P,E){C?P.push([M,T]):P.push([T,M])}});return function(k,M){var T=[],L=[];return p(k,T,L,M),{positions:T,cells:L}}}};function c(v,m){var b=v.length+"d",p=u[b];if(p)return p(s,v,m)}function f(v,m){for(var b=l(v,m),p=b.length,k=new Array(p),M=new Array(p),T=0;TMath.max(x,C)?S[2]=1:x>Math.max(L,C)?S[0]=1:S[1]=1;for(var g=0,P=0,E=0;E<3;++E)g+=T[E]*T[E],P+=S[E]*T[E];for(var E=0;E<3;++E)S[E]-=P/g*T[E];return f(S,S),S}function b(T,L,x,C,S,g,P,E){this.center=s(x),this.up=s(C),this.right=s(S),this.radius=s([g]),this.angle=s([P,E]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(T,L),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 p=b.prototype;p.setDistanceLimits=function(T,L){T>0?T=Math.log(T):T=-1/0,L>0?L=Math.log(L):L=1/0,L=Math.max(L,T),this.radius.bounds[0][0]=T,this.radius.bounds[1][0]=L},p.getDistanceLimits=function(T){var L=this.radius.bounds[0];return T?(T[0]=Math.exp(L[0][0]),T[1]=Math.exp(L[1][0]),T):[Math.exp(L[0][0]),Math.exp(L[1][0])]},p.recalcMatrix=function(T){this.center.curve(T),this.up.curve(T),this.right.curve(T),this.radius.curve(T),this.angle.curve(T);for(var L=this.computedUp,x=this.computedRight,C=0,S=0,g=0;g<3;++g)S+=L[g]*x[g],C+=L[g]*L[g];for(var P=Math.sqrt(C),E=0,g=0;g<3;++g)x[g]-=L[g]*S/C,E+=x[g]*x[g],L[g]/=P;for(var z=Math.sqrt(E),g=0;g<3;++g)x[g]/=z;var q=this.computedToward;c(q,L,x),f(q,q);for(var V=Math.exp(this.computedRadius[0]),G=this.computedAngle[0],Z=this.computedAngle[1],j=Math.cos(G),N=Math.sin(G),H=Math.cos(Z),ie=Math.sin(Z),ae=this.computedCenter,_e=j*H,Ee=N*H,Ce=ie,ge=-j*ie,re=-N*ie,Se=H,ke=this.computedEye,be=this.computedMatrix,g=0;g<3;++g){var Be=_e*x[g]+Ee*q[g]+Ce*L[g];be[4*g+1]=ge*x[g]+re*q[g]+Se*L[g],be[4*g+2]=Be,be[4*g+3]=0}var Le=be[1],me=be[5],Pe=be[9],ce=be[2],He=be[6],lt=be[10],mt=me*lt-Pe*He,Ht=Pe*ce-Le*lt,at=Le*He-me*ce,ct=d(mt,Ht,at);mt/=ct,Ht/=ct,at/=ct,be[0]=mt,be[4]=Ht,be[8]=at;for(var g=0;g<3;++g)ke[g]=ae[g]+be[2+4*g]*V;for(var g=0;g<3;++g){for(var E=0,ar=0;ar<3;++ar)E+=be[g+4*ar]*ke[ar];be[12+g]=-E}be[15]=1},p.getMatrix=function(T,L){this.recalcMatrix(T);var x=this.computedMatrix;if(L){for(var C=0;C<16;++C)L[C]=x[C];return L}return x};var k=[0,0,0];p.rotate=function(T,L,x,C){if(this.angle.move(T,L,x),C){this.recalcMatrix(T);var S=this.computedMatrix;k[0]=S[2],k[1]=S[6],k[2]=S[10];for(var g=this.computedUp,P=this.computedRight,E=this.computedToward,z=0;z<3;++z)S[4*z]=g[z],S[4*z+1]=P[z],S[4*z+2]=E[z];u(S,S,C,k);for(var z=0;z<3;++z)g[z]=S[4*z],P[z]=S[4*z+1];this.up.set(T,g[0],g[1],g[2]),this.right.set(T,P[0],P[1],P[2])}},p.pan=function(T,L,x,C){L=L||0,x=x||0,C=C||0,this.recalcMatrix(T);var S=this.computedMatrix,g=Math.exp(this.computedRadius[0]),P=S[1],E=S[5],z=S[9],q=d(P,E,z);P/=q,E/=q,z/=q;var V=S[0],G=S[4],Z=S[8],j=V*P+G*E+Z*z;V-=P*j,G-=E*j,Z-=z*j;var N=d(V,G,Z);V/=N,G/=N,Z/=N;var H=V*L+P*x,ie=G*L+E*x,ae=Z*L+z*x;this.center.move(T,H,ie,ae);var _e=Math.exp(this.computedRadius[0]);_e=Math.max(1e-4,_e+C),this.radius.set(T,Math.log(_e))},p.translate=function(T,L,x,C){this.center.move(T,L||0,x||0,C||0)},p.setMatrix=function(T,L,x,C){var S=1;typeof x=="number"&&(S=x|0),(S<0||S>3)&&(S=1);var g=(S+2)%3,P=(S+1)%3;L||(this.recalcMatrix(T),L=this.computedMatrix);var E=L[S],z=L[S+4],q=L[S+8];if(C){var G=Math.abs(E),Z=Math.abs(z),j=Math.abs(q),N=Math.max(G,Z,j);G===N?(E=E<0?-1:1,z=q=0):j===N?(q=q<0?-1:1,E=z=0):(z=z<0?-1:1,E=q=0)}else{var V=d(E,z,q);E/=V,z/=V,q/=V}var H=L[g],ie=L[g+4],ae=L[g+8],_e=H*E+ie*z+ae*q;H-=E*_e,ie-=z*_e,ae-=q*_e;var Ee=d(H,ie,ae);H/=Ee,ie/=Ee,ae/=Ee;var Ce=z*ae-q*ie,ge=q*H-E*ae,re=E*ie-z*H,Se=d(Ce,ge,re);Ce/=Se,ge/=Se,re/=Se,this.center.jump(T,Ue,Ae,rt),this.radius.idle(T),this.up.jump(T,E,z,q),this.right.jump(T,H,ie,ae);var ke,be;if(S===2){var Be=L[1],Le=L[5],me=L[9],Pe=Be*H+Le*ie+me*ae,ce=Be*Ce+Le*ge+me*re;Ht<0?ke=-Math.PI/2:ke=Math.PI/2,be=Math.atan2(ce,Pe)}else{var He=L[2],lt=L[6],mt=L[10],Ht=He*E+lt*z+mt*q,at=He*H+lt*ie+mt*ae,ct=He*Ce+lt*ge+mt*re;ke=Math.asin(v(Ht)),be=Math.atan2(ct,at)}this.angle.jump(T,be,ke),this.recalcMatrix(T);var ar=L[2],Vt=L[6],rr=L[10],tt=this.computedMatrix;l(tt,L);var je=tt[15],Ue=tt[12]/je,Ae=tt[13]/je,rt=tt[14]/je,St=Math.exp(this.computedRadius[0]);this.center.jump(T,Ue-ar*St,Ae-Vt*St,rt-rr*St)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(T){this.center.idle(T),this.up.idle(T),this.right.idle(T),this.radius.idle(T),this.angle.idle(T)},p.flush=function(T){this.center.flush(T),this.up.flush(T),this.right.flush(T),this.radius.flush(T),this.angle.flush(T)},p.setDistance=function(T,L){L>0&&this.radius.set(T,Math.log(L))},p.lookAt=function(T,L,x,C){this.recalcMatrix(T),L=L||this.computedEye,x=x||this.computedCenter,C=C||this.computedUp;var S=C[0],g=C[1],P=C[2],E=d(S,g,P);if(!(E<1e-6)){S/=E,g/=E,P/=E;var z=L[0]-x[0],q=L[1]-x[1],V=L[2]-x[2],G=d(z,q,V);if(!(G<1e-6)){z/=G,q/=G,V/=G;var Z=this.computedRight,j=Z[0],N=Z[1],H=Z[2],ie=S*j+g*N+P*H;j-=ie*S,N-=ie*g,H-=ie*P;var ae=d(j,N,H);if(!(ae<.01&&(j=g*V-P*q,N=P*z-S*V,H=S*q-g*z,ae=d(j,N,H),ae<1e-6))){j/=ae,N/=ae,H/=ae,this.up.set(T,S,g,P),this.right.set(T,j,N,H),this.center.set(T,x[0],x[1],x[2]),this.radius.set(T,Math.log(G));var _e=g*H-P*N,Ee=P*j-S*H,Ce=S*N-g*j,ge=d(_e,Ee,Ce);_e/=ge,Ee/=ge,Ce/=ge;var re=S*z+g*q+P*V,Se=j*z+N*q+H*V,ke=_e*z+Ee*q+Ce*V,be=Math.asin(v(re)),Be=Math.atan2(ke,Se),Le=this.angle._state,me=Le[Le.length-1],Pe=Le[Le.length-2];me=me%(2*Math.PI);var ce=Math.abs(me+2*Math.PI-Be),He=Math.abs(me-Be),lt=Math.abs(me-2*Math.PI-Be);ce0?H.pop():new ArrayBuffer(j)}a.mallocArrayBuffer=k;function M(Z){return new Uint8Array(k(Z),0,Z)}a.mallocUint8=M;function T(Z){return new Uint16Array(k(2*Z),0,Z)}a.mallocUint16=T;function L(Z){return new Uint32Array(k(4*Z),0,Z)}a.mallocUint32=L;function x(Z){return new Int8Array(k(Z),0,Z)}a.mallocInt8=x;function C(Z){return new Int16Array(k(2*Z),0,Z)}a.mallocInt16=C;function S(Z){return new Int32Array(k(4*Z),0,Z)}a.mallocInt32=S;function g(Z){return new Float32Array(k(4*Z),0,Z)}a.mallocFloat32=a.mallocFloat=g;function P(Z){return new Float64Array(k(8*Z),0,Z)}a.mallocFloat64=a.mallocDouble=P;function E(Z){return c?new Uint8ClampedArray(k(Z),0,Z):M(Z)}a.mallocUint8Clamped=E;function z(Z){return f?new BigUint64Array(k(8*Z),0,Z):null}a.mallocBigUint64=z;function q(Z){return h?new BigInt64Array(k(8*Z),0,Z):null}a.mallocBigInt64=q;function V(Z){return new DataView(k(Z),0,Z)}a.mallocDataView=V;function G(Z){Z=s.nextPow2(Z);var j=s.log2(Z),N=m[j];return N.length>0?N.pop():new u(Z)}a.mallocBuffer=G,a.clearCache=function(){for(var j=0;j<32;++j)d.UINT8[j].length=0,d.UINT16[j].length=0,d.UINT32[j].length=0,d.INT8[j].length=0,d.INT16[j].length=0,d.INT32[j].length=0,d.FLOAT[j].length=0,d.DOUBLE[j].length=0,d.BIGUINT64[j].length=0,d.BIGINT64[j].length=0,d.UINT8C[j].length=0,v[j].length=0,m[j].length=0}},1755:function(i){"use strict";"use restrict";i.exports=a;function a(s){this.roots=new Array(s),this.ranks=new Array(s);for(var l=0;l",H="",ie=N.length,ae=H.length,_e=G[0]===k||G[0]===L,Ee=0,Ce=-ae;Ee>-1&&(Ee=Z.indexOf(N,Ee),!(Ee===-1||(Ce=Z.indexOf(H,Ee+ie),Ce===-1)||Ce<=Ee));){for(var ge=Ee;ge=Ce)j[ge]=null,Z=Z.substr(0,ge)+" "+Z.substr(ge+1);else if(j[ge]!==null){var re=j[ge].indexOf(G[0]);re===-1?j[ge]+=G:_e&&(j[ge]=j[ge].substr(0,re+1)+(1+parseInt(j[ge][re+1]))+j[ge].substr(re+2))}var Se=Ee+ie,ke=Z.substr(Se,Ce-Se),be=ke.indexOf(N);be!==-1?Ee=be:Ee=Ce+ae}return j}function S(V,G,Z){for(var j=G.textAlign||"start",N=G.textBaseline||"alphabetic",H=[1<<30,1<<30],ie=[0,0],ae=V.length,_e=0;_e/g,` +`):Z=Z.replace(/\/g," ");var ie="",ae=[];for(me=0;me-1?parseInt(Ae[1+Tt]):0,pt=dt>-1?parseInt(rt[1+dt]):0;Et!==pt&&(St=St.replace(at(),"?px "),He*=Math.pow(.75,pt-Et),St=St.replace("?px ",at())),ce+=.25*re*(pt-Et)}if(H.superscripts===!0){var jt=Ae.indexOf(k),or=rt.indexOf(k),mr=jt>-1?parseInt(Ae[1+jt]):0,Ar=or>-1?parseInt(rt[1+or]):0;mr!==Ar&&(St=St.replace(at(),"?px "),He*=Math.pow(.75,Ar-mr),St=St.replace("?px ",at())),ce-=.25*re*(Ar-mr)}if(H.bolds===!0){var ei=Ae.indexOf(v)>-1,qr=rt.indexOf(v)>-1;!ei&&qr&&(jr?St=St.replace("italic ","italic bold "):St="bold "+St),ei&&!qr&&(St=St.replace("bold ",""))}if(H.italics===!0){var jr=Ae.indexOf(b)>-1,gt=rt.indexOf(b)>-1;!jr&>&&(St="italic "+St),jr&&!gt&&(St=St.replace("italic ",""))}G.font=St}for(Le=0;Le0&&(N=j.size),j.lineSpacing&&j.lineSpacing>0&&(H=j.lineSpacing),j.styletags&&j.styletags.breaklines&&(ie.breaklines=!!j.styletags.breaklines),j.styletags&&j.styletags.bolds&&(ie.bolds=!!j.styletags.bolds),j.styletags&&j.styletags.italics&&(ie.italics=!!j.styletags.italics),j.styletags&&j.styletags.subscripts&&(ie.subscripts=!!j.styletags.subscripts),j.styletags&&j.styletags.superscripts&&(ie.superscripts=!!j.styletags.superscripts)),Z.font=[j.fontStyle,j.fontVariant,j.fontWeight,N+"px",j.font].filter(function(_e){return _e}).join(" "),Z.textAlign="start",Z.textBaseline="alphabetic",Z.direction="ltr";var ae=g(G,Z,V,N,H,ie);return z(ae,j,N)}},1538:function(i){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function o(E){E.permitHostObjects___&&E.permitHostObjects___(o)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap=="function"){var l=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var u=new l,c=Object.freeze({});if(u.set(c,1),u.get(c)!==1)s=!0;else{i.exports=WeakMap;return}}}var f=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,d=Object.defineProperty,v=Object.isExtensible,m="weakmap:",b=m+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var p=new ArrayBuffer(25),k=new Uint8Array(p);crypto.getRandomValues(k),b=m+"rand:"+Array.prototype.map.call(k,function(E){return(E%36).toString(36)}).join("")+"___"}function M(E){return!(E.substr(0,m.length)==m&&E.substr(E.length-3)==="___")}if(d(Object,"getOwnPropertyNames",{value:function(z){return h(z).filter(M)}}),"getPropertyNames"in Object){var T=Object.getPropertyNames;d(Object,"getPropertyNames",{value:function(z){return T(z).filter(M)}})}function L(E){if(E!==Object(E))throw new TypeError("Not an object: "+E);var z=E[b];if(z&&z.key===E)return z;if(v(E)){z={key:E};try{return d(E,b,{value:z,writable:!1,enumerable:!1,configurable:!1}),z}catch(q){return}}}(function(){var E=Object.freeze;d(Object,"freeze",{value:function(G){return L(G),E(G)}});var z=Object.seal;d(Object,"seal",{value:function(G){return L(G),z(G)}});var q=Object.preventExtensions;d(Object,"preventExtensions",{value:function(G){return L(G),q(G)}})})();function x(E){return E.prototype=null,Object.freeze(E)}var C=!1;function S(){!C&&typeof console!="undefined"&&(C=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var g=0,P=function(){this instanceof P||S();var E=[],z=[],q=g++;function V(N,H){var ie,ae=L(N);return ae?q in ae?ae[q]:H:(ie=E.indexOf(N),ie>=0?z[ie]:H)}function G(N){var H=L(N);return H?q in H:E.indexOf(N)>=0}function Z(N,H){var ie,ae=L(N);return ae?ae[q]=H:(ie=E.indexOf(N),ie>=0?z[ie]=H:(ie=E.length,z[ie]=H,E[ie]=N)),this}function j(N){var H=L(N),ie,ae;return H?q in H&&delete H[q]:(ie=E.indexOf(N),ie<0?!1:(ae=E.length-1,E[ie]=void 0,z[ie]=z[ae],E[ie]=E[ae],E.length=ae,z.length=ae,!0))}return Object.create(P.prototype,{get___:{value:x(V)},has___:{value:x(G)},set___:{value:x(Z)},delete___:{value:x(j)}})};P.prototype=Object.create(Object.prototype,{get:{value:function(z,q){return this.get___(z,q)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,q){return this.set___(z,q)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof l=="function"?function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function E(){this instanceof P||S();var z=new l,q=void 0,V=!1;function G(H,ie){return q?z.has(H)?z.get(H):q.get___(H,ie):z.get(H,ie)}function Z(H){return z.has(H)||(q?q.has___(H):!1)}var j;s?j=function(H,ie){return z.set(H,ie),z.has(H)||(q||(q=new P),q.set(H,ie)),this}:j=function(H,ie){if(V)try{z.set(H,ie)}catch(ae){q||(q=new P),q.set___(H,ie)}else z.set(H,ie);return this};function N(H){var ie=!!z.delete(H);return q&&q.delete___(H)||ie}return Object.create(P.prototype,{get___:{value:x(G)},has___:{value:x(Z)},set___:{value:x(j)},delete___:{value:x(N)},permitHostObjects___:{value:x(function(H){if(H===o)V=!0;else throw new Error("bogus call to permitHostObjects___")})}})}E.prototype=P.prototype,i.exports=E,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy!="undefined"&&(Proxy=void 0),i.exports=P)})()},236:function(i,a,o){var s=o(8284);i.exports=l;function l(){var u={};return function(c){if((typeof c!="object"||c===null)&&typeof c!="function")throw new Error("Weakmap-shim: Key must be object");var f=c.valueOf(u);return f&&f.identity===u?f:s(c,u)}}},8284:function(i){i.exports=a;function a(o,s){var l={identity:s},u=o.valueOf;return Object.defineProperty(o,"valueOf",{value:function(c){return c!==s?u.apply(this,arguments):l},writable:!0}),l}},606:function(i,a,o){var s=o(236);i.exports=l;function l(){var u=s();return{get:function(c,f){var h=u(c);return h.hasOwnProperty("value")?h.value:f},set:function(c,f){return u(c).value=f,this},has:function(c){return"value"in u(c)},delete:function(c){return delete u(c).value}}}},3349:function(i){"use strict";function a(){return function(f,h,d,v,m,b){var p=f[0],k=d[0],M=[0],T=k;v|=0;var L=0,x=k;for(L=0;L=0!=S>=0&&m.push(M[0]+.5+.5*(C+S)/(C-S))}v+=x,++M[0]}}}function o(){return a()}var s=o;function l(f){var h={};return function(v,m,b){var p=v.dtype,k=v.order,M=[p,k.join()].join(),T=h[M];return T||(h[M]=T=f([p,k])),T(v.shape.slice(0),v.data,v.stride,v.offset|0,m,b)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}i.exports=c({funcName:"zeroCrossings"})},781:function(i,a,o){"use strict";i.exports=l;var s=o(3349);function l(u,c){var f=[];return c=+c||0,s(u.hi(u.shape[0]-1),f,c),f}},7790:function(){}},t={};function r(i){var a=t[i];if(a!==void 0)return a.exports;var o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}(function(){r.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(i){if(typeof window=="object")return window}}()})(),function(){r.nmd=function(i){return i.paths=[],i.children||(i.children=[]),i}}();var n=r(1964);MPe.exports=n})()});var AX=ye((cgr,EPe)=>{"use strict";EPe.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]}});var PPe=ye((fgr,LPe)=>{"use strict";var kPe=AX();LPe.exports=gIt;var CPe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function gIt(e){var t,r=[],n=1,i;if(typeof e=="string")if(e=e.toLowerCase(),kPe[e])r=kPe[e].slice(),i="rgb";else if(e==="transparent")n=0,i="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var a=e.slice(1),o=a.length,s=o<=4;n=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],u=l==="rgb",a=l.replace(/a$/,"");i=a;var o=a==="cmyk"?4:a==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(h,d){if(/%$/.test(h))return d===o?parseFloat(h)/100:a==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(a[d]==="h"){if(/deg$/.test(h))return parseFloat(h);if(CPe[h]!==void 0)return CPe[h]}return parseFloat(h)}),l===a&&r.push(1),n=u||r[o]===void 0?1:r[o],r=r.slice(0,o)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),i=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],i="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(i="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(i="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(i="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:i,values:r,alpha:n}}});var RPe=ye((hgr,IPe)=>{"use strict";var mIt=PPe();IPe.exports=function(t){Array.isArray(t)&&t.raw&&(t=String.raw.apply(null,arguments));var r,n,i,a=mIt(t);if(!a.space)return[];var o=[0,0,0],s=a.space[0]==="h"?[360,100,100]:[255,255,255];return r=Array(3),r[0]=Math.min(Math.max(a.values[0],o[0]),s[0]),r[1]=Math.min(Math.max(a.values[1],o[1]),s[1]),r[2]=Math.min(Math.max(a.values[2],o[2]),s[2]),a.space[0]==="h"&&(r=yIt(r)),r.push(Math.min(Math.max(a.alpha,0),1)),r};function yIt(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,a,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(a=n<.5?n*(1+r):n+r-n*r,i=2*n-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?i+(a-i)*6*o:2*o<1?a:3*o<2?i+(a-i)*(2/3-o)*6:i,s[u++]=l*255;return s}});var ik=ye((dgr,DPe)=>{DPe.exports=_It;function _It(e,t,r){return tr?r:e:et?t:e}});var tF=ye((vgr,FPe)=>{FPe.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}});var sx=ye((pgr,zPe)=>{"use strict";var xIt=RPe(),rF=ik(),bIt=tF();zPe.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var n=bIt(r),i=new n(4),a=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=xIt(t),t[0]/=255,t[1]/=255,t[2]/=255),wIt(t)?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3]!=null?t[3]:255,a&&(i[0]/=255,i[1]/=255,i[2]/=255,i[3]/=255),i):(a?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3]!=null?t[3]:1):(i[0]=rF(Math.floor(t[0]*255),0,255),i[1]=rF(Math.floor(t[1]*255),0,255),i[2]=rF(Math.floor(t[2]*255),0,255),i[3]=t[3]==null?255:rF(Math.floor(t[3]*255),0,255)),i)};function wIt(e){return!!(e instanceof Uint8Array||e instanceof Uint8ClampedArray||Array.isArray(e)&&(e[0]>1||e[0]===0)&&(e[1]>1||e[1]===0)&&(e[2]>1||e[2]===0)&&(!e[3]||e[3]>1))}});var n1=ye((ggr,qPe)=>{"use strict";var TIt=sx();function AIt(e){return e?TIt(e):[0,0,0,1]}qPe.exports=AIt});var a1=ye((mgr,HPe)=>{"use strict";var VPe=Eo(),SIt=fd(),iF=sx(),nF=tc(),MIt=Ih().defaultLine,OPe=Yd().isArrayOrTypedArray,SX=iF(MIt),GPe=1;function BPe(e,t){var r=e;return r[3]*=t,r}function NPe(e){if(VPe(e))return SX;var t=iF(e);return t.length?t:SX}function UPe(e){return VPe(e)?e:GPe}function EIt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var i=OPe(n),a=OPe(t),o=nF.extractOpts(e),s=[],l,u,c,f,h;if(o.colorscale!==void 0?l=nF.makeColorScaleFuncFromTrace(e):l=NPe,i?u=function(v,m){return v[m]===void 0?SX:iF(l(v[m]))}:u=NPe,a?c=function(v,m){return v[m]===void 0?GPe:UPe(v[m])}:c=UPe,i||a)for(var d=0;d{"use strict";jPe.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]}});var aF=ye((_gr,WPe)=>{"use strict";WPe.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var ZPe=ye((xgr,XPe)=>{"use strict";var CIt=Oa();function EX(e,t,r,n){if(!t||!t.visible)return null;for(var i=CIt.getComponentMethod("errorbars","makeComputeError")(t),a=new Array(e.length),o=0;o0){var f=n.c2l(u);n._lowerLogErrorBound||(n._lowerLogErrorBound=f),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,f)}}else a[o]=[-s[0]*r,s[1]*r]}return a}function LIt(e){for(var t=0;t{"use strict";var IIt=qd().gl_line3d,YPe=qd().gl_scatter3d,RIt=qd().gl_error3d,DIt=qd().gl_mesh3d,FIt=qd().delaunay_triangulate,o1=Pr(),eIe=n1(),oF=a1().formatColor,zIt=B3(),kX=MX(),qIt=aF(),OIt=ho(),BIt=ip().appendArrayPointValue,NIt=ZPe();function tIe(e,t){this.scene=e,this.uid=t,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var LX=tIe.prototype;LX.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var t=e.index=e.data.index;return e.object.highlight&&e.object.highlight(null),this.scatterPlot&&(e.object=this.scatterPlot,this.scatterPlot.highlight(e.data)),e.textLabel="",this.textLabels&&(o1.isArrayOrTypedArray(this.textLabels)?(this.textLabels[t]||this.textLabels[t]===0)&&(e.textLabel=this.textLabels[t]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]],!0}};function UIt(e,t,r){var n=(r+1)%3,i=(r+2)%3,a=[],o=[],s;for(s=0;s-1?-1:e.indexOf("right")>-1?1:0}function JPe(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function GIt(e){var t=0,r=0,n=[t,r];if(Array.isArray(e))for(var i=0;i=0){var u=UIt(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=DIt(u),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)};LX.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 XIt(e,t){var r=new tIe(e,t.uid);return r.update(t),r}rIe.exports=XIt});var FX=ye((wgr,sIe)=>{"use strict";var s1=pf(),ZIt=ec(),DX=Tu(),PX=vf().axisHoverFormat,{hovertemplateAttrs:YIt,texttemplateAttrs:KIt,templatefallbackAttrs:nIe}=Ll(),aIe=Gl(),JIt=MX(),$It=aF(),$g=Ao().extendFlat,QIt=mc().overrideAll,oIe=t_(),e8t=s1.line,$2=s1.marker,t8t=$2.line,r8t=$g({width:e8t.width,dash:{valType:"enumerated",values:oIe(JIt),dflt:"solid"}},DX("line"));function IX(e){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var RX=sIe.exports=QIt({x:s1.x,y:s1.y,z:{valType:"data_array"},text:$g({},s1.text,{}),texttemplate:KIt(),texttemplatefallback:nIe({editType:"calc"}),hovertext:$g({},s1.hovertext,{}),hovertemplate:YIt(),hovertemplatefallback:nIe(),xhoverformat:PX("x"),yhoverformat:PX("y"),zhoverformat:PX("z"),mode:$g({},s1.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:IX("x"),y:IX("y"),z:IX("z")},connectgaps:s1.connectgaps,line:r8t,marker:$g({symbol:{valType:"enumerated",values:oIe($It),dflt:"circle",arrayOk:!0},size:$g({},$2.size,{dflt:8}),sizeref:$2.sizeref,sizemin:$2.sizemin,sizemode:$2.sizemode,opacity:$g({},$2.opacity,{arrayOk:!1}),colorbar:$2.colorbar,line:$g({width:$g({},t8t.width,{arrayOk:!1})},DX("marker.line"))},DX("marker")),textposition:$g({},s1.textposition,{dflt:"top center"}),textfont:ZIt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:aIe.opacity,hoverinfo:$g({},aIe.hoverinfo)},"calc","nested");RX.x.editType=RX.y.editType=RX.z.editType="calc+clearAxisTypes"});var cIe=ye((Tgr,uIe)=>{"use strict";var lIe=Oa(),i8t=Pr(),zX=Ru(),n8t=$p(),a8t=D0(),o8t=F0(),s8t=FX();uIe.exports=function(t,r,n,i){function a(d,v){return i8t.coerce(t,r,s8t,d,v)}var o=l8t(t,r,a,i);if(!o){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),a("mode"),zX.hasMarkers(r)&&n8t(t,r,n,i,a,{noAngle:!0,noLineDash:!0,noSelect:!0}),zX.hasLines(r)&&(a("connectgaps"),a8t(t,r,n,i,a)),zX.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),o8t(t,r,i,a,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,l=(r.marker||{}).color;a("surfaceaxis")>=0&&a("surfacecolor",s||l);for(var u=["x","y","z"],c=0;c<3;++c){var f="projection."+u[c];a(f+".show")&&(a(f+".opacity"),a(f+".scale"))}var h=lIe.getComponentMethod("errorbars","supplyDefaults");h(t,r,s||l||n,{axis:"z"}),h(t,r,s||l||n,{axis:"y",inherit:"z"}),h(t,r,s||l||n,{axis:"x",inherit:"z"})};function l8t(e,t,r,n){var i=0,a=r("x"),o=r("y"),s=r("z"),l=lIe.getComponentMethod("calendars","handleTraceDefaults");return l(e,t,["x","y","z"],n),a&&o&&s&&(i=Math.min(a.length,o.length,s.length),t._length=t._xlength=t._ylength=t._zlength=i),i}});var hIe=ye((Agr,fIe)=>{"use strict";var u8t=Dm(),c8t=z0();fIe.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return u8t(n,r),c8t(t,r),n}});var vIe=ye((Sgr,dIe)=>{dIe.exports=f8t;function f8t(e,t){if(typeof e!="string")throw new TypeError("must specify type string");if(t=t||{},typeof document=="undefined"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");typeof t.width=="number"&&(r.width=t.width),typeof t.height=="number"&&(r.height=t.height);var n=t,i;try{var a=[e];e.indexOf("webgl")===0&&a.push("experimental-"+e);for(var o=0;o{var h8t=vIe();pIe.exports=function(t){return h8t("webgl",t)}});var qX=ye((Egr,yIe)=>{"use strict";var mIe=ka(),d8t=function(){};yIe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=d8t);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var n=document.createElement("div");n.className="no-webgl",n.style.cursor="pointer",n.style.fontSize="24px",n.style.color=mIe.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=mIe.lightLine,n.style["z-index"]=30;var i=document.createElement("p");return i.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",i.style.position="relative",i.style.top="50%",i.style.left="50%",i.style.height="30%",i.style.width="50%",i.style.margin="-15% 0 0 -25%",n.appendChild(i),t.container.appendChild(n),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var bIe=ye((kgr,xIe)=>{"use strict";var Q2=n1(),v8t=Pr(),p8t=["xaxis","yaxis","zaxis"];function _Ie(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],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=[10,10,10],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=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var g8t=_Ie.prototype;g8t.merge=function(e,t){for(var r=this,n=0;n<3;++n){var i=t[p8t[n]];if(!i.visible){r.tickEnable[n]=!1,r.labelEnable[n]=!1,r.lineEnable[n]=!1,r.lineTickEnable[n]=!1,r.gridEnable[n]=!1,r.zeroEnable[n]=!1,r.backgroundEnable[n]=!1;continue}r.labels[n]=e._meta?v8t.templateString(i.title.text,e._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(r.labelColor[n]=Q2(i.title.font.color)),i.title.font.family&&(r.labelFont[n]=i.title.font.family),i.title.font.size&&(r.labelSize[n]=i.title.font.size),i.title.font.weight&&(r.labelFontWeight[n]=i.title.font.weight),i.title.font.style&&(r.labelFontStyle[n]=i.title.font.style),i.title.font.variant&&(r.labelFontVariant[n]=i.title.font.variant)),"showline"in i&&(r.lineEnable[n]=i.showline),"linecolor"in i&&(r.lineColor[n]=Q2(i.linecolor)),"linewidth"in i&&(r.lineWidth[n]=i.linewidth),"showgrid"in i&&(r.gridEnable[n]=i.showgrid),"gridcolor"in i&&(r.gridColor[n]=Q2(i.gridcolor)),"gridwidth"in i&&(r.gridWidth[n]=i.gridwidth),i.type==="log"?r.zeroEnable[n]=!1:"zeroline"in i&&(r.zeroEnable[n]=i.zeroline),"zerolinecolor"in i&&(r.zeroLineColor[n]=Q2(i.zerolinecolor)),"zerolinewidth"in i&&(r.zeroLineWidth[n]=i.zerolinewidth),"ticks"in i&&i.ticks?r.lineTickEnable[n]=!0:r.lineTickEnable[n]=!1,"ticklen"in i&&(r.lineTickLength[n]=r._defaultLineTickLength[n]=i.ticklen),"tickcolor"in i&&(r.lineTickColor[n]=Q2(i.tickcolor)),"tickwidth"in i&&(r.lineTickWidth[n]=i.tickwidth),"tickangle"in i&&(r.tickAngle[n]=i.tickangle==="auto"?-3600:Math.PI*-i.tickangle/180),"showticklabels"in i&&(r.tickEnable[n]=i.showticklabels),"tickfont"in i&&(i.tickfont.color&&(r.tickColor[n]=Q2(i.tickfont.color)),i.tickfont.family&&(r.tickFont[n]=i.tickfont.family),i.tickfont.size&&(r.tickSize[n]=i.tickfont.size),i.tickfont.weight&&(r.tickFontWeight[n]=i.tickfont.weight),i.tickfont.style&&(r.tickFontStyle[n]=i.tickfont.style),i.tickfont.variant&&(r.tickFontVariant[n]=i.tickfont.variant)),"mirror"in i?["ticks","all","allticks"].indexOf(i.mirror)!==-1?(r.lineTickMirror[n]=!0,r.lineMirror[n]=!0):i.mirror===!0?(r.lineTickMirror[n]=!1,r.lineMirror[n]=!0):(r.lineTickMirror[n]=!1,r.lineMirror[n]=!1):r.lineMirror[n]=!1,"showbackground"in i&&i.showbackground!==!1?(r.backgroundEnable[n]=!0,r.backgroundColor[n]=Q2(i.backgroundcolor)):r.backgroundEnable[n]=!1}};function m8t(e,t){var r=new _Ie;return r.merge(e,t),r}xIe.exports=m8t});var AIe=ye((Cgr,TIe)=>{"use strict";var y8t=n1(),_8t=["xaxis","yaxis","zaxis"];function wIe(){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 x8t=wIe.prototype;x8t.merge=function(e){for(var t=0;t<3;++t){var r=e[_8t[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=y8t(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function b8t(e){var t=new wIe;return t.merge(e),t}TIe.exports=b8t});var EIe=ye((Lgr,MIe)=>{"use strict";MIe.exports=M8t;var SIe=ho(),w8t=Pr(),T8t=["xaxis","yaxis","zaxis"],A8t=[0,0,0];function S8t(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],i=new Array(n.length),a=0;a/g," "));i[a]=u,o.tickmode=s}}t.ticks=i;for(var a=0;a<3;++a){A8t[a]=.5*(e.glplot.bounds[0][a]+e.glplot.bounds[1][a]);for(var c=0;c<2;++c)t.bounds[c][a]=e.glplot.bounds[c][a]}e.contourLevels=S8t(i)}});var DIe=ye((Pgr,RIe)=>{"use strict";var LIe=qd().gl_plot3d,E8t=LIe.createCamera,kIe=LIe.createScene,k8t=gIe(),C8t=VL(),uF=Oa(),cp=Pr(),lF=cp.preserveDrawingBuffer(),cF=ho(),Qg=ef(),L8t=n1(),P8t=qX(),I8t=YU(),R8t=bIe(),D8t=AIe(),F8t=EIe(),z8t=Mg().applyAutorangeOptions,nk,sF,PIe=!1;function IIe(e,t){var r=document.createElement("div"),n=e.container;this.graphDiv=e.graphDiv;var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none",r.appendChild(i),this.svgContainer=i,r.id=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=R8t(t,t[this.id]),this.spikeOptions=D8t(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=uF.getComponentMethod("annotations3d","convert"),this.drawAnnotations=uF.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var Sv=IIe.prototype;Sv.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:lF,premultipliedAlpha:!0,antialias:!0},container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:e.camera,pixelRatio:e.pixelRatio};if(e.staticMode){if(!sF&&(nk=document.createElement("canvas"),sF=k8t({canvas:nk,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!sF))throw new Error("error creating static canvas/context for image server");t.gl=sF,t.canvas=nk}return t};var CIe=!0;Sv.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=kIe(t)}catch(n){if(e.staticMode||!CIe||lF)r=!1;else{cp.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{lF=t.glOptions.preserveDrawingBuffer=!0,e.glplot=kIe(t)}catch(i){lF=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return CIe=!1,r};Sv.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=E8t(e.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})};Sv.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return P8t(e);e.traces={},e.make4thDimension();var r=e.graphDiv,n=r.layout,i=function(){var o={};return e.isCameraChanged(n)&&(o[e.id+".camera"]=e.getCamera()),e.isAspectChanged(n)&&(o[e.id+".aspectratio"]=e.glplot.getAspectratio(),n[e.id].aspectmode!=="manual"&&(e.fullSceneLayout.aspectmode=n[e.id].aspectmode=o[e.id+".aspectmode"]="manual")),o},a=function(o){if(o.fullSceneLayout.dragmode!==!1){var s=i();o.saveLayout(n),o.graphDiv.emit("plotly_relayout",s)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",function(){a(e)}),e.glplot.canvas.addEventListener("touchstart",function(){PIe=!0}),e.glplot.canvas.addEventListener("wheel",function(o){if(r._context._scrollZoom.gl3d){if(e.camera._ortho){var s=o.deltaX>o.deltaY?1.1:.9090909090909091,l=e.glplot.getAspectratio();e.glplot.setAspectratio({x:s*l.x,y:s*l.y,z:s*l.z})}a(e)}},C8t?{passive:!1}:!1),e.glplot.canvas.addEventListener("mousemove",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var o=i();e.graphDiv.emit("plotly_relayouting",o)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(o){r&&r.emit&&r.emit("plotly_webglcontextlost",{event:o,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0};Sv.render=function(){var e=this,t=e.graphDiv,r,n=e.svgContainer,i=e.container.getBoundingClientRect();t._fullLayout._calcInverseTransform(t);var a=t._fullLayout._invScaleX,o=t._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),F8t(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,f=e.glplot.selection,h=0;h")):r.type==="isosurface"||r.type==="volume"?(p.valueLabel=cF.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),x.push("value: "+p.valueLabel),f.textLabel&&x.push(f.textLabel),L=x.join("
")):L=f.textLabel;var C={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:m._input,fullData:m,curveNumber:m.index,pointNumber:b};Qg.appendArrayPointValue(C,m,b),r._module.eventData&&(C=m._module.eventData(C,f,m,{},b));var S={points:[C]};if(e.fullSceneLayout.hovermode){var g=[];Qg.loneHover({trace:m,x:(.5+.5*v[0]/v[3])*s,y:(.5-.5*v[1]/v[3])*l,xLabel:p.xLabel,yLabel:p.yLabel,zLabel:p.zLabel,text:L,name:c.name,color:Qg.castHoverOption(m,b,"bgcolor")||c.color,borderColor:Qg.castHoverOption(m,b,"bordercolor"),fontFamily:Qg.castHoverOption(m,b,"font.family"),fontSize:Qg.castHoverOption(m,b,"font.size"),fontColor:Qg.castHoverOption(m,b,"font.color"),nameLength:Qg.castHoverOption(m,b,"namelength"),textAlign:Qg.castHoverOption(m,b,"align"),hovertemplate:cp.castOption(m,b,"hovertemplate"),hovertemplateLabels:cp.extendFlat({},C,p),eventData:[C]},{container:n,gd:t,inOut_bbox:g}),C.bbox=g[0]}f.distance<5&&(f.buttons||PIe)?t.emit("plotly_click",S):t.emit("plotly_hover",S),this.oldEventData=S}else Qg.loneUnhover(n),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};Sv.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){cp.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var ak=["xaxis","yaxis","zaxis"];function q8t(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var a=ak[i],o=a.charAt(0),s=n[a],l=t[o],u=t[o+"calendar"],c=t["_"+o+"length"];if(!cp.isArrayOrTypedArray(l))r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],c-1);else for(var f,h=0;h<(c||l.length);h++)if(cp.isArrayOrTypedArray(l[h]))for(var d=0;dm[1][o])m[0][o]=-1,m[1][o]=1;else{var E=m[1][o]-m[0][o];m[0][o]-=E/32,m[1][o]+=E/32}if(k=[m[0][o],m[1][o]],k=z8t(k,l),m[0][o]=k[0],m[1][o]=k[1],l.isReversed()){var z=m[0][o];m[0][o]=m[1][o],m[1][o]=z}}else k=l.range,m[0][o]=l.r2l(k[0]),m[1][o]=l.r2l(k[1]);m[0][o]===m[1][o]&&(m[0][o]-=1,m[1][o]+=1),b[o]=m[1][o]-m[0][o],l.range=[m[0][o],m[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*d[o],max:l.range[1]*d[o]})}var q,V=c.aspectmode;if(V==="cube")q=[1,1,1];else if(V==="manual"){var G=c.aspectratio;q=[G.x,G.y,G.z]}else if(V==="auto"||V==="data"){var Z=[1,1,1];for(o=0;o<3;++o){l=c[ak[o]],u=l.type;var j=p[u];Z[o]=Math.pow(j.acc,1/j.count)/d[o]}V==="data"||Math.max.apply(null,Z)/Math.min.apply(null,Z)<=4?q=Z:q=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=f.aspectratio.x=q[0],c.aspectratio.y=f.aspectratio.y=q[1],c.aspectratio.z=f.aspectratio.z=q[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var N=c.domain||null,H=t._size||null;if(N&&H){var ie=n.container.style;ie.position="absolute",ie.left=H.l+N.x[0]*H.w+"px",ie.top=H.t+(1-N.y[1])*H.h+"px",ie.width=H.w*(N.x[1]-N.x[0])+"px",ie.height=H.h*(N.y[1]-N.y[0])+"px"}n.glplot.redraw()}};Sv.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)};function B8t(e){return[[e.eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]}function N8t(e){return{up:{x:e.up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:e._ortho===!0?"orthographic":"perspective"}}}Sv.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),N8t(e.camera)};Sv.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,B8t(r)),t.glplot.setAspectratio(e.aspectratio);var n=r.projection.type==="orthographic",i=t.camera._ortho;n!==i&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())};Sv.isCameraChanged=function(e){var t=this,r=t.getCamera(),n=cp.nestedProperty(e,t.id+".camera"),i=n.get();function a(u,c,f,h){var d=["up","center","eye"],v=["x","y","z"];return c[d[f]]&&u[d[f]][v[h]]===c[d[f]][v[h]]}var o=!1;if(i===void 0)o=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!a(r,i,s,l)){o=!0;break}(!i.projection||r.projection&&r.projection.type!==i.projection.type)&&(o=!0)}return o};Sv.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),n=cp.nestedProperty(e,t.id+".aspectratio"),i=n.get();return i===void 0||i.x!==r.x||i.y!==r.y||i.z!==r.z};Sv.saveLayout=function(e){var t=this,r=t.fullLayout,n,i,a,o,s,l,u=t.isCameraChanged(e),c=t.isAspectChanged(e),f=u||c;if(f){var h={};if(u&&(n=t.getCamera(),i=cp.nestedProperty(e,t.id+".camera"),a=i.get(),h[t.id+".camera"]=a),c&&(o=t.glplot.getAspectratio(),s=cp.nestedProperty(e,t.id+".aspectratio"),l=s.get(),h[t.id+".aspectratio"]=l),uF.call("_storeDirectGUIEdit",e,r._preGUI,h),u){i.set(n);var d=cp.nestedProperty(r,t.id+".camera");d.set(n)}if(c){s.set(o);var v=cp.nestedProperty(r,t.id+".aspectratio");v.set(o),t.glplot.redraw()}}return f};Sv.updateFx=function(e,t){var r=this,n=r.camera;if(n)if(e==="orbit")n.mode="orbit",n.keyBindingMode="rotate";else if(e==="turntable"){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var c=r.id+".camera.up",f={x:0,y:0,z:1},h={};h[c]=f;var d=i.layout;uF.call("_storeDirectGUIEdit",d,a._preGUI,h),o.up=f,cp.nestedProperty(d,c).set(f)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function U8t(e,t,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}Sv.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(nk),t.glplot.redraw();var r=t.glplot.gl,n=r.drawingBufferWidth,i=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var a=new Uint8Array(n*i*4);r.readPixels(0,0,n,i,r.RGBA,r.UNSIGNED_BYTE,a),U8t(a,n,i),V8t(a,n,i);var o=document.createElement("canvas");o.width=n,o.height=i;var s=o.getContext("2d",{willReadFrequently:!0}),l=s.createImageData(n,i);l.data.set(a),s.putImageData(l,0,0);var u;switch(e){case"jpeg":u=o.toDataURL("image/jpeg");break;case"webp":u=o.toDataURL("image/webp");break;default:u=o.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(nk),u};Sv.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[ak[t]];cF.setConvert(r,e.fullLayout),r.setScale=cp.noop}};Sv.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},cF.setConvert(e._mockAxis,r)};RIe.exports=IIe});var zIe=ye((Igr,FIe)=>{"use strict";FIe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var BX=ye((Rgr,qIe)=>{"use strict";var G8t=ka(),xs=Rd(),OX=Ao().extendFlat,H8t=mc().overrideAll;qIe.exports=H8t({visible:xs.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:G8t.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:xs.color,categoryorder:xs.categoryorder,categoryarray:xs.categoryarray,title:{text:xs.title.text,font:xs.title.font},type:OX({},xs.type,{values:["-","linear","log","date","category"]}),autotypenumbers:xs.autotypenumbers,autorange:xs.autorange,autorangeoptions:{minallowed:xs.autorangeoptions.minallowed,maxallowed:xs.autorangeoptions.maxallowed,clipmin:xs.autorangeoptions.clipmin,clipmax:xs.autorangeoptions.clipmax,include:xs.autorangeoptions.include,editType:"plot"},rangemode:xs.rangemode,minallowed:xs.minallowed,maxallowed:xs.maxallowed,range:OX({},xs.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:xs.minor.tickmode,nticks:xs.nticks,tick0:xs.tick0,dtick:xs.dtick,tickvals:xs.tickvals,ticktext:xs.ticktext,ticks:xs.ticks,mirror:xs.mirror,ticklen:xs.ticklen,tickwidth:xs.tickwidth,tickcolor:xs.tickcolor,showticklabels:xs.showticklabels,labelalias:xs.labelalias,tickfont:xs.tickfont,tickangle:xs.tickangle,tickprefix:xs.tickprefix,showtickprefix:xs.showtickprefix,ticksuffix:xs.ticksuffix,showticksuffix:xs.showticksuffix,showexponent:xs.showexponent,exponentformat:xs.exponentformat,minexponent:xs.minexponent,separatethousands:xs.separatethousands,tickformat:xs.tickformat,tickformatstops:xs.tickformatstops,hoverformat:xs.hoverformat,showline:xs.showline,linecolor:xs.linecolor,linewidth:xs.linewidth,showgrid:xs.showgrid,gridcolor:OX({},xs.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:xs.gridwidth,zeroline:xs.zeroline,zerolinecolor:xs.zerolinecolor,zerolinewidth:xs.zerolinewidth},"plot","from-root")});var GX=ye((Dgr,OIe)=>{"use strict";var NX=BX(),j8t=Cc().attributes,UX=Ao().extendFlat,W8t=Pr().counterRegex;function VX(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}OIe.exports={_arrayAttrRegexps:[W8t("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:UX(VX(0,0,1),{}),center:UX(VX(0,0,0),{}),eye:UX(VX(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:j8t({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:NX,yaxis:NX,zaxis:NX,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"}});var VIe=ye((Fgr,UIe)=>{"use strict";var X8t=fd().mix,BIe=Pr(),Z8t=vl(),Y8t=BX(),K8t=RU(),J8t=h4(),NIe=["xaxis","yaxis","zaxis"],$8t=100*136/187;UIe.exports=function(t,r,n){var i,a;function o(u,c){return BIe.coerce(i,a,Y8t,u,c)}for(var s=0;s{"use strict";var Q8t=Pr(),eRt=ka(),tRt=Oa(),rRt=q_(),iRt=VIe(),GIe=GX(),nRt=Id().getSubplotData,HIe="gl3d";jIe.exports=function(t,r,n){var i=r._basePlotModules.length>1;function a(o){if(!i){var s=Q8t.validate(t[o],GIe[o]);if(s)return t[o]}}rRt(t,r,n,{type:HIe,attributes:GIe,handleDefaults:aRt,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:a,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function aRt(e,t,r,n){for(var i=r("bgcolor"),a=eRt.combine(i,n.paper_bgcolor),o=["up","center","eye"],s=0;s.999)&&(h="turntable")}else h="turntable";r("dragmode",h),r("hovermode",n.getDfltFromLayout("hovermode"))}});var lx=ye(fp=>{"use strict";var oRt=mc().overrideAll,sRt=W1(),lRt=DIe(),uRt=Id().getSubplotData,cRt=Pr(),fRt=Wp(),YA="gl3d",HX="scene";fp.name=YA;fp.attr=HX;fp.idRoot=HX;fp.idRegex=fp.attrRegex=cRt.counterRegex("scene");fp.attributes=zIe();fp.layoutAttributes=GX();fp.baseLayoutAttrOverrides=oRt({hoverlabel:sRt.hoverlabel},"plot","nested");fp.supplyLayoutDefaults=WIe();fp.plot=function(t){for(var r=t._fullLayout,n=t._fullData,i=r._subplots[YA],a=0;a{"use strict";XIe.exports={plot:iIe(),attributes:FX(),markerSymbols:aF(),supplyDefaults:cIe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:hIe(),moduleType:"trace",name:"scatter3d",basePlotModule:lx(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var KIe=ye((Bgr,YIe)=>{"use strict";YIe.exports=ZIe()});var ok=ye((Ngr,QIe)=>{"use strict";var JIe=ka(),hRt=Tu(),jX=vf().axisHoverFormat,{hovertemplateAttrs:dRt,templatefallbackAttrs:vRt}=Ll(),$Ie=Gl(),WX=Ao().extendFlat,pRt=mc().overrideAll;function XX(e){return{valType:"boolean",dflt:!1}}function ZX(e){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:XX("x"),y:XX("y"),z:XX("z")},color:{valType:"color",dflt:JIe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:JIe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var YX=QIe.exports=pRt(WX({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:dRt(),hovertemplatefallback:vRt(),xhoverformat:jX("x"),yhoverformat:jX("y"),zhoverformat:jX("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},hRt("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:ZX("x"),y:ZX("y"),z:ZX("z")},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,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:WX({},$Ie.hoverinfo),showlegend:WX({},$Ie.showlegend,{dflt:!1})}),"calc","nested");YX.x.editType=YX.y.editType=YX.z.editType="calc+clearAxisTypes"});var JX=ye((Ugr,r8e)=>{"use strict";var gRt=Oa(),e8e=Pr(),mRt=td(),yRt=ok(),KX=.1;function _Rt(e,t){for(var r=[],n=32,i=0;i{"use strict";var i8e=gv();n8e.exports=function(t,r){r.surfacecolor?i8e(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):i8e(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var f8e=ye((Ggr,c8e)=>{"use strict";var wRt=qd().gl_surface3d,KA=qd().ndarray,TRt=qd().ndarray_linear_interpolate.d2,ARt=f8(),SRt=h8(),sk=Pr().isArrayOrTypedArray,MRt=a1().parseColorScale,o8e=n1(),ERt=tc().extractOpts;function l8e(e,t,r){this.scene=e,this.uid=r,this.surface=t,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 em=l8e.prototype;em.getXat=function(e,t,r,n){var i=sk(this.data.x)?sk(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?i:n.d2l(i,0,r)};em.getYat=function(e,t,r,n){var i=sk(this.data.y)?sk(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?i:n.d2l(i,0,r)};em.getZat=function(e,t,r,n){var i=this.data.z[t][e];return i===null&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[t][e]),r===void 0?i:n.d2l(i,0,r)};em.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,i],e.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],e.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=e.dataCoordinate[a];o!=null&&(e.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return sk(s)&&s[i]&&s[i][n]!==void 0?e.textLabel=s[i][n]:s?e.textLabel=s:e.textLabel="",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};function kRt(e){var t=e[0].rgb,r=e[e.length-1].rgb;return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]&&t[3]===r[3]}var JA=[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 CRt(e,t){if(e0){r=JA[n];break}return r}function PRt(e,t){if(!(e<1||t<1)){for(var r=$X(e),n=$X(t),i=1,a=0;afF;)n--,n/=LRt(n),n++,n1?i:1};function RRt(e,t,r){var n=r[8]+r[2]*t[0]+r[5]*t[1];return e[0]=(r[6]+r[0]*t[0]+r[3]*t[1])/n,e[1]=(r[7]+r[1]*t[0]+r[4]*t[1])/n,e}function DRt(e,t,r){return FRt(e,t,RRt,r),e}function FRt(e,t,r,n){for(var i=[0,0],a=e.shape[0],o=e.shape[1],s=0;s0&&this.contourStart[n]!==null&&this.contourEnd[n]!==null&&this.contourEnd[n]>this.contourStart[n]))for(t[n]=!0,i=this.contourStart[n];ih&&(this.minValues[u]=h),this.maxValues[u]{"use strict";h8e.exports={attributes:ok(),supplyDefaults:JX().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:a8e(),plot:f8e(),moduleType:"trace",name:"surface",basePlotModule:lx(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var p8e=ye((jgr,v8e)=>{"use strict";v8e.exports=d8e()});var $A=ye((Wgr,m8e)=>{"use strict";var ORt=Tu(),QX=vf().axisHoverFormat,{hovertemplateAttrs:BRt,templatefallbackAttrs:NRt}=Ll(),ux=ok(),g8e=Gl(),cx=Ao().extendFlat;m8e.exports=cx({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:BRt({editType:"calc"}),hovertemplatefallback:NRt({editType:"calc"}),xhoverformat:QX("x"),yhoverformat:QX("y"),zhoverformat:QX("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"}},ORt("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:ux.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:cx({},ux.contours.x.show,{}),color:ux.contours.x.color,width:ux.contours.x.width,editType:"calc"},lightposition:{x:cx({},ux.lightposition.x,{dflt:1e5}),y:cx({},ux.lightposition.y,{dflt:1e5}),z:cx({},ux.lightposition.z,{dflt:0}),editType:"calc"},lighting:cx({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},ux.lighting),hoverinfo:cx({},g8e.hoverinfo,{editType:"calc"}),showlegend:cx({},g8e.showlegend,{dflt:!1})})});var dF=ye((Xgr,_8e)=>{"use strict";var URt=Tu(),hF=vf().axisHoverFormat,{hovertemplateAttrs:VRt,templatefallbackAttrs:GRt}=Ll(),lk=$A(),y8e=Gl(),eZ=Ao().extendFlat,HRt=mc().overrideAll;function tZ(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function rZ(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var QA=_8e.exports=HRt(eZ({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:tZ("x"),y:tZ("y"),z:tZ("z")},caps:{x:rZ("x"),y:rZ("y"),z:rZ("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:VRt(),hovertemplatefallback:GRt(),xhoverformat:hF("x"),yhoverformat:hF("y"),zhoverformat:hF("z"),valuehoverformat:hF("value",1),showlegend:eZ({},y8e.showlegend,{dflt:!1})},URt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:lk.opacity,lightposition:lk.lightposition,lighting:lk.lighting,flatshading:lk.flatshading,contour:lk.contour,hoverinfo:eZ({},y8e.hoverinfo)}),"calc","nested");QA.flatshading.dflt=!0;QA.lighting.facenormalsepsilon.dflt=0;QA.x.editType=QA.y.editType=QA.z.editType=QA.value.editType="calc+clearAxisTypes"});var iZ=ye((Zgr,b8e)=>{"use strict";var jRt=Pr(),WRt=Oa(),XRt=dF(),ZRt=td();function YRt(e,t,r,n){function i(a,o){return jRt.coerce(e,t,XRt,a,o)}x8e(e,t,r,n,i)}function x8e(e,t,r,n,i){var a=i("isomin"),o=i("isomax");o!=null&&a!==void 0&&a!==null&&a>o&&(t.isomin=null,t.isomax=null);var s=i("x"),l=i("y"),u=i("z"),c=i("value");if(!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length){t.visible=!1;return}var f=WRt.getComponentMethod("calendars","handleTraceDefaults");f(e,t,["x","y","z"],n),i("valuehoverformat"),["x","y","z"].forEach(function(m){i(m+"hoverformat");var b="caps."+m,p=i(b+".show");p&&i(b+".fill");var k="slices."+m,M=i(k+".show");M&&(i(k+".fill"),i(k+".locations"))});var h=i("spaceframe.show");h&&i("spaceframe.fill");var d=i("surface.show");d&&(i("surface.count"),i("surface.fill"),i("surface.pattern"));var v=i("contour.show");v&&(i("contour.color"),i("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(m){i(m)}),ZRt(e,t,n,i,{prefix:"",cLetter:"c"}),t._length=null}b8e.exports={supplyDefaults:YRt,supplyIsoDefaults:x8e}});var vF=ye((Ygr,T8e)=>{"use strict";var aZ=Pr(),KRt=gv();function JRt(e,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=$m(t.u,t._len),t._v=$m(t.v,t._len),t._w=$m(t.w,t._len),t._x=$m(t.x,t._len),t._y=$m(t.y,t._len),t._z=$m(t.z,t._len);var r=w8e(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;var n=0,i,a,o;t.starts&&(i=$m(t.starts.x||[]),a=$m(t.starts.y||[]),o=$m(t.starts.z||[]),n=Math.min(i.length,a.length,o.length)),t._startsX=i||[],t._startsY=a||[],t._startsZ=o||[];var s=0,l=1/0,u;for(u=0;u1&&(M=t[i-1],L=r[i-1],C=n[i-1]),a=0;aM?"-":"+")+"x"),v=v.replace("y",(T>L?"-":"+")+"y"),v=v.replace("z",(x>C?"-":"+")+"z");var E=function(){i=0,S=[],g=[],P=[]};(!i||i{"use strict";var $Rt=gv(),QRt=vF().processGrid,pF=vF().filter;A8e.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=pF(r.x,r._len),r._y=pF(r.y,r._len),r._z=pF(r.z,r._len),r._value=pF(r.value,r._len);var n=QRt(r);r._gridFill=n.fill,r._Xs=n.Xs,r._Ys=n.Ys,r._Zs=n.Zs,r._len=n.len;for(var i=1/0,a=-1/0,o=0;o{"use strict";S8e.exports=function(t,r,n,i){i=i||t.length;for(var a=new Array(i),o=0;o{"use strict";var eDt=qd().gl_mesh3d,tDt=a1().parseColorScale,rDt=Pr().isArrayOrTypedArray,iDt=n1(),nDt=tc().extractOpts,M8e=e5(),uk=function(e,t){for(var r=t.length-1;r>0;r--){var n=Math.min(t[r],t[r-1]),i=Math.max(t[r],t[r-1]);if(i>n&&n-1}function ae(St,Tt){return St===null?Tt:St}function _e(St,Tt,dt){E();var Et=[Tt],pt=[dt];if(j>=1)Et=[Tt],pt=[dt];else if(j>0){var jt=H(Tt,dt);Et=jt.xyzv,pt=jt.abc}for(var or=0;or-1?dt[Ar]:P(ei,qr,jr);Ge>-1?mr[Ar]=Ge:mr[Ar]=q(ei,qr,jr,ae(St,gt))}V(mr[0],mr[1],mr[2])}}function Ee(St,Tt,dt){var Et=function(pt,jt,or){_e(St,[Tt[pt],Tt[jt],Tt[or]],[dt[pt],dt[jt],dt[or]])};Et(0,1,2),Et(2,3,0)}function Ce(St,Tt,dt){var Et=function(pt,jt,or){_e(St,[Tt[pt],Tt[jt],Tt[or]],[dt[pt],dt[jt],dt[or]])};Et(0,1,2),Et(3,0,1),Et(2,3,0),Et(1,2,3)}function ge(St,Tt,dt,Et){var pt=St[3];ptEt&&(pt=Et);for(var jt=(St[3]-pt)/(St[3]-Tt[3]+1e-9),or=[],mr=0;mr<4;mr++)or[mr]=(1-jt)*St[mr]+jt*Tt[mr];return or}function re(St,Tt,dt){return St>=Tt&&St<=dt}function Se(St){var Tt=.001*(L-T);return St>=T-Tt&&St<=L+Tt}function ke(St){for(var Tt=[],dt=0;dt<4;dt++){var Et=St[dt];Tt.push([e._x[Et],e._y[Et],e._z[Et],e._value[Et]])}return Tt}var be=3;function Be(St,Tt,dt,Et,pt,jt){jt||(jt=1),dt=[-1,-1,-1];var or=!1,mr=[re(Tt[0][3],Et,pt),re(Tt[1][3],Et,pt),re(Tt[2][3],Et,pt)];if(!mr[0]&&!mr[1]&&!mr[2])return!1;var Ar=function(qr,jr,gt){return Se(jr[0][3])&&Se(jr[1][3])&&Se(jr[2][3])?(_e(qr,jr,gt),!0):jtmr?[k,jt]:[jt,M];Vt(Tt,Ar[0],Ar[1])}}var ei=[[Math.min(T,M),Math.max(T,M)],[Math.min(k,L),Math.max(k,L)]];["x","y","z"].forEach(function(qr){for(var jr=[],gt=0;gt0&&(At.push(Mr.id),qr==="x"?Kt.push([Mr.distRatio,0,0]):qr==="y"?Kt.push([0,Mr.distRatio,0]):Kt.push([0,0,Mr.distRatio]))}else qr==="x"?xt=Ue(1,d-1):qr==="y"?xt=Ue(1,v-1):xt=Ue(1,m-1);At.length>0&&(qr==="x"?jr[Ge]=rr(St,At,Je,We,Kt,jr[Ge]):qr==="y"?jr[Ge]=tt(St,At,Je,We,Kt,jr[Ge]):jr[Ge]=je(St,At,Je,We,Kt,jr[Ge]),Ge++),xt.length>0&&(qr==="x"?jr[Ge]=mt(St,xt,Je,We,jr[Ge]):qr==="y"?jr[Ge]=Ht(St,xt,Je,We,jr[Ge]):jr[Ge]=at(St,xt,Je,We,jr[Ge]),Ge++)}var Gr=e.caps[qr];Gr.show&&Gr.fill&&(N(Gr.fill),qr==="x"?jr[Ge]=mt(St,[0,d-1],Je,We,jr[Ge]):qr==="y"?jr[Ge]=Ht(St,[0,v-1],Je,We,jr[Ge]):jr[Ge]=at(St,[0,m-1],Je,We,jr[Ge]),Ge++)}}),s===0&&z(),e._meshX=x,e._meshY=C,e._meshZ=S,e._meshIntensity=g,e._Xs=c,e._Ys=f,e._Zs=h}return rt(),e}function oDt(e,t){var r=e.glplot.gl,n=eDt({gl:r}),i=new E8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}C8e.exports={findNearestOnAxis:uk,generateIsoMeshes:k8e,createIsosurfaceTrace:oDt}});var P8e=ye((Qgr,L8e)=>{"use strict";L8e.exports={attributes:dF(),supplyDefaults:iZ().supplyDefaults,calc:oZ(),colorbar:{min:"cmin",max:"cmax"},plot:gF().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:lx(),categories:["gl3d","showLegend"],meta:{}}});var R8e=ye((emr,I8e)=>{"use strict";I8e.exports=P8e()});var uZ=ye((tmr,F8e)=>{"use strict";var sDt=Tu(),xh=dF(),lDt=ok(),D8e=Gl(),lZ=Ao().extendFlat,uDt=mc().overrideAll,mF=F8e.exports=uDt(lZ({x:xh.x,y:xh.y,z:xh.z,value:xh.value,isomin:xh.isomin,isomax:xh.isomax,surface:xh.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:xh.slices,caps:xh.caps,text:xh.text,hovertext:xh.hovertext,xhoverformat:xh.xhoverformat,yhoverformat:xh.yhoverformat,zhoverformat:xh.zhoverformat,valuehoverformat:xh.valuehoverformat,hovertemplate:xh.hovertemplate,hovertemplatefallback:xh.hovertemplatefallback},sDt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:xh.colorbar,opacity:xh.opacity,opacityscale:lDt.opacityscale,lightposition:xh.lightposition,lighting:xh.lighting,flatshading:xh.flatshading,contour:xh.contour,hoverinfo:lZ({},D8e.hoverinfo),showlegend:lZ({},D8e.showlegend,{dflt:!1})}),"calc","nested");mF.x.editType=mF.y.editType=mF.z.editType=mF.value.editType="calc+clearAxisTypes"});var q8e=ye((rmr,z8e)=>{"use strict";var cDt=Pr(),fDt=uZ(),hDt=iZ().supplyIsoDefaults,dDt=JX().opacityscaleDefaults;z8e.exports=function(t,r,n,i){function a(o,s){return cDt.coerce(t,r,fDt,o,s)}hDt(t,r,n,i,a),dDt(t,r,i,a)}});var U8e=ye((imr,N8e)=>{"use strict";var vDt=qd().gl_mesh3d,pDt=a1().parseColorScale,gDt=Pr().isArrayOrTypedArray,mDt=n1(),yDt=tc().extractOpts,O8e=e5(),cZ=gF().findNearestOnAxis,_Dt=gF().generateIsoMeshes;function B8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var fZ=B8e.prototype;fZ.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],i=this.data._meshZ[t],a=this.data._Ys.length,o=this.data._Zs.length,s=cZ(r,this.data._Xs).id,l=cZ(n,this.data._Ys).id,u=cZ(i,this.data._Zs).id,c=e.index=u+o*l+o*a*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return gDt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};fZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=_Dt(e);function n(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var i=O8e(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),a=O8e(e._meshI,e._meshJ,e._meshK),o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:mDt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=yDt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=pDt(e),this.mesh.update(o)};fZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function xDt(e,t){var r=e.glplot.gl,n=vDt({gl:r}),i=new B8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}N8e.exports=xDt});var G8e=ye((nmr,V8e)=>{"use strict";V8e.exports={attributes:uZ(),supplyDefaults:q8e(),calc:oZ(),colorbar:{min:"cmin",max:"cmax"},plot:U8e(),moduleType:"trace",name:"volume",basePlotModule:lx(),categories:["gl3d","showLegend"],meta:{}}});var j8e=ye((amr,H8e)=>{"use strict";H8e.exports=G8e()});var Z8e=ye((omr,X8e)=>{"use strict";var bDt=Oa(),W8e=Pr(),wDt=td(),TDt=$A();X8e.exports=function(t,r,n,i){function a(c,f){return W8e.coerce(t,r,TDt,c,f)}function o(c){var f=c.map(function(h){var d=a(h);return d&&W8e.isArrayOrTypedArray(d)?d:null});return f.every(function(h){return h&&h.length===f[0].length})&&f}var s=o(["x","y","z"]);if(!s){r.visible=!1;return}if(o(["i","j","k"]),r.i&&(!r.j||!r.k)||r.j&&(!r.k||!r.i)||r.k&&(!r.i||!r.j)){r.visible=!1;return}var l=bDt.getComponentMethod("calendars","handleTraceDefaults");l(t,r,["x","y","z"],i),["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(c){a(c)});var u=a("contour.show");u&&(a("contour.color"),a("contour.width")),"intensity"in t?(a("intensity"),a("intensitymode"),wDt(t,r,i,a,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?a("facecolor"):"vertexcolor"in t?a("vertexcolor"):a("color",n)),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var K8e=ye((smr,Y8e)=>{"use strict";var ADt=gv();Y8e.exports=function(t,r){r.intensity&&ADt(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var tRe=ye((lmr,eRe)=>{"use strict";var SDt=qd().gl_mesh3d,MDt=qd().delaunay_triangulate,EDt=qd().alpha_shape,kDt=qd().convex_hull,CDt=a1().parseColorScale,LDt=Pr().isArrayOrTypedArray,pZ=n1(),PDt=tc().extractOpts,J8e=e5();function Q8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var gZ=Q8e.prototype;gZ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return LDt(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function $8e(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}gZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,i=J8e(hZ(r.xaxis,e.x,t.dataScale[0],e.xcalendar),hZ(r.yaxis,e.y,t.dataScale[1],e.ycalendar),hZ(r.zaxis,e.z,t.dataScale[2],e.zcalendar)),a;if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!vZ(e.i,n)||!vZ(e.j,n)||!vZ(e.k,n))return;a=J8e(dZ(e.i),dZ(e.j),dZ(e.k))}else e.alphahull===0?a=kDt(i):e.alphahull>0?a=EDt(e.alphahull,i):a=IDt(e.delaunayaxis,i);var o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:pZ(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=PDt(e);this.color="#fff";var l=e.intensitymode;o[l+"Intensity"]=e.intensity,o[l+"IntensityBounds"]=[s.min,s.max],o.colormap=CDt(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=$8e(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=$8e(e.facecolor)):(this.color=e.color,o.meshColor=pZ(e.color));this.mesh.update(o)};gZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function RDt(e,t){var r=e.glplot.gl,n=SDt({gl:r}),i=new Q8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}eRe.exports=RDt});var iRe=ye((umr,rRe)=>{"use strict";rRe.exports={attributes:$A(),supplyDefaults:Z8e(),calc:K8e(),colorbar:{min:"cmin",max:"cmax"},plot:tRe(),moduleType:"trace",name:"mesh3d",basePlotModule:lx(),categories:["gl3d","showLegend"],meta:{}}});var aRe=ye((cmr,nRe)=>{"use strict";nRe.exports=iRe()});var yZ=ye((fmr,sRe)=>{"use strict";var DDt=Tu(),t5=vf().axisHoverFormat,{hovertemplateAttrs:FDt,templatefallbackAttrs:zDt}=Ll(),qDt=$A(),oRe=Gl(),mZ=Ao().extendFlat,yF={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","raw"],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:FDt({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:zDt({editType:"calc"}),uhoverformat:t5("u",1),vhoverformat:t5("v",1),whoverformat:t5("w",1),xhoverformat:t5("x"),yhoverformat:t5("y"),zhoverformat:t5("z"),showlegend:mZ({},oRe.showlegend,{dflt:!1})};mZ(yF,DDt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var ODt=["opacity","lightposition","lighting"];ODt.forEach(function(e){yF[e]=qDt[e]});yF.hoverinfo=mZ({},oRe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});sRe.exports=yF});var uRe=ye((hmr,lRe)=>{"use strict";var BDt=Pr(),NDt=td(),UDt=yZ();lRe.exports=function(t,r,n,i){function a(d,v){return BDt.coerce(t,r,UDt,d,v)}var o=a("u"),s=a("v"),l=a("w"),u=a("x"),c=a("y"),f=a("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}var h=a("sizemode");a("sizeref",h==="raw"?1:.5),a("anchor"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),NDt(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var fRe=ye((dmr,cRe)=>{"use strict";var VDt=gv();cRe.exports=function(t,r){for(var n=r.u,i=r.v,a=r.w,o=Math.min(r.x.length,r.y.length,r.z.length,n.length,i.length,a.length),s=-1/0,l=1/0,u=0;u{"use strict";var GDt=qd().gl_cone3d,HDt=qd().gl_cone3d.createConeMesh,jDt=Pr().simpleMap,WDt=a1().parseColorScale,XDt=tc().extractOpts,ZDt=Pr().isArrayOrTypedArray,hRe=e5();function dRe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var _Z=dRe.prototype;_Z.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],n=this.data.y[t],i=this.data.z[t],a=this.data.u[t],o=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,n,i,a,o,s,Math.sqrt(a*a+o*o+s*s)];var l=this.data.hovertext||this.data.text;return ZDt(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var YDt={xaxis:0,yaxis:1,zaxis:2},KDt={tip:1,tail:0,cm:.25,center:.5},JDt={tip:1,tail:1,cm:.75,center:.5};function vRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i={};function a(c,f){var h=r[f],d=n[YDt[f]];return jDt(c,function(v){return h.d2l(v)*d})}i.vectors=hRe(a(t.u,"xaxis"),a(t.v,"yaxis"),a(t.w,"zaxis"),t._len),i.positions=hRe(a(t.x,"xaxis"),a(t.y,"yaxis"),a(t.z,"zaxis"),t._len);var o=XDt(t);i.colormap=WDt(t),i.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],i.coneOffset=KDt[t.anchor];var s=t.sizemode;s==="scaled"?i.coneSize=t.sizeref||.5:s==="absolute"?i.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5:s==="raw"&&(i.coneSize=t.sizeref),i.coneSizemode=s;var l=GDt(i),u=t.lightposition;return l.lightPosition=[u.x,u.y,u.z],l.ambient=t.lighting.ambient,l.diffuse=t.lighting.diffuse,l.specular=t.lighting.specular,l.roughness=t.lighting.roughness,l.fresnel=t.lighting.fresnel,l.opacity=t.opacity,t._pad=JDt[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}_Z.update=function(e){this.data=e;var t=vRe(this.scene,e);this.mesh.update(t)};_Z.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function $Dt(e,t){var r=e.glplot.gl,n=vRe(e,t),i=HDt(r,n),a=new dRe(e,t.uid);return a.mesh=i,a.data=t,i._trace=a,e.glplot.add(i),a}pRe.exports=$Dt});var yRe=ye((pmr,mRe)=>{"use strict";mRe.exports={moduleType:"trace",name:"cone",basePlotModule:lx(),categories:["gl3d","showLegend"],attributes:yZ(),supplyDefaults:uRe(),colorbar:{min:"cmin",max:"cmax"},calc:fRe(),plot:gRe(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var xRe=ye((gmr,_Re)=>{"use strict";_Re.exports=yRe()});var bZ=ye((mmr,wRe)=>{"use strict";var QDt=Tu(),r5=vf().axisHoverFormat,{hovertemplateAttrs:eFt,templatefallbackAttrs:tFt}=Ll(),rFt=$A(),bRe=Gl(),xZ=Ao().extendFlat,_F={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"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:eFt({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:tFt({editType:"calc"}),uhoverformat:r5("u",1),vhoverformat:r5("v",1),whoverformat:r5("w",1),xhoverformat:r5("x"),yhoverformat:r5("y"),zhoverformat:r5("z"),showlegend:xZ({},bRe.showlegend,{dflt:!1})};xZ(_F,QDt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var iFt=["opacity","lightposition","lighting"];iFt.forEach(function(e){_F[e]=rFt[e]});_F.hoverinfo=xZ({},bRe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});wRe.exports=_F});var ARe=ye((ymr,TRe)=>{"use strict";var nFt=Pr(),aFt=td(),oFt=bZ();TRe.exports=function(t,r,n,i){function a(h,d){return nFt.coerce(t,r,oFt,h,d)}var o=a("u"),s=a("v"),l=a("w"),u=a("x"),c=a("y"),f=a("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}a("starts.x"),a("starts.y"),a("starts.z"),a("maxdisplayed"),a("sizeref"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),aFt(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var IRe=ye((_mr,PRe)=>{"use strict";var ERe=qd().gl_streamtube3d,sFt=ERe.createTubeMesh,lFt=Pr(),uFt=a1().parseColorScale,cFt=tc().extractOpts,SRe=e5(),kRe={xaxis:0,yaxis:1,zaxis:2};function CRe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var TZ=CRe.prototype;TZ.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var l=t[s],u=r[kRe[s]];return l.l2c(o)/u}if(e.object===this.mesh){var i=e.data.position,a=e.data.velocity;return e.traceCoordinate=[n(i[0],"xaxis"),n(i[1],"yaxis"),n(i[2],"zaxis"),n(a[0],"xaxis"),n(a[1],"yaxis"),n(a[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function MRe(e){var t=e.length,r;return t>2?r=e.slice(1,t-1):t===2?r=[(e[0]+e[1])/2]:r=e,r}function wZ(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function LRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i=t._len,a={};function o(z,q){var V=r[q],G=n[kRe[q]];return lFt.simpleMap(z,function(Z){return V.d2l(Z)*G})}if(a.vectors=SRe(o(t._u,"xaxis"),o(t._v,"yaxis"),o(t._w,"zaxis"),i),!i)return{positions:[],cells:[]};var s=o(t._Xs,"xaxis"),l=o(t._Ys,"yaxis"),u=o(t._Zs,"zaxis");a.meshgrid=[s,l,u],a.gridFill=t._gridFill;var c=t._slen;if(c)a.startingPositions=SRe(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var f=l[0],h=MRe(s),d=MRe(u),v=new Array(h.length*d.length),m=0,b=0;b{"use strict";RRe.exports={moduleType:"trace",name:"streamtube",basePlotModule:lx(),categories:["gl3d","showLegend"],attributes:bZ(),supplyDefaults:ARe(),colorbar:{min:"cmin",max:"cmax"},calc:vF().calc,plot:IRe(),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}});var zRe=ye((bmr,FRe)=>{"use strict";FRe.exports=DRe()});var tw=ye((Tmr,URe)=>{"use strict";var{hovertemplateAttrs:hFt,texttemplateAttrs:dFt,templatefallbackAttrs:qRe}=Ll(),vFt=Pg(),Qm=pf(),pFt=Gl(),ORe=Tu(),gFt=Pd().dash,ew=Ao().extendFlat,mFt=mc().overrideAll,rg=Qm.marker,BRe=Qm.line,NRe=rg.line,wmr=["The library used by the *country names* `locationmode` option is changing in an upcoming version.","Country names in existing plots may not work in the new version."].join(" ");URe.exports=mFt({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:ew({},Qm.mode,{dflt:"markers"}),text:ew({},Qm.text,{}),texttemplate:dFt({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:qRe({editType:"plot"}),hovertext:ew({},Qm.hovertext,{}),textfont:Qm.textfont,textposition:Qm.textposition,line:{color:BRe.color,width:BRe.width,dash:gFt},connectgaps:Qm.connectgaps,marker:ew({symbol:rg.symbol,opacity:rg.opacity,angle:rg.angle,angleref:ew({},rg.angleref,{values:["previous","up","north"]}),standoff:rg.standoff,size:rg.size,sizeref:rg.sizeref,sizemin:rg.sizemin,sizemode:rg.sizemode,colorbar:rg.colorbar,line:ew({width:NRe.width,dash:NRe.dash},ORe("marker.line")),gradient:rg.gradient},ORe("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:vFt(),selected:Qm.selected,unselected:Qm.unselected,hoverinfo:ew({},pFt.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:hFt(),hovertemplatefallback:qRe()},"calc","nested")});var GRe=ye((Amr,VRe)=>{"use strict";var xF=Pr(),AZ=Ru(),yFt=$p(),_Ft=D0(),xFt=F0(),bFt=Fg(),wFt=tw(),TFt=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");VRe.exports=function(t,r,n,i){function a(d,v){return xF.coerce(t,r,wFt,d,v)}var o=a("locations"),s;if(o&&o.length){var l=a("geojson"),u;(typeof l=="string"&&l!==""||xF.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="country names"&&xF.warn(TFt),c==="geojson-id"&&a("featureidkey"),s=o.length}else{var f=a("lon")||[],h=a("lat")||[];s=Math.min(f.length,h.length)}if(!s){r.visible=!1;return}r._length=s,a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),AZ.hasMarkers(r)&&yFt(t,r,n,i,a,{gradient:!0}),AZ.hasLines(r)&&(_Ft(t,r,n,i,a),a("connectgaps")),AZ.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),xFt(t,r,i,a)),a("fill"),r.fill!=="none"&&bFt(t,r,n,a),xF.coerceSelectionMarkerOpacity(r,a)}});var WRe=ye((Smr,jRe)=>{"use strict";var HRe=ho();jRe.exports=function(t,r,n){var i={},a=n[r.geo]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=HRe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=HRe.tickText(o,o.c2l(s[1]),!0).text,i}});var bF=ye((Mmr,KRe)=>{"use strict";var SZ=Eo(),XRe=fs().BADNUM,AFt=z0(),SFt=Dm(),MFt=q0(),EFt=Pr().isArrayOrTypedArray,ZRe=Pr()._;function YRe(e){return e&&typeof e=="string"}KRe.exports=function(t,r){var n=EFt(r.locations),i=n?r.locations.length:r._length,a=new Array(i),o;r.geojson?o=function(h){return YRe(h)||SZ(h)}:o=YRe;for(var s=0;s{"use strict";Mv.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"};Mv.axesNames=["lonaxis","lataxis"];Mv.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};Mv.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};Mv.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:"equirectangular",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:"equirectangular",projRotate:[0,0,0]}};Mv.clipPad=.001;Mv.precision=.1;Mv.landColor="#F0DC82";Mv.waterColor="#3399FF";Mv.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};Mv.sphereSVG={type:"Sphere"};Mv.fillLayers={ocean:1,land:1,lakes:1};Mv.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Mv.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];Mv.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];Mv.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var MZ=ye((wF,JRe)=>{(function(e,t){typeof wF=="object"&&typeof JRe!="undefined"?t(wF):(e=e||self,t(e.topojson=e.topojson||{}))})(wF,function(e){"use strict";function t(M){return M}function r(M){if(M==null)return t;var T,L,x=M.scale[0],C=M.scale[1],S=M.translate[0],g=M.translate[1];return function(P,E){E||(T=L=0);var z=2,q=P.length,V=new Array(q);for(V[0]=(T+=P[0])*x+S,V[1]=(L+=P[1])*C+g;zS&&(S=z[0]),z[1]g&&(g=z[1])}function E(z){switch(z.type){case"GeometryCollection":z.geometries.forEach(E);break;case"Point":P(z.coordinates);break;case"MultiPoint":z.coordinates.forEach(P);break}}M.arcs.forEach(function(z){for(var q=-1,V=z.length,G;++qS&&(S=G[0]),G[1]g&&(g=G[1])});for(L in M.objects)E(M.objects[L]);return[x,C,S,g]}function i(M,T){for(var L,x=M.length,C=x-T;C<--x;)L=M[C],M[C++]=M[x],M[x]=L}function a(M,T){return typeof T=="string"&&(T=M.objects[T]),T.type==="GeometryCollection"?{type:"FeatureCollection",features:T.geometries.map(function(L){return o(M,L)})}:o(M,T)}function o(M,T){var L=T.id,x=T.bbox,C=T.properties==null?{}:T.properties,S=s(M,T);return L==null&&x==null?{type:"Feature",properties:C,geometry:S}:x==null?{type:"Feature",id:L,properties:C,geometry:S}:{type:"Feature",id:L,bbox:x,properties:C,geometry:S}}function s(M,T){var L=r(M.transform),x=M.arcs;function C(q,V){V.length&&V.pop();for(var G=x[q<0?~q:q],Z=0,j=G.length;Z1)x=f(M,T,L);else for(C=0,x=new Array(S=M.arcs.length);C1)for(var V=1,G=P(z[0]),Z,j;VG&&(j=z[0],z[0]=z[V],z[V]=j,G=Z);return z}).filter(function(E){return E.length>0})}}function m(M,T){for(var L=0,x=M.length;L>>1;M[C]=2))throw new Error("n must be \u22652");E=M.bbox||n(M);var L=E[0],x=E[1],C=E[2],S=E[3],g;T={scale:[C-L?(C-L)/(g-1):1,S-x?(S-x)/(g-1):1],translate:[L,x]}}else E=M.bbox;var P=p(T),E,z,q=M.objects,V={};function G(N){return P(N)}function Z(N){var H;switch(N.type){case"GeometryCollection":H={type:"GeometryCollection",geometries:N.geometries.map(Z)};break;case"Point":H={type:"Point",coordinates:G(N.coordinates)};break;case"MultiPoint":H={type:"MultiPoint",coordinates:N.coordinates.map(G)};break;default:return N}return N.id!=null&&(H.id=N.id),N.bbox!=null&&(H.bbox=N.bbox),N.properties!=null&&(H.properties=N.properties),H}function j(N){var H=0,ie=1,ae=N.length,_e,Ee=new Array(ae);for(Ee[0]=P(N[0],0);++H{"use strict";var EZ=$Re.exports={},kFt=ck().locationmodeToLayer,CFt=MZ().feature;EZ.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};EZ.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`};EZ.getTopojsonFeatures=function(e,t){var r=kFt[e.locationmode],n=t.objects[r];return CFt(t,n).features}});var fx=ye(fk=>{"use strict";var LFt=fs().BADNUM;fk.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,n=[],i=[],a=0;a0&&(n.push(i),i=[])}return i.length>0&&n.push(i),n};fk.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};fk.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{QRe.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|\xE7)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|\xE9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xE9)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|\xE3)o.?tom(e|\xE9)",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"}});var MF=ye(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var qp=63710088e-1,CZ={centimeters:qp*100,centimetres:qp*100,degrees:360/(2*Math.PI),feet:qp*3.28084,inches:qp*39.37,kilometers:qp/1e3,kilometres:qp/1e3,meters:qp,metres:qp,miles:qp/1609.344,millimeters:qp*1e3,millimetres:qp*1e3,nauticalmiles:qp/1852,radians:1,yards:qp*1.0936},kZ={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function hx(e,t,r={}){let n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function PFt(e,t,r={}){switch(e){case"Point":return LZ(t).geometry;case"LineString":return IZ(t).geometry;case"Polygon":return PZ(t).geometry;case"MultiPoint":return rDe(t).geometry;case"MultiLineString":return tDe(t).geometry;case"MultiPolygon":return iDe(t).geometry;default:throw new Error(e+" is invalid")}}function LZ(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!AF(e[0])||!AF(e[1]))throw new Error("coordinates must contain numbers");return hx({type:"Point",coordinates:e},t,r)}function IFt(e,t,r={}){return SF(e.map(n=>LZ(n,t)),r)}function PZ(e,t,r={}){for(let i of e){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let a=0;aPZ(n,t)),r)}function IZ(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return hx({type:"LineString",coordinates:e},t,r)}function DFt(e,t,r={}){return SF(e.map(n=>IZ(n,t)),r)}function SF(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function tDe(e,t,r={}){return hx({type:"MultiLineString",coordinates:e},t,r)}function rDe(e,t,r={}){return hx({type:"MultiPoint",coordinates:e},t,r)}function iDe(e,t,r={}){return hx({type:"MultiPolygon",coordinates:e},t,r)}function FFt(e,t,r={}){return hx({type:"GeometryCollection",geometries:e},t,r)}function zFt(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r}function nDe(e,t="kilometers"){let r=CZ[t];if(!r)throw new Error(t+" units is invalid");return e*r}function RZ(e,t="kilometers"){let r=CZ[t];if(!r)throw new Error(t+" units is invalid");return e/r}function qFt(e,t){return aDe(RZ(e,t))}function OFt(e){let t=e%360;return t<0&&(t+=360),t}function BFt(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function aDe(e){return e%(2*Math.PI)*180/Math.PI}function NFt(e){return e%360*Math.PI/180}function UFt(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return nDe(RZ(e,t),r)}function VFt(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=kZ[t];if(!n)throw new Error("invalid original units");let i=kZ[r];if(!i)throw new Error("invalid final units");return e/n*i}function AF(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function GFt(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function HFt(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(t=>{if(!AF(t))throw new Error("bbox must only contain numbers")})}function jFt(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}ic.areaFactors=kZ;ic.azimuthToBearing=BFt;ic.bearingToAzimuth=OFt;ic.convertArea=VFt;ic.convertLength=UFt;ic.degreesToRadians=NFt;ic.earthRadius=qp;ic.factors=CZ;ic.feature=hx;ic.featureCollection=SF;ic.geometry=PFt;ic.geometryCollection=FFt;ic.isNumber=AF;ic.isObject=GFt;ic.lengthToDegrees=qFt;ic.lengthToRadians=RZ;ic.lineString=IZ;ic.lineStrings=DFt;ic.multiLineString=tDe;ic.multiPoint=rDe;ic.multiPolygon=iDe;ic.point=LZ;ic.points=IFt;ic.polygon=PZ;ic.polygons=RFt;ic.radiansToDegrees=aDe;ic.radiansToLength=nDe;ic.round=zFt;ic.validateBBox=HFt;ic.validateId=jFt});var kF=ye(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});var Wv=MF();function hk(e,t,r){if(e!==null)for(var n,i,a,o,s,l,u,c=0,f=0,h,d=e.type,v=d==="FeatureCollection",m=d==="Feature",b=v?e.features.length:1,p=0;pl||v>u||m>c){s=f,l=n,u=v,c=m,a=0;return}var b=Wv.lineString.call(void 0,[s,f],r.properties);if(t(b,n,i,m,a)===!1)return!1;a++,s=f})===!1)return!1}}})}function $Ft(e,t,r){var n=r,i=!1;return lDe(e,function(a,o,s,l,u){i===!1&&r===void 0?n=a:n=t(n,a,o,s,l,u),i=!0}),n}function uDe(e,t){if(!e)throw new Error("geojson is required");EF(e,function(r,n,i){if(r.geometry!==null){var a=r.geometry.type,o=r.geometry.coordinates;switch(a){case"LineString":if(t(r,n,i,0,0)===!1)return!1;break;case"Polygon":for(var s=0;s{"use strict";Object.defineProperty(CF,"__esModule",{value:!0});var cDe=MF(),rzt=kF();function dDe(e){return rzt.geomReduce.call(void 0,e,(t,r)=>t+izt(r),0)}function izt(e){let t=0,r;switch(e.type){case"Polygon":return fDe(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(hDe(e[0]));for(let r=1;r=t?(n+2)%t:n+2],s=i[0]*FZ,l=a[1]*FZ,u=o[0]*FZ;r+=(u-s)*Math.sin(l),n++}return r*nzt}var azt=dDe;CF.area=dDe;CF.default=azt});var gDe=ye(LF=>{"use strict";Object.defineProperty(LF,"__esModule",{value:!0});var ozt=MF(),szt=kF();function pDe(e,t={}){let r=0,n=0,i=0;return szt.coordEach.call(void 0,e,function(a){r+=a[0],n+=a[1],i++},!0),ozt.point.call(void 0,[r/i,n/i],t.properties)}var lzt=pDe;LF.centroid=pDe;LF.default=lzt});var yDe=ye(PF=>{"use strict";Object.defineProperty(PF,"__esModule",{value:!0});var uzt=kF();function mDe(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return uzt.coordEach.call(void 0,e,n=>{r[0]>n[0]&&(r[0]=n[0]),r[1]>n[1]&&(r[1]=n[1]),r[2]{"use strict";var _De={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},fzt=new Set(Object.values(_De));xDe.exports={usaLocationAbbreviations:fzt,usaLocationList:_De}});var dx=ye((qmr,SDe)=>{"use strict";var hzt=qa(),TDe=eDe(),{area:dzt}=vDe(),{centroid:vzt}=gDe(),{bbox:pzt}=yDe(),gzt=YS(),rw=K1(),mzt=Ay(),yzt=zS(),IF=zM(),{usaLocationAbbreviations:_zt,usaLocationList:xzt}=bDe(),wDe=Object.keys(TDe),bzt={"ISO-3":gzt,"USA-states":Tzt,"country names":wzt};function wzt(e){for(var t=0;t0&&c[f+1][0]<0)return f;return null}switch(n==="RUS"||n==="FJI"?a=function(c){var f;if(u(c)===null)f=c;else for(f=new Array(c.length),l=0;lf?h[d++]=[c[l][0]+360,c[l][1]]:l===f?(h[d++]=c[l],h[d++]=[c[l][0],-90]):h[d++]=c[l];var v=IF.tester(h);v.pts.pop(),i.push(v)}:a=function(c){i.push(IF.tester(c))},t.type){case"MultiPolygon":for(o=0;o0?v.properties.ct=Ezt(v):v.properties.ct=[NaN,NaN],h.fIn=c,h.fOut=v,i.push(v)}else rw.log(["Location",h.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete n[f]}switch(r.type){case"FeatureCollection":var l=r.features;for(a=0;ai&&(i=s,r=o)}else r=t;return vzt(r).geometry.coordinates}function kzt(e){var t=window.PlotlyGeoAssets||{},r=[];function n(l){return new Promise(function(u,c){hzt.json(l,function(f,h){if(f){delete t[l];var d=f.status===404?'GeoJSON at URL "'+l+'" does not exist.':"Unexpected error while fetching from "+l;return c(new Error(d))}return t[l]=h,u(h)})})}function i(l){return new Promise(function(u,c){var f=0,h=setInterval(function(){if(t[l]&&t[l]!=="pending")return clearInterval(h),u(t[l]);if(f>100)return clearInterval(h),c("Unexpected error while fetching from "+l);f++},50)})}for(var a=0;a{"use strict";var Lzt=qa(),Pzt=So(),MDe=ka(),EDe=sp(),Izt=EDe.stylePoints,Rzt=EDe.styleText;kDe.exports=function(t,r){r&&Dzt(t,r)};function Dzt(e,t){var r=t[0].trace,n=t[0].node3;n.style("opacity",t[0].trace.opacity),Izt(n,r,e),Rzt(n,r,e),n.selectAll("path.js-line").style("fill","none").each(function(i){var a=Lzt.select(this),o=i.trace,s=o.line||{};a.call(MDe.stroke,s.color).call(Pzt.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&a.call(MDe.fill,o.fillcolor)})}});var NZ=ye((Bmr,PDe)=>{"use strict";var CDe=qa(),DF=Pr(),Fzt=TF().getTopojsonFeatures,qZ=fx(),RF=dx(),LDe=Mg().findExtremes,BZ=fs().BADNUM,zzt=O0().calcMarkerSize,OZ=Ru(),qzt=zZ();function Ozt(e,t,r){var n=t.layers.frontplot.select(".scatterlayer"),i=DF.makeTraceGroups(n,r,"trace scattergeo");function a(o,s){o.lonlat[0]===BZ&&CDe.select(s).remove()}i.selectAll("*").remove(),i.each(function(o){var s=CDe.select(this),l=o[0].trace;if(OZ.hasLines(l)||l.fill!=="none"){var u=qZ.calcTraceToLineCoords(o),c=l.fill!=="none"?qZ.makePolygon(u):qZ.makeLine(u);s.selectAll("path.js-line").data([{geojson:c,trace:l}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}OZ.hasMarkers(l)&&s.selectAll("path.point").data(DF.identity).enter().append("path").classed("point",!0).each(function(f){a(f,this)}),OZ.hasText(l)&&s.selectAll("g").data(DF.identity).enter().append("g").append("text").each(function(f){a(f,this)}),qzt(e,o)})}function Bzt(e,t){var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r._length,o,s;if(DF.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l==="geojson-id"?RF.extractTraceFeature(e):Fzt(r,i.topojson);for(o=0;o{"use strict";var Nzt=ef(),Uzt=fs().BADNUM,Vzt=yT(),Gzt=Pr().fillText,Hzt=tw();IDe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.xa,s=t.ya,l=t.subplot,u=l.projection.isLonLatOverEdges,c=l.project;function f(k){var M=k.lonlat;if(M[0]===Uzt||u(M))return 1/0;var T=c(M),L=c([r,n]),x=Math.abs(T[0]-L[0]),C=Math.abs(T[1]-L[1]),S=Math.max(3,k.mrc||0);return Math.max(Math.sqrt(x*x+C*C)-S,1-3/S)}if(Nzt.getClosest(i,f,t),t.index!==!1){var h=i[t.index],d=h.lonlat,v=[o.c2p(d),s.c2p(d)],m=h.mrc||1;t.x0=v[0]-m,t.x1=v[0]+m,t.y0=v[1]-m,t.y1=v[1]+m,t.loc=h.loc,t.lon=d[0],t.lat=d[1];var b={};b[a.geo]={_subplot:l};var p=a._module.formatLabels(h,a,b);return t.lonLabel=p.lonLabel,t.latLabel=p.latLabel,t.color=Vzt(a,h),t.extraText=jzt(a,h,t,i[0].t.labels),t.hovertemplate=a.hovertemplate,[t]}};function jzt(e,t,r,n){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,a=i==="all"?Hzt.hoverinfo.flags:i.split("+"),o=a.indexOf("location")!==-1&&Array.isArray(e.locations),s=a.indexOf("lon")!==-1,l=a.indexOf("lat")!==-1,u=a.indexOf("text")!==-1,c=[];function f(h){return h+"\xB0"}return o?c.push(t.loc):s&&l?c.push("("+f(r.latLabel)+", "+f(r.lonLabel)+")"):s?c.push(n.lon+f(r.lonLabel)):l&&c.push(n.lat+f(r.latLabel)),u&&Gzt(t,e,c),c.join("
")}});var FDe=ye((Umr,DDe)=>{"use strict";DDe.exports=function(t,r,n,i,a){t.lon=r.lon,t.lat=r.lat,t.location=r.loc?r.loc:null;var o=i[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t}});var ODe=ye((Vmr,qDe)=>{"use strict";var zDe=Ru(),Wzt=fs().BADNUM;qDe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h,d=!zDe.hasMarkers(s)&&!zDe.hasText(s);if(d)return[];if(r===!1)for(h=0;h{(function(e,t){t(typeof FF=="object"&&typeof BDe!="undefined"?FF:e.d3=e.d3||{})})(FF,function(e){"use strict";function t(ke,be){return kebe?1:ke>=be?0:NaN}function r(ke){return ke.length===1&&(ke=n(ke)),{left:function(be,Be,Le,me){for(Le==null&&(Le=0),me==null&&(me=be.length);Le>>1;ke(be[Pe],Be)<0?Le=Pe+1:me=Pe}return Le},right:function(be,Be,Le,me){for(Le==null&&(Le=0),me==null&&(me=be.length);Le>>1;ke(be[Pe],Be)>0?me=Pe:Le=Pe+1}return Le}}}function n(ke){return function(be,Be){return t(ke(be),Be)}}var i=r(t),a=i.right,o=i.left;function s(ke,be){be==null&&(be=l);for(var Be=0,Le=ke.length-1,me=ke[0],Pe=new Array(Le<0?0:Le);Beke?1:be>=ke?0:NaN}function f(ke){return ke===null?NaN:+ke}function h(ke,be){var Be=ke.length,Le=0,me=-1,Pe=0,ce,He,lt=0;if(be==null)for(;++me1)return lt/(Le-1)}function d(ke,be){var Be=h(ke,be);return Be&&Math.sqrt(Be)}function v(ke,be){var Be=ke.length,Le=-1,me,Pe,ce;if(be==null){for(;++Le=me)for(Pe=ce=me;++Leme&&(Pe=me),ce=me)for(Pe=ce=me;++Leme&&(Pe=me),ce0)return[ke];if((Le=be0)for(ke=Math.ceil(ke/He),be=Math.floor(be/He),ce=new Array(Pe=Math.ceil(be-ke+1));++me=0?(Pe>=L?10:Pe>=x?5:Pe>=C?2:1)*Math.pow(10,me):-Math.pow(10,-me)/(Pe>=L?10:Pe>=x?5:Pe>=C?2:1)}function P(ke,be,Be){var Le=Math.abs(be-ke)/Math.max(0,Be),me=Math.pow(10,Math.floor(Math.log(Le)/Math.LN10)),Pe=Le/me;return Pe>=L?me*=10:Pe>=x?me*=5:Pe>=C&&(me*=2),beat;)ct.pop(),--ar;var Vt=new Array(ar+1),rr;for(Pe=0;Pe<=ar;++Pe)rr=Vt[Pe]=[],rr.x0=Pe>0?ct[Pe-1]:Ht,rr.x1=Pe=1)return+Be(ke[Le-1],Le-1,ke);var Le,me=(Le-1)*be,Pe=Math.floor(me),ce=+Be(ke[Pe],Pe,ke),He=+Be(ke[Pe+1],Pe+1,ke);return ce+(He-ce)*(me-Pe)}}function V(ke,be,Be){return ke=p.call(ke,f).sort(t),Math.ceil((Be-be)/(2*(q(ke,.75)-q(ke,.25))*Math.pow(ke.length,-1/3)))}function G(ke,be,Be){return Math.ceil((Be-be)/(3.5*d(ke)*Math.pow(ke.length,-1/3)))}function Z(ke,be){var Be=ke.length,Le=-1,me,Pe;if(be==null){for(;++Le=me)for(Pe=me;++LePe&&(Pe=me)}else for(;++Le=me)for(Pe=me;++LePe&&(Pe=me);return Pe}function j(ke,be){var Be=ke.length,Le=Be,me=-1,Pe,ce=0;if(be==null)for(;++me=0;)for(ce=ke[be],Be=ce.length;--Be>=0;)Pe[--me]=ce[Be];return Pe}function ie(ke,be){var Be=ke.length,Le=-1,me,Pe;if(be==null){for(;++Le=me)for(Pe=me;++Leme&&(Pe=me)}else for(;++Le=me)for(Pe=me;++Leme&&(Pe=me);return Pe}function ae(ke,be){for(var Be=be.length,Le=new Array(Be);Be--;)Le[Be]=ke[be[Be]];return Le}function _e(ke,be){if(Be=ke.length){var Be,Le=0,me=0,Pe,ce=ke[me];for(be==null&&(be=t);++Le{(function(e,t){typeof zF=="object"&&typeof NDe!="undefined"?t(zF,dk()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(zF,function(e,t){"use strict";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(kt){a(i,kt,this.t),a(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new n;function a(kt,Zt,Er){var xr=kt.s=Zt+Er,Kr=xr-Zt,Mi=xr-Kr;kt.t=Zt-Mi+(Er-Kr)}var o=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,f=l*2,h=180/l,d=l/180,v=Math.abs,m=Math.atan,b=Math.atan2,p=Math.cos,k=Math.ceil,M=Math.exp,T=Math.log,L=Math.pow,x=Math.sin,C=Math.sign||function(kt){return kt>0?1:kt<0?-1:0},S=Math.sqrt,g=Math.tan;function P(kt){return kt>1?0:kt<-1?l:Math.acos(kt)}function E(kt){return kt>1?u:kt<-1?-u:Math.asin(kt)}function z(kt){return(kt=x(kt/2))*kt}function q(){}function V(kt,Zt){kt&&Z.hasOwnProperty(kt.type)&&Z[kt.type](kt,Zt)}var G={Feature:function(kt,Zt){V(kt.geometry,Zt)},FeatureCollection:function(kt,Zt){for(var Er=kt.features,xr=-1,Kr=Er.length;++xr=0?1:-1,Kr=xr*Er,Mi=p(Zt),Wi=x(Zt),dn=re*Wi,wn=ge*Mi+dn*p(Kr),On=dn*xr*x(Kr);ie.add(b(On,wn)),Ce=kt,ge=Mi,re=Wi}function me(kt){return ae.reset(),H(kt,Se),ae*2}function Pe(kt){return[b(kt[1],kt[0]),E(kt[2])]}function ce(kt){var Zt=kt[0],Er=kt[1],xr=p(Er);return[xr*p(Zt),xr*x(Zt),x(Er)]}function He(kt,Zt){return kt[0]*Zt[0]+kt[1]*Zt[1]+kt[2]*Zt[2]}function lt(kt,Zt){return[kt[1]*Zt[2]-kt[2]*Zt[1],kt[2]*Zt[0]-kt[0]*Zt[2],kt[0]*Zt[1]-kt[1]*Zt[0]]}function mt(kt,Zt){kt[0]+=Zt[0],kt[1]+=Zt[1],kt[2]+=Zt[2]}function Ht(kt,Zt){return[kt[0]*Zt,kt[1]*Zt,kt[2]*Zt]}function at(kt){var Zt=S(kt[0]*kt[0]+kt[1]*kt[1]+kt[2]*kt[2]);kt[0]/=Zt,kt[1]/=Zt,kt[2]/=Zt}var ct,ar,Vt,rr,tt,je,Ue,Ae,rt=r(),St,Tt,dt={point:Et,lineStart:jt,lineEnd:or,polygonStart:function(){dt.point=mr,dt.lineStart=Ar,dt.lineEnd=ei,rt.reset(),Se.polygonStart()},polygonEnd:function(){Se.polygonEnd(),dt.point=Et,dt.lineStart=jt,dt.lineEnd=or,ie<0?(ct=-(Vt=180),ar=-(rr=90)):rt>o?rr=90:rt<-o&&(ar=-90),Tt[0]=ct,Tt[1]=Vt},sphere:function(){ct=-(Vt=180),ar=-(rr=90)}};function Et(kt,Zt){St.push(Tt=[ct=kt,Vt=kt]),Ztrr&&(rr=Zt)}function pt(kt,Zt){var Er=ce([kt*d,Zt*d]);if(Ae){var xr=lt(Ae,Er),Kr=[xr[1],-xr[0],0],Mi=lt(Kr,xr);at(Mi),Mi=Pe(Mi);var Wi=kt-tt,dn=Wi>0?1:-1,wn=Mi[0]*h*dn,On,Yi=v(Wi)>180;Yi^(dn*ttrr&&(rr=On)):(wn=(wn+360)%360-180,Yi^(dn*ttrr&&(rr=Zt))),Yi?ktqr(ct,Vt)&&(Vt=kt):qr(kt,Vt)>qr(ct,Vt)&&(ct=kt):Vt>=ct?(ktVt&&(Vt=kt)):kt>tt?qr(ct,kt)>qr(ct,Vt)&&(Vt=kt):qr(kt,Vt)>qr(ct,Vt)&&(ct=kt)}else St.push(Tt=[ct=kt,Vt=kt]);Ztrr&&(rr=Zt),Ae=Er,tt=kt}function jt(){dt.point=pt}function or(){Tt[0]=ct,Tt[1]=Vt,dt.point=Et,Ae=null}function mr(kt,Zt){if(Ae){var Er=kt-tt;rt.add(v(Er)>180?Er+(Er>0?360:-360):Er)}else je=kt,Ue=Zt;Se.point(kt,Zt),pt(kt,Zt)}function Ar(){Se.lineStart()}function ei(){mr(je,Ue),Se.lineEnd(),v(rt)>o&&(ct=-(Vt=180)),Tt[0]=ct,Tt[1]=Vt,Ae=null}function qr(kt,Zt){return(Zt-=kt)<0?Zt+360:Zt}function jr(kt,Zt){return kt[0]-Zt[0]}function gt(kt,Zt){return kt[0]<=kt[1]?kt[0]<=Zt&&Zt<=kt[1]:Ztqr(xr[0],xr[1])&&(xr[1]=Kr[1]),qr(Kr[0],xr[1])>qr(xr[0],xr[1])&&(xr[0]=Kr[0])):Mi.push(xr=Kr);for(Wi=-1/0,Er=Mi.length-1,Zt=0,xr=Mi[Er];Zt<=Er;xr=Kr,++Zt)Kr=Mi[Zt],(dn=qr(xr[1],Kr[0]))>Wi&&(Wi=dn,ct=Kr[0],Vt=xr[1])}return St=Tt=null,ct===1/0||ar===1/0?[[NaN,NaN],[NaN,NaN]]:[[ct,ar],[Vt,rr]]}var Je,We,et,xt,At,Kt,Qt,Mr,Gr,Ir,Yr,_i,Pi,ai,mi,un,Fn={sphere:q,point:An,lineStart:Qn,lineEnd:Jn,polygonStart:function(){Fn.lineStart=Gt,Fn.lineEnd=wt},polygonEnd:function(){Fn.lineStart=Qn,Fn.lineEnd=Jn}};function An(kt,Zt){kt*=d,Zt*=d;var Er=p(Zt);Hn(Er*p(kt),Er*x(kt),x(Zt))}function Hn(kt,Zt,Er){++Je,et+=(kt-et)/Je,xt+=(Zt-xt)/Je,At+=(Er-At)/Je}function Qn(){Fn.point=Vi}function Vi(kt,Zt){kt*=d,Zt*=d;var Er=p(Zt);ai=Er*p(kt),mi=Er*x(kt),un=x(Zt),Fn.point=Kn,Hn(ai,mi,un)}function Kn(kt,Zt){kt*=d,Zt*=d;var Er=p(Zt),xr=Er*p(kt),Kr=Er*x(kt),Mi=x(Zt),Wi=b(S((Wi=mi*Mi-un*Kr)*Wi+(Wi=un*xr-ai*Mi)*Wi+(Wi=ai*Kr-mi*xr)*Wi),ai*xr+mi*Kr+un*Mi);We+=Wi,Kt+=Wi*(ai+(ai=xr)),Qt+=Wi*(mi+(mi=Kr)),Mr+=Wi*(un+(un=Mi)),Hn(ai,mi,un)}function Jn(){Fn.point=An}function Gt(){Fn.point=tr}function wt(){ir(_i,Pi),Fn.point=An}function tr(kt,Zt){_i=kt,Pi=Zt,kt*=d,Zt*=d,Fn.point=ir;var Er=p(Zt);ai=Er*p(kt),mi=Er*x(kt),un=x(Zt),Hn(ai,mi,un)}function ir(kt,Zt){kt*=d,Zt*=d;var Er=p(Zt),xr=Er*p(kt),Kr=Er*x(kt),Mi=x(Zt),Wi=mi*Mi-un*Kr,dn=un*xr-ai*Mi,wn=ai*Kr-mi*xr,On=S(Wi*Wi+dn*dn+wn*wn),Yi=E(On),$i=On&&-Yi/On;Gr+=$i*Wi,Ir+=$i*dn,Yr+=$i*wn,We+=Yi,Kt+=Yi*(ai+(ai=xr)),Qt+=Yi*(mi+(mi=Kr)),Mr+=Yi*(un+(un=Mi)),Hn(ai,mi,un)}function wr(kt){Je=We=et=xt=At=Kt=Qt=Mr=Gr=Ir=Yr=0,H(kt,Fn);var Zt=Gr,Er=Ir,xr=Yr,Kr=Zt*Zt+Er*Er+xr*xr;return Krl?kt+Math.round(-kt/f)*f:kt,Zt]}$r.invert=$r;function Ri(kt,Zt,Er){return(kt%=f)?Zt||Er?ti(en(kt),fn(Zt,Er)):en(kt):Zt||Er?fn(Zt,Er):$r}function Zi(kt){return function(Zt,Er){return Zt+=kt,[Zt>l?Zt-f:Zt<-l?Zt+f:Zt,Er]}}function en(kt){var Zt=Zi(kt);return Zt.invert=Zi(-kt),Zt}function fn(kt,Zt){var Er=p(kt),xr=x(kt),Kr=p(Zt),Mi=x(Zt);function Wi(dn,wn){var On=p(wn),Yi=p(dn)*On,$i=x(dn)*On,an=x(wn),Fi=an*Er+Yi*xr;return[b($i*Kr-Fi*Mi,Yi*Er-an*xr),E(Fi*Kr+$i*Mi)]}return Wi.invert=function(dn,wn){var On=p(wn),Yi=p(dn)*On,$i=x(dn)*On,an=x(wn),Fi=an*Kr-$i*Mi;return[b($i*Kr+an*Mi,Yi*Er+Fi*xr),E(Fi*Er-Yi*xr)]},Wi}function yn(kt){kt=Ri(kt[0]*d,kt[1]*d,kt.length>2?kt[2]*d:0);function Zt(Er){return Er=kt(Er[0]*d,Er[1]*d),Er[0]*=h,Er[1]*=h,Er}return Zt.invert=function(Er){return Er=kt.invert(Er[0]*d,Er[1]*d),Er[0]*=h,Er[1]*=h,Er},Zt}function Mn(kt,Zt,Er,xr,Kr,Mi){if(Er){var Wi=p(Zt),dn=x(Zt),wn=xr*Er;Kr==null?(Kr=Zt+xr*f,Mi=Zt-wn/2):(Kr=Ba(Wi,Kr),Mi=Ba(Wi,Mi),(xr>0?KrMi)&&(Kr+=xr*f));for(var On,Yi=Kr;xr>0?Yi>Mi:Yi1&&kt.push(kt.pop().concat(kt.shift()))},result:function(){var Er=kt;return kt=[],Zt=null,Er}}}function Wa(kt,Zt){return v(kt[0]-Zt[0])=0;--dn)Kr.point(($i=Yi[dn])[0],$i[1]);else xr(an.x,an.p.x,-1,Kr);an=an.p}an=an.o,Yi=an.z,Fi=!Fi}while(!an.v);Kr.lineEnd()}}}function da(kt){if(Zt=kt.length){for(var Zt,Er=0,xr=kt[0],Kr;++Er=0?1:-1,as=Ss*Zo,ws=as>l,Ho=Ca*Ka;if(jn.add(b(Ho*Ss*x(as),Ra*bo+Ho*p(as))),Wi+=ws?Zo+Ss*f:Zo,ws^Fi>=Er^Zn>=Er){var ml=lt(ce(an),ce(Ua));at(ml);var Ws=lt(Mi,ml);at(Ws);var Ls=(ws^Zo>=0?-1:1)*E(Ws[2]);(xr>Ls||xr===Ls&&(ml[0]||ml[1]))&&(dn+=ws^Zo>=0?1:-1)}}return(Wi<-o||Wi0){for(wn||(Kr.polygonStart(),wn=!0),Kr.lineStart(),bo=0;bo1&&Dn&2&&Ka.push(Ka.pop().concat(Ka.shift())),Yi.push(Ka.filter(Ct))}}return an}}function Ct(kt){return kt.length>1}function Sr(kt,Zt){return((kt=kt.x)[0]<0?kt[1]-u-o:u-kt[1])-((Zt=Zt.x)[0]<0?Zt[1]-u-o:u-Zt[1])}var Jr=Gn(function(){return!0},hi,Sn,[-l,-u]);function hi(kt){var Zt=NaN,Er=NaN,xr=NaN,Kr;return{lineStart:function(){kt.lineStart(),Kr=1},point:function(Mi,Wi){var dn=Mi>0?l:-l,wn=v(Mi-Zt);v(wn-l)0?u:-u),kt.point(xr,Er),kt.lineEnd(),kt.lineStart(),kt.point(dn,Er),kt.point(Mi,Er),Kr=0):xr!==dn&&wn>=l&&(v(Zt-xr)o?m((x(Zt)*(Mi=p(xr))*x(Er)-x(xr)*(Kr=p(Zt))*x(kt))/(Kr*Mi*Wi)):(Zt+xr)/2}function Sn(kt,Zt,Er,xr){var Kr;if(kt==null)Kr=Er*u,xr.point(-l,Kr),xr.point(0,Kr),xr.point(l,Kr),xr.point(l,0),xr.point(l,-Kr),xr.point(0,-Kr),xr.point(-l,-Kr),xr.point(-l,0),xr.point(-l,Kr);else if(v(kt[0]-Zt[0])>o){var Mi=kt[0]0,Kr=v(Zt)>o;function Mi(Yi,$i,an,Fi){Mn(Fi,kt,Er,an,Yi,$i)}function Wi(Yi,$i){return p(Yi)*p($i)>Zt}function dn(Yi){var $i,an,Fi,ta,Ca;return{lineStart:function(){ta=Fi=!1,Ca=1},point:function(Ra,La){var Ua=[Ra,La],Zn,Dn=Wi(Ra,La),Ka=xr?Dn?0:On(Ra,La):Dn?On(Ra+(Ra<0?l:-l),La):0;if(!$i&&(ta=Fi=Dn)&&Yi.lineStart(),Dn!==Fi&&(Zn=wn($i,Ua),(!Zn||Wa($i,Zn)||Wa(Ua,Zn))&&(Ua[2]=1)),Dn!==Fi)Ca=0,Dn?(Yi.lineStart(),Zn=wn(Ua,$i),Yi.point(Zn[0],Zn[1])):(Zn=wn($i,Ua),Yi.point(Zn[0],Zn[1],2),Yi.lineEnd()),$i=Zn;else if(Kr&&$i&&xr^Dn){var bo;!(Ka&an)&&(bo=wn(Ua,$i,!0))&&(Ca=0,xr?(Yi.lineStart(),Yi.point(bo[0][0],bo[0][1]),Yi.point(bo[1][0],bo[1][1]),Yi.lineEnd()):(Yi.point(bo[1][0],bo[1][1]),Yi.lineEnd(),Yi.lineStart(),Yi.point(bo[0][0],bo[0][1],3)))}Dn&&(!$i||!Wa($i,Ua))&&Yi.point(Ua[0],Ua[1]),$i=Ua,Fi=Dn,an=Ka},lineEnd:function(){Fi&&Yi.lineEnd(),$i=null},clean:function(){return Ca|(ta&&Fi)<<1}}}function wn(Yi,$i,an){var Fi=ce(Yi),ta=ce($i),Ca=[1,0,0],Ra=lt(Fi,ta),La=He(Ra,Ra),Ua=Ra[0],Zn=La-Ua*Ua;if(!Zn)return!an&&Yi;var Dn=Zt*La/Zn,Ka=-Zt*Ua/Zn,bo=lt(Ca,Ra),Zo=Ht(Ca,Dn),Ss=Ht(Ra,Ka);mt(Zo,Ss);var as=bo,ws=He(Zo,as),Ho=He(as,as),ml=ws*ws-Ho*(He(Zo,Zo)-1);if(!(ml<0)){var Ws=S(ml),Ls=Ht(as,(-ws-Ws)/Ho);if(mt(Ls,Zo),Ls=Pe(Ls),!an)return Ls;var va=Yi[0],no=$i[0],ys=Yi[1],rs=$i[1],Ql;no0^Ls[1]<(v(Ls[0]-va)l^(va<=Ls[0]&&Ls[0]<=no)){var pu=Ht(as,(-ws+Ws)/Ho);return mt(pu,Zo),[Ls,Pe(pu)]}}}function On(Yi,$i){var an=xr?kt:l-kt,Fi=0;return Yi<-an?Fi|=1:Yi>an&&(Fi|=2),$i<-an?Fi|=4:$i>an&&(Fi|=8),Fi}return Gn(Wi,dn,Mi,xr?[0,-kt]:[-l,kt-l])}function ki(kt,Zt,Er,xr,Kr,Mi){var Wi=kt[0],dn=kt[1],wn=Zt[0],On=Zt[1],Yi=0,$i=1,an=wn-Wi,Fi=On-dn,ta;if(ta=Er-Wi,!(!an&&ta>0)){if(ta/=an,an<0){if(ta0){if(ta>$i)return;ta>Yi&&(Yi=ta)}if(ta=Kr-Wi,!(!an&&ta<0)){if(ta/=an,an<0){if(ta>$i)return;ta>Yi&&(Yi=ta)}else if(an>0){if(ta0)){if(ta/=Fi,Fi<0){if(ta0){if(ta>$i)return;ta>Yi&&(Yi=ta)}if(ta=Mi-dn,!(!Fi&&ta<0)){if(ta/=Fi,Fi<0){if(ta>$i)return;ta>Yi&&(Yi=ta)}else if(Fi>0){if(ta0&&(kt[0]=Wi+Yi*an,kt[1]=dn+Yi*Fi),$i<1&&(Zt[0]=Wi+$i*an,Zt[1]=dn+$i*Fi),!0}}}}}var _n=1e9,ya=-_n;function ea(kt,Zt,Er,xr){function Kr(On,Yi){return kt<=On&&On<=Er&&Zt<=Yi&&Yi<=xr}function Mi(On,Yi,$i,an){var Fi=0,ta=0;if(On==null||(Fi=Wi(On,$i))!==(ta=Wi(Yi,$i))||wn(On,Yi)<0^$i>0)do an.point(Fi===0||Fi===3?kt:Er,Fi>1?xr:Zt);while((Fi=(Fi+$i+4)%4)!==ta);else an.point(Yi[0],Yi[1])}function Wi(On,Yi){return v(On[0]-kt)0?0:3:v(On[0]-Er)0?2:1:v(On[1]-Zt)0?1:0:Yi>0?3:2}function dn(On,Yi){return wn(On.x,Yi.x)}function wn(On,Yi){var $i=Wi(On,1),an=Wi(Yi,1);return $i!==an?$i-an:$i===0?Yi[1]-On[1]:$i===1?On[0]-Yi[0]:$i===2?On[1]-Yi[1]:Yi[0]-On[0]}return function(On){var Yi=On,$i=ma(),an,Fi,ta,Ca,Ra,La,Ua,Zn,Dn,Ka,bo,Zo={point:Ss,lineStart:ml,lineEnd:Ws,polygonStart:ws,polygonEnd:Ho};function Ss(va,no){Kr(va,no)&&Yi.point(va,no)}function as(){for(var va=0,no=0,ys=Fi.length;noxr&&(Uc-Nc)*(xr-pu)>(xu-pu)*(kt-Nc)&&++va:xu<=xr&&(Uc-Nc)*(xr-pu)<(xu-pu)*(kt-Nc)&&--va;return va}function ws(){Yi=$i,an=[],Fi=[],bo=!0}function Ho(){var va=as(),no=bo&&va,ys=(an=t.merge(an)).length;(no||ys)&&(On.polygonStart(),no&&(On.lineStart(),Mi(null,null,1,On),On.lineEnd()),ys&&Xo(an,dn,va,Mi,On),On.polygonEnd()),Yi=On,an=Fi=ta=null}function ml(){Zo.point=Ls,Fi&&Fi.push(ta=[]),Ka=!0,Dn=!1,Ua=Zn=NaN}function Ws(){an&&(Ls(Ca,Ra),La&&Dn&&$i.rejoin(),an.push($i.result())),Zo.point=Ss,Dn&&Yi.lineEnd()}function Ls(va,no){var ys=Kr(va,no);if(Fi&&ta.push([va,no]),Ka)Ca=va,Ra=no,La=ys,Ka=!1,ys&&(Yi.lineStart(),Yi.point(va,no));else if(ys&&Dn)Yi.point(va,no);else{var rs=[Ua=Math.max(ya,Math.min(_n,Ua)),Zn=Math.max(ya,Math.min(_n,Zn))],Ql=[va=Math.max(ya,Math.min(_n,va)),no=Math.max(ya,Math.min(_n,no))];ki(rs,Ql,kt,Zt,Er,xr)?(Dn||(Yi.lineStart(),Yi.point(rs[0],rs[1])),Yi.point(Ql[0],Ql[1]),ys||Yi.lineEnd(),bo=!1):ys&&(Yi.lineStart(),Yi.point(va,no),bo=!1)}Ua=va,Zn=no,Dn=ys}return Zo}}function Ma(){var kt=0,Zt=0,Er=960,xr=500,Kr,Mi,Wi;return Wi={stream:function(dn){return Kr&&Mi===dn?Kr:Kr=ea(kt,Zt,Er,xr)(Mi=dn)},extent:function(dn){return arguments.length?(kt=+dn[0][0],Zt=+dn[0][1],Er=+dn[1][0],xr=+dn[1][1],Kr=Mi=null,Wi):[[kt,Zt],[Er,xr]]}}}var _o=r(),No,po,Lo,ko={sphere:q,point:q,lineStart:Ds,lineEnd:q,polygonStart:q,polygonEnd:q};function Ds(){ko.point=ll,ko.lineEnd=Fs}function Fs(){ko.point=ko.lineEnd=q}function ll(kt,Zt){kt*=d,Zt*=d,No=kt,po=x(Zt),Lo=p(Zt),ko.point=ul}function ul(kt,Zt){kt*=d,Zt*=d;var Er=x(Zt),xr=p(Zt),Kr=v(kt-No),Mi=p(Kr),Wi=x(Kr),dn=xr*Wi,wn=Lo*Er-po*xr*Mi,On=po*Er+Lo*xr*Mi;_o.add(b(S(dn*dn+wn*wn),On)),No=kt,po=Er,Lo=xr}function zl(kt){return _o.reset(),H(kt,ko),+_o}var us=[null,null],il={type:"LineString",coordinates:us};function As(kt,Zt){return us[0]=kt,us[1]=Zt,zl(il)}var cl={Feature:function(kt,Zt){return zs(kt.geometry,Zt)},FeatureCollection:function(kt,Zt){for(var Er=kt.features,xr=-1,Kr=Er.length;++xr0&&(Kr=As(kt[Mi],kt[Mi-1]),Kr>0&&Er<=Kr&&xr<=Kr&&(Er+xr-Kr)*(1-Math.pow((Er-xr)/Kr,2))o}).map(an)).concat(t.range(k(Mi/On)*On,Kr,On).filter(function(Zn){return v(Zn%$i)>o}).map(Fi))}return La.lines=function(){return Ua().map(function(Zn){return{type:"LineString",coordinates:Zn}})},La.outline=function(){return{type:"Polygon",coordinates:[ta(xr).concat(Ca(Wi).slice(1),ta(Er).reverse().slice(1),Ca(dn).reverse().slice(1))]}},La.extent=function(Zn){return arguments.length?La.extentMajor(Zn).extentMinor(Zn):La.extentMinor()},La.extentMajor=function(Zn){return arguments.length?(xr=+Zn[0][0],Er=+Zn[1][0],dn=+Zn[0][1],Wi=+Zn[1][1],xr>Er&&(Zn=xr,xr=Er,Er=Zn),dn>Wi&&(Zn=dn,dn=Wi,Wi=Zn),La.precision(Ra)):[[xr,dn],[Er,Wi]]},La.extentMinor=function(Zn){return arguments.length?(Zt=+Zn[0][0],kt=+Zn[1][0],Mi=+Zn[0][1],Kr=+Zn[1][1],Zt>kt&&(Zn=Zt,Zt=kt,kt=Zn),Mi>Kr&&(Zn=Mi,Mi=Kr,Kr=Zn),La.precision(Ra)):[[Zt,Mi],[kt,Kr]]},La.step=function(Zn){return arguments.length?La.stepMajor(Zn).stepMinor(Zn):La.stepMinor()},La.stepMajor=function(Zn){return arguments.length?(Yi=+Zn[0],$i=+Zn[1],La):[Yi,$i]},La.stepMinor=function(Zn){return arguments.length?(wn=+Zn[0],On=+Zn[1],La):[wn,On]},La.precision=function(Zn){return arguments.length?(Ra=+Zn,an=Rn(Mi,Kr,90),Fi=_a(Zt,kt,Ra),ta=Rn(dn,Wi,90),Ca=_a(xr,Er,Ra),La):Ra},La.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function ql(){return Vu()()}function xo(kt,Zt){var Er=kt[0]*d,xr=kt[1]*d,Kr=Zt[0]*d,Mi=Zt[1]*d,Wi=p(xr),dn=x(xr),wn=p(Mi),On=x(Mi),Yi=Wi*p(Er),$i=Wi*x(Er),an=wn*p(Kr),Fi=wn*x(Kr),ta=2*E(S(z(Mi-xr)+Wi*wn*z(Kr-Er))),Ca=x(ta),Ra=ta?function(La){var Ua=x(La*=ta)/Ca,Zn=x(ta-La)/Ca,Dn=Zn*Yi+Ua*an,Ka=Zn*$i+Ua*Fi,bo=Zn*dn+Ua*On;return[b(Ka,Dn)*h,b(bo,S(Dn*Dn+Ka*Ka))*h]}:function(){return[Er*h,xr*h]};return Ra.distance=ta,Ra}function Kl(kt){return kt}var Ns=r(),Hl=r(),ac,oa,qo,Oo,Ol={point:q,lineStart:q,lineEnd:q,polygonStart:function(){Ol.lineStart=Pc,Ol.lineEnd=Vf},polygonEnd:function(){Ol.lineStart=Ol.lineEnd=Ol.point=q,Ns.add(v(Hl)),Hl.reset()},result:function(){var kt=Ns/2;return Ns.reset(),kt}};function Pc(){Ol.point=Do}function Do(kt,Zt){Ol.point=nf,ac=qo=kt,oa=Oo=Zt}function nf(kt,Zt){Hl.add(Oo*kt-qo*Zt),qo=kt,Oo=Zt}function Vf(){nf(ac,oa)}var pl=1/0,Zc=pl,Jl=-pl,qs=Jl,yu={point:oc,lineStart:q,lineEnd:q,polygonStart:q,polygonEnd:q,result:function(){var kt=[[pl,Zc],[Jl,qs]];return Jl=qs=-(Zc=pl=1/0),kt}};function oc(kt,Zt){ktJl&&(Jl=kt),Ztqs&&(qs=Zt)}var Cf=0,sc=0,jh=0,Lf=0,cs=0,af=0,Gf=0,$l=0,fl=0,lc,Fu,Es,Hs,Go={point:ps,lineStart:uc,lineEnd:Os,polygonStart:function(){Go.lineStart=od,Go.lineEnd=Po},polygonEnd:function(){Go.point=ps,Go.lineStart=uc,Go.lineEnd=Os},result:function(){var kt=fl?[Gf/fl,$l/fl]:af?[Lf/af,cs/af]:jh?[Cf/jh,sc/jh]:[NaN,NaN];return Cf=sc=jh=Lf=cs=af=Gf=$l=fl=0,kt}};function ps(kt,Zt){Cf+=kt,sc+=Zt,++jh}function uc(){Go.point=xl}function xl(kt,Zt){Go.point=Gu,ps(Es=kt,Hs=Zt)}function Gu(kt,Zt){var Er=kt-Es,xr=Zt-Hs,Kr=S(Er*Er+xr*xr);Lf+=Kr*(Es+kt)/2,cs+=Kr*(Hs+Zt)/2,af+=Kr,ps(Es=kt,Hs=Zt)}function Os(){Go.point=ps}function od(){Go.point=sd}function Po(){Ko(lc,Fu)}function sd(kt,Zt){Go.point=Ko,ps(lc=Es=kt,Fu=Hs=Zt)}function Ko(kt,Zt){var Er=kt-Es,xr=Zt-Hs,Kr=S(Er*Er+xr*xr);Lf+=Kr*(Es+kt)/2,cs+=Kr*(Hs+Zt)/2,af+=Kr,Kr=Hs*kt-Es*Zt,Gf+=Kr*(Es+kt),$l+=Kr*(Hs+Zt),fl+=Kr*3,ps(Es=kt,Hs=Zt)}function Pa(kt){this._context=kt}Pa.prototype={_radius:4.5,pointRadius:function(kt){return this._radius=kt,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(kt,Zt){switch(this._point){case 0:{this._context.moveTo(kt,Zt),this._point=1;break}case 1:{this._context.lineTo(kt,Zt);break}default:{this._context.moveTo(kt+this._radius,Zt),this._context.arc(kt,Zt,this._radius,0,f);break}}},result:q};var of=r(),Hu,bl,Hf,Ic,yf,Bl={point:q,lineStart:function(){Bl.point=Ah},lineEnd:function(){Hu&&Qf(bl,Hf),Bl.point=q},polygonStart:function(){Hu=!0},polygonEnd:function(){Hu=null},result:function(){var kt=+of;return of.reset(),kt}};function Ah(kt,Zt){Bl.point=Qf,bl=Ic=kt,Hf=yf=Zt}function Qf(kt,Zt){Ic-=kt,yf-=Zt,of.add(S(Ic*Ic+yf*yf)),Ic=kt,yf=Zt}function _f(){this._string=[]}_f.prototype={_radius:4.5,_circle:Yc(4.5),pointRadius:function(kt){return(kt=+kt)!==this._radius&&(this._radius=kt,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(kt,Zt){switch(this._point){case 0:{this._string.push("M",kt,",",Zt),this._point=1;break}case 1:{this._string.push("L",kt,",",Zt);break}default:{this._circle==null&&(this._circle=Yc(this._radius)),this._string.push("M",kt,",",Zt,this._circle);break}}},result:function(){if(this._string.length){var kt=this._string.join("");return this._string=[],kt}else return null}};function Yc(kt){return"m0,"+kt+"a"+kt+","+kt+" 0 1,1 0,"+-2*kt+"a"+kt+","+kt+" 0 1,1 0,"+2*kt+"z"}function eh(kt,Zt){var Er=4.5,xr,Kr;function Mi(Wi){return Wi&&(typeof Er=="function"&&Kr.pointRadius(+Er.apply(this,arguments)),H(Wi,xr(Kr))),Kr.result()}return Mi.area=function(Wi){return H(Wi,xr(Ol)),Ol.result()},Mi.measure=function(Wi){return H(Wi,xr(Bl)),Bl.result()},Mi.bounds=function(Wi){return H(Wi,xr(yu)),yu.result()},Mi.centroid=function(Wi){return H(Wi,xr(Go)),Go.result()},Mi.projection=function(Wi){return arguments.length?(xr=Wi==null?(kt=null,Kl):(kt=Wi).stream,Mi):kt},Mi.context=function(Wi){return arguments.length?(Kr=Wi==null?(Zt=null,new _f):new Pa(Zt=Wi),typeof Er!="function"&&Kr.pointRadius(Er),Mi):Zt},Mi.pointRadius=function(Wi){return arguments.length?(Er=typeof Wi=="function"?Wi:(Kr.pointRadius(+Wi),+Wi),Mi):Er},Mi.projection(kt).context(Zt)}function th(kt){return{stream:ju(kt)}}function ju(kt){return function(Zt){var Er=new jf;for(var xr in kt)Er[xr]=kt[xr];return Er.stream=Zt,Er}}function jf(){}jf.prototype={constructor:jf,point:function(kt,Zt){this.stream.point(kt,Zt)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function cc(kt,Zt,Er){var xr=kt.clipExtent&&kt.clipExtent();return kt.scale(150).translate([0,0]),xr!=null&&kt.clipExtent(null),H(Er,kt.stream(yu)),Zt(yu.result()),xr!=null&&kt.clipExtent(xr),kt}function sf(kt,Zt,Er){return cc(kt,function(xr){var Kr=Zt[1][0]-Zt[0][0],Mi=Zt[1][1]-Zt[0][1],Wi=Math.min(Kr/(xr[1][0]-xr[0][0]),Mi/(xr[1][1]-xr[0][1])),dn=+Zt[0][0]+(Kr-Wi*(xr[1][0]+xr[0][0]))/2,wn=+Zt[0][1]+(Mi-Wi*(xr[1][1]+xr[0][1]))/2;kt.scale(150*Wi).translate([dn,wn])},Er)}function Nl(kt,Zt,Er){return sf(kt,[[0,0],Zt],Er)}function Kc(kt,Zt,Er){return cc(kt,function(xr){var Kr=+Zt,Mi=Kr/(xr[1][0]-xr[0][0]),Wi=(Kr-Mi*(xr[1][0]+xr[0][0]))/2,dn=-Mi*xr[0][1];kt.scale(150*Mi).translate([Wi,dn])},Er)}function Rc(kt,Zt,Er){return cc(kt,function(xr){var Kr=+Zt,Mi=Kr/(xr[1][1]-xr[0][1]),Wi=-Mi*xr[0][0],dn=(Kr-Mi*(xr[1][1]+xr[0][1]))/2;kt.scale(150*Mi).translate([Wi,dn])},Er)}var gs=16,Wf=p(30*d);function Wh(kt,Zt){return+Zt?lf(kt,Zt):rh(kt)}function rh(kt){return ju({point:function(Zt,Er){Zt=kt(Zt,Er),this.stream.point(Zt[0],Zt[1])}})}function lf(kt,Zt){function Er(xr,Kr,Mi,Wi,dn,wn,On,Yi,$i,an,Fi,ta,Ca,Ra){var La=On-xr,Ua=Yi-Kr,Zn=La*La+Ua*Ua;if(Zn>4*Zt&&Ca--){var Dn=Wi+an,Ka=dn+Fi,bo=wn+ta,Zo=S(Dn*Dn+Ka*Ka+bo*bo),Ss=E(bo/=Zo),as=v(v(bo)-1)Zt||v((La*Ws+Ua*Ls)/Zn-.5)>.3||Wi*an+dn*Fi+wn*ta2?va[2]%360*d:0,Ws()):[dn*h,wn*h,On*h]},Ho.angle=function(va){return arguments.length?($i=va%360*d,Ws()):$i*h},Ho.reflectX=function(va){return arguments.length?(an=va?-1:1,Ws()):an<0},Ho.reflectY=function(va){return arguments.length?(Fi=va?-1:1,Ws()):Fi<0},Ho.precision=function(va){return arguments.length?(bo=Wh(Zo,Ka=va*va),Ls()):S(Ka)},Ho.fitExtent=function(va,no){return sf(Ho,va,no)},Ho.fitSize=function(va,no){return Nl(Ho,va,no)},Ho.fitWidth=function(va,no){return Kc(Ho,va,no)},Ho.fitHeight=function(va,no){return Rc(Ho,va,no)};function Ws(){var va=js(Er,0,0,an,Fi,$i).apply(null,Zt(Mi,Wi)),no=($i?js:ih)(Er,xr-va[0],Kr-va[1],an,Fi,$i);return Yi=Ri(dn,wn,On),Zo=ti(Zt,no),Ss=ti(Yi,Zo),bo=Wh(Zo,Ka),Ls()}function Ls(){return as=ws=null,Ho}return function(){return Zt=kt.apply(this,arguments),Ho.invert=Zt.invert&&ml,Ws()}}function ks(kt){var Zt=0,Er=l/3,xr=Dc(kt),Kr=xr(Zt,Er);return Kr.parallels=function(Mi){return arguments.length?xr(Zt=Mi[0]*d,Er=Mi[1]*d):[Zt*h,Er*h]},Kr}function bc(kt){var Zt=p(kt);function Er(xr,Kr){return[xr*Zt,x(Kr)/Zt]}return Er.invert=function(xr,Kr){return[xr/Zt,E(Kr*Zt)]},Er}function hu(kt,Zt){var Er=x(kt),xr=(Er+x(Zt))/2;if(v(xr)=.12&&Ra<.234&&Ca>=-.425&&Ca<-.214?Kr:Ra>=.166&&Ra<.234&&Ca>=-.214&&Ca<-.115?Wi:Er).invert(an)},Yi.stream=function(an){return kt&&Zt===an?kt:kt=nh([Er.stream(Zt=an),Kr.stream(an),Wi.stream(an)])},Yi.precision=function(an){return arguments.length?(Er.precision(an),Kr.precision(an),Wi.precision(an),$i()):Er.precision()},Yi.scale=function(an){return arguments.length?(Er.scale(an),Kr.scale(an*.35),Wi.scale(an),Yi.translate(Er.translate())):Er.scale()},Yi.translate=function(an){if(!arguments.length)return Er.translate();var Fi=Er.scale(),ta=+an[0],Ca=+an[1];return xr=Er.translate(an).clipExtent([[ta-.455*Fi,Ca-.238*Fi],[ta+.455*Fi,Ca+.238*Fi]]).stream(On),Mi=Kr.translate([ta-.307*Fi,Ca+.201*Fi]).clipExtent([[ta-.425*Fi+o,Ca+.12*Fi+o],[ta-.214*Fi-o,Ca+.234*Fi-o]]).stream(On),dn=Wi.translate([ta-.205*Fi,Ca+.212*Fi]).clipExtent([[ta-.214*Fi+o,Ca+.166*Fi+o],[ta-.115*Fi-o,Ca+.234*Fi-o]]).stream(On),$i()},Yi.fitExtent=function(an,Fi){return sf(Yi,an,Fi)},Yi.fitSize=function(an,Fi){return Nl(Yi,an,Fi)},Yi.fitWidth=function(an,Fi){return Kc(Yi,an,Fi)},Yi.fitHeight=function(an,Fi){return Rc(Yi,an,Fi)};function $i(){return kt=Zt=null,Yi}return Yi.scale(1070)}function zu(kt){return function(Zt,Er){var xr=p(Zt),Kr=p(Er),Mi=kt(xr*Kr);return[Mi*Kr*x(Zt),Mi*x(Er)]}}function Fc(kt){return function(Zt,Er){var xr=S(Zt*Zt+Er*Er),Kr=kt(xr),Mi=x(Kr),Wi=p(Kr);return[b(Zt*Mi,xr*Wi),E(xr&&Er*Mi/xr)]}}var wc=zu(function(kt){return S(2/(1+kt))});wc.invert=Fc(function(kt){return 2*E(kt/2)});function bd(){return Eu(wc).scale(124.75).clipAngle(180-.001)}var xf=zu(function(kt){return(kt=P(kt))&&kt/x(kt)});xf.invert=Fc(function(kt){return kt});function Pf(){return Eu(xf).scale(79.4188).clipAngle(180-.001)}function qu(kt,Zt){return[kt,T(g((u+Zt)/2))]}qu.invert=function(kt,Zt){return[kt,2*m(M(Zt))-u]};function bf(){return jl(qu).scale(961/f)}function jl(kt){var Zt=Eu(kt),Er=Zt.center,xr=Zt.scale,Kr=Zt.translate,Mi=Zt.clipExtent,Wi=null,dn,wn,On;Zt.scale=function($i){return arguments.length?(xr($i),Yi()):xr()},Zt.translate=function($i){return arguments.length?(Kr($i),Yi()):Kr()},Zt.center=function($i){return arguments.length?(Er($i),Yi()):Er()},Zt.clipExtent=function($i){return arguments.length?($i==null?Wi=dn=wn=On=null:(Wi=+$i[0][0],dn=+$i[0][1],wn=+$i[1][0],On=+$i[1][1]),Yi()):Wi==null?null:[[Wi,dn],[wn,On]]};function Yi(){var $i=l*xr(),an=Zt(yn(Zt.rotate()).invert([0,0]));return Mi(Wi==null?[[an[0]-$i,an[1]-$i],[an[0]+$i,an[1]+$i]]:kt===qu?[[Math.max(an[0]-$i,Wi),dn],[Math.min(an[0]+$i,wn),On]]:[[Wi,Math.max(an[1]-$i,dn)],[wn,Math.min(an[1]+$i,On)]])}return Yi()}function uf(kt){return g((u+kt)/2)}function Xh(kt,Zt){var Er=p(kt),xr=kt===Zt?x(kt):T(Er/p(Zt))/T(uf(Zt)/uf(kt)),Kr=Er*L(uf(kt),xr)/xr;if(!xr)return qu;function Mi(Wi,dn){Kr>0?dn<-u+o&&(dn=-u+o):dn>u-o&&(dn=u-o);var wn=Kr/L(uf(dn),xr);return[wn*x(xr*Wi),Kr-wn*p(xr*Wi)]}return Mi.invert=function(Wi,dn){var wn=Kr-dn,On=C(xr)*S(Wi*Wi+wn*wn),Yi=b(Wi,v(wn))*C(wn);return wn*xr<0&&(Yi-=l*C(Wi)*C(wn)),[Yi/xr,2*m(L(Kr/On,1/xr))-u]},Mi}function If(){return ks(Xh).scale(109.5).parallels([30,30])}function Cs(kt,Zt){return[kt,Zt]}Cs.invert=Cs;function du(){return Eu(Cs).scale(152.63)}function ku(kt,Zt){var Er=p(kt),xr=kt===Zt?x(kt):(Er-p(Zt))/(Zt-kt),Kr=Er/xr+kt;if(v(xr)o&&--xr>0);return[kt/(.8707+(Mi=Er*Er)*(-.131979+Mi*(-.013791+Mi*Mi*Mi*(.003971-.001529*Mi)))),Er]};function Tc(){return Eu(qc).scale(175.295)}function wl(kt,Zt){return[p(Zt)*x(kt),x(Zt)]}wl.invert=Fc(E);function vu(){return Eu(wl).scale(249.5).clipAngle(90+o)}function Oc(kt,Zt){var Er=p(Zt),xr=1+p(kt)*Er;return[Er*x(kt)/xr,x(Zt)/xr]}Oc.invert=Fc(function(kt){return 2*m(kt)});function ff(){return Eu(Oc).scale(250).clipAngle(142)}function fc(kt,Zt){return[T(g((u+Zt)/2)),-kt]}fc.invert=function(kt,Zt){return[-Zt,2*m(M(kt))-u]};function Bc(){var kt=jl(fc),Zt=kt.center,Er=kt.rotate;return kt.center=function(xr){return arguments.length?Zt([-xr[1],xr[0]]):(xr=Zt(),[xr[1],-xr[0]])},kt.rotate=function(xr){return arguments.length?Er([xr[0],xr[1],xr.length>2?xr[2]+90:90]):(xr=Er(),[xr[0],xr[1],xr[2]-90])},Er([0,0,90]).scale(159.155)}e.geoAlbers=nl,e.geoAlbersUsa=Mh,e.geoArea=me,e.geoAzimuthalEqualArea=bd,e.geoAzimuthalEqualAreaRaw=wc,e.geoAzimuthalEquidistant=Pf,e.geoAzimuthalEquidistantRaw=xf,e.geoBounds=Ge,e.geoCentroid=wr,e.geoCircle=ua,e.geoClipAntimeridian=Jr,e.geoClipCircle=En,e.geoClipExtent=Ma,e.geoClipRectangle=ea,e.geoConicConformal=If,e.geoConicConformalRaw=Xh,e.geoConicEqualArea=_u,e.geoConicEqualAreaRaw=hu,e.geoConicEquidistant=Xf,e.geoConicEquidistantRaw=ku,e.geoContains=bs,e.geoDistance=As,e.geoEqualEarth=Zf,e.geoEqualEarthRaw=cf,e.geoEquirectangular=du,e.geoEquirectangularRaw=Cs,e.geoGnomonic=ah,e.geoGnomonicRaw=Wl,e.geoGraticule=Vu,e.geoGraticule10=ql,e.geoIdentity=Zu,e.geoInterpolate=xo,e.geoLength=zl,e.geoMercator=bf,e.geoMercatorRaw=qu,e.geoNaturalEarth1=Tc,e.geoNaturalEarth1Raw=qc,e.geoOrthographic=vu,e.geoOrthographicRaw=wl,e.geoPath=eh,e.geoProjection=Eu,e.geoProjectionMutator=Dc,e.geoRotation=yn,e.geoStereographic=ff,e.geoStereographicRaw=Oc,e.geoStream=H,e.geoTransform=th,e.geoTransverseMercator=Bc,e.geoTransverseMercatorRaw=fc,Object.defineProperty(e,"__esModule",{value:!0})})});var VDe=ye((qF,UDe)=>{(function(e,t){typeof qF=="object"&&typeof UDe!="undefined"?t(qF,UZ(),dk()):t(e.d3=e.d3||{},e.d3,e.d3)})(qF,function(e,t,r){"use strict";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,u=Math.log,c=Math.max,f=Math.min,h=Math.pow,d=Math.round,v=Math.sign||function(ve){return ve>0?1:ve<0?-1:0},m=Math.sin,b=Math.tan,p=1e-6,k=1e-12,M=Math.PI,T=M/2,L=M/4,x=Math.SQRT1_2,C=G(2),S=G(M),g=M*2,P=180/M,E=M/180;function z(ve){return ve?ve/Math.sin(ve):1}function q(ve){return ve>1?T:ve<-1?-T:Math.asin(ve)}function V(ve){return ve>1?0:ve<-1?M:Math.acos(ve)}function G(ve){return ve>0?Math.sqrt(ve):0}function Z(ve){return ve=s(2*ve),(ve-1)/(ve+1)}function j(ve){return(s(ve)-s(-ve))/2}function N(ve){return(s(ve)+s(-ve))/2}function H(ve){return u(ve+G(ve*ve+1))}function ie(ve){return u(ve+G(ve*ve-1))}function ae(ve){var xe=b(ve/2),Ie=2*u(o(ve/2))/(xe*xe);function ze(Qe,Xe){var nt=o(Qe),qt=o(Xe),Wt=m(Xe),nr=qt*nt,fr=-((1-nr?u((1+nr)/2)/(1-nr):-.5)+Ie/(1+nr));return[fr*qt*m(Qe),fr*Wt]}return ze.invert=function(Qe,Xe){var nt=G(Qe*Qe+Xe*Xe),qt=-ve/2,Wt=50,nr;if(!nt)return[0,0];do{var fr=qt/2,br=o(fr),Fr=m(fr),Hr=Fr/br,ri=-u(n(br));qt-=nr=(2/Hr*ri-Ie*Hr-nt)/(-ri/(Fr*Fr)+1-Ie/(2*br*br))*(br<0?.7:1)}while(n(nr)>p&&--Wt>0);var Ci=m(qt);return[a(Qe*Ci,nt*o(qt)),q(Xe*Ci/nt)]},ze}function _e(){var ve=T,xe=t.geoProjectionMutator(ae),Ie=xe(ve);return Ie.radius=function(ze){return arguments.length?xe(ve=ze*E):ve*P},Ie.scale(179.976).clipAngle(147)}function Ee(ve,xe){var Ie=o(xe),ze=z(V(Ie*o(ve/=2)));return[2*Ie*m(ve)*ze,m(xe)*ze]}Ee.invert=function(ve,xe){if(!(ve*ve+4*xe*xe>M*M+p)){var Ie=ve,ze=xe,Qe=25;do{var Xe=m(Ie),nt=m(Ie/2),qt=o(Ie/2),Wt=m(ze),nr=o(ze),fr=m(2*ze),br=Wt*Wt,Fr=nr*nr,Hr=nt*nt,ri=1-Fr*qt*qt,Ci=ri?V(nr*qt)*G(cn=1/ri):cn=0,cn,sn=2*Ci*nr*nt-ve,Ln=Ci*Wt-xe,Yn=cn*(Fr*Hr+Ci*nr*qt*br),Aa=cn*(.5*Xe*fr-Ci*2*Wt*nt),fa=cn*.25*(fr*nt-Ci*Wt*Fr*Xe),$a=cn*(br*qt+Ci*Hr*nr),Co=Aa*fa-$a*Yn;if(!Co)break;var Qa=(Ln*Aa-sn*$a)/Co,mo=(sn*fa-Ln*Yn)/Co;Ie-=Qa,ze-=mo}while((n(Qa)>p||n(mo)>p)&&--Qe>0);return[Ie,ze]}};function Ce(){return t.geoProjection(Ee).scale(152.63)}function ge(ve){var xe=m(ve),Ie=o(ve),ze=ve>=0?1:-1,Qe=b(ze*ve),Xe=(1+xe-Ie)/2;function nt(qt,Wt){var nr=o(Wt),fr=o(qt/=2);return[(1+nr)*m(qt),(ze*Wt>-a(fr,Qe)-.001?0:-ze*10)+Xe+m(Wt)*Ie-(1+nr)*xe*fr]}return nt.invert=function(qt,Wt){var nr=0,fr=0,br=50;do{var Fr=o(nr),Hr=m(nr),ri=o(fr),Ci=m(fr),cn=1+ri,sn=cn*Hr-qt,Ln=Xe+Ci*Ie-cn*xe*Fr-Wt,Yn=cn*Fr/2,Aa=-Hr*Ci,fa=xe*cn*Hr/2,$a=Ie*ri+xe*Fr*Ci,Co=Aa*fa-$a*Yn,Qa=(Ln*Aa-sn*$a)/Co/2,mo=(sn*fa-Ln*Yn)/Co;n(mo)>2&&(mo/=2),nr-=Qa,fr-=mo}while((n(Qa)>p||n(mo)>p)&&--br>0);return ze*fr>-a(o(nr),Qe)-.001?[nr*2,fr]:null},nt}function re(){var ve=20*E,xe=ve>=0?1:-1,Ie=b(xe*ve),ze=t.geoProjectionMutator(ge),Qe=ze(ve),Xe=Qe.stream;return Qe.parallel=function(nt){return arguments.length?(Ie=b((xe=(ve=nt*E)>=0?1:-1)*ve),ze(ve)):ve*P},Qe.stream=function(nt){var qt=Qe.rotate(),Wt=Xe(nt),nr=(Qe.rotate([0,0]),Xe(nt)),fr=Qe.precision();return Qe.rotate(qt),Wt.sphere=function(){nr.polygonStart(),nr.lineStart();for(var br=xe*-180;xe*br<180;br+=xe*90)nr.point(br,xe*90);if(ve)for(;xe*(br-=3*xe*fr)>=-180;)nr.point(br,xe*-a(o(br*E/2),Ie)*P);nr.lineEnd(),nr.polygonEnd()},Wt},Qe.scale(218.695).center([0,28.0974])}function Se(ve,xe){var Ie=b(xe/2),ze=G(1-Ie*Ie),Qe=1+ze*o(ve/=2),Xe=m(ve)*ze/Qe,nt=Ie/Qe,qt=Xe*Xe,Wt=nt*nt;return[4/3*Xe*(3+qt-3*Wt),4/3*nt*(3+3*qt-Wt)]}Se.invert=function(ve,xe){if(ve*=3/8,xe*=3/8,!ve&&n(xe)>1)return null;var Ie=ve*ve,ze=xe*xe,Qe=1+Ie+ze,Xe=G((Qe-G(Qe*Qe-4*xe*xe))/2),nt=q(Xe)/3,qt=Xe?ie(n(xe/Xe))/3:H(n(ve))/3,Wt=o(nt),nr=N(qt),fr=nr*nr-Wt*Wt;return[v(ve)*2*a(j(qt)*Wt,.25-fr),v(xe)*2*a(nr*m(nt),.25+fr)]};function ke(){return t.geoProjection(Se).scale(66.1603)}var be=G(8),Be=u(1+C);function Le(ve,xe){var Ie=n(xe);return Iek&&--ze>0);return[ve/(o(Ie)*(be-1/m(Ie))),v(xe)*Ie]};function me(){return t.geoProjection(Le).scale(112.314)}function Pe(ve){var xe=2*M/ve;function Ie(ze,Qe){var Xe=t.geoAzimuthalEquidistantRaw(ze,Qe);if(n(ze)>T){var nt=a(Xe[1],Xe[0]),qt=G(Xe[0]*Xe[0]+Xe[1]*Xe[1]),Wt=xe*d((nt-T)/xe)+T,nr=a(m(nt-=Wt),2-o(nt));nt=Wt+q(M/qt*m(nr))-nr,Xe[0]=qt*o(nt),Xe[1]=qt*m(nt)}return Xe}return Ie.invert=function(ze,Qe){var Xe=G(ze*ze+Qe*Qe);if(Xe>T){var nt=a(Qe,ze),qt=xe*d((nt-T)/xe)+T,Wt=nt>qt?-1:1,nr=Xe*o(qt-nt),fr=1/b(Wt*V((nr-M)/G(M*(M-2*nr)+Xe*Xe)));nt=qt+2*i((fr+Wt*G(fr*fr-3))/3),ze=Xe*o(nt),Qe=Xe*m(nt)}return t.geoAzimuthalEquidistantRaw.invert(ze,Qe)},Ie}function ce(){var ve=5,xe=t.geoProjectionMutator(Pe),Ie=xe(ve),ze=Ie.stream,Qe=.01,Xe=-o(Qe*E),nt=m(Qe*E);return Ie.lobes=function(qt){return arguments.length?xe(ve=+qt):ve},Ie.stream=function(qt){var Wt=Ie.rotate(),nr=ze(qt),fr=(Ie.rotate([0,0]),ze(qt));return Ie.rotate(Wt),nr.sphere=function(){fr.polygonStart(),fr.lineStart();for(var br=0,Fr=360/ve,Hr=2*M/ve,ri=90-180/ve,Ci=T;br0&&n(Qe)>p);return ze<0?NaN:Ie}function at(ve,xe,Ie){return xe===void 0&&(xe=40),Ie===void 0&&(Ie=k),function(ze,Qe,Xe,nt){var qt,Wt,nr;Xe=Xe===void 0?0:+Xe,nt=nt===void 0?0:+nt;for(var fr=0;frqt){Xe-=Wt/=2,nt-=nr/=2;continue}qt=ri;var Ci=(Xe>0?-1:1)*Ie,cn=(nt>0?-1:1)*Ie,sn=ve(Xe+Ci,nt),Ln=ve(Xe,nt+cn),Yn=(sn[0]-br[0])/Ci,Aa=(sn[1]-br[1])/Ci,fa=(Ln[0]-br[0])/cn,$a=(Ln[1]-br[1])/cn,Co=$a*Yn-Aa*fa,Qa=(n(Co)<.5?.5:1)/Co;if(Wt=(Hr*fa-Fr*$a)*Qa,nr=(Fr*Aa-Hr*Yn)*Qa,Xe+=Wt,nt+=nr,n(Wt)0&&(qt[1]*=1+Wt/1.5*qt[0]*qt[0]),qt}return ze.invert=at(ze),ze}function ar(){return t.geoProjection(ct()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Vt(ve,xe){var Ie=ve*m(xe),ze=30,Qe;do xe-=Qe=(xe+m(xe)-Ie)/(1+o(xe));while(n(Qe)>p&&--ze>0);return xe/2}function rr(ve,xe,Ie){function ze(Qe,Xe){return[ve*Qe*o(Xe=Vt(Ie,Xe)),xe*m(Xe)]}return ze.invert=function(Qe,Xe){return Xe=q(Xe/xe),[Qe/(ve*o(Xe)),q((2*Xe+m(2*Xe))/Ie)]},ze}var tt=rr(C/T,C,M);function je(){return t.geoProjection(tt).scale(169.529)}var Ue=2.00276,Ae=1.11072;function rt(ve,xe){var Ie=Vt(M,xe);return[Ue*ve/(1/o(xe)+Ae/o(Ie)),(xe+C*m(Ie))/Ue]}rt.invert=function(ve,xe){var Ie=Ue*xe,ze=xe<0?-L:L,Qe=25,Xe,nt;do nt=Ie-C*m(ze),ze-=Xe=(m(2*ze)+2*ze-M*m(nt))/(2*o(2*ze)+2+M*o(nt)*C*o(ze));while(n(Xe)>p&&--Qe>0);return nt=Ie-C*m(ze),[ve*(1/o(nt)+Ae/o(ze))/Ue,nt]};function St(){return t.geoProjection(rt).scale(160.857)}function Tt(ve){var xe=0,Ie=t.geoProjectionMutator(ve),ze=Ie(xe);return ze.parallel=function(Qe){return arguments.length?Ie(xe=Qe*E):xe*P},ze}function dt(ve,xe){return[ve*o(xe),xe]}dt.invert=function(ve,xe){return[ve/o(xe),xe]};function Et(){return t.geoProjection(dt).scale(152.63)}function pt(ve){if(!ve)return dt;var xe=1/b(ve);function Ie(ze,Qe){var Xe=xe+ve-Qe,nt=Xe&&ze*o(Qe)/Xe;return[Xe*m(nt),xe-Xe*o(nt)]}return Ie.invert=function(ze,Qe){var Xe=G(ze*ze+(Qe=xe-Qe)*Qe),nt=xe+ve-Xe;return[Xe/o(nt)*a(ze,Qe),nt]},Ie}function jt(){return Tt(pt).scale(123.082).center([0,26.1441]).parallel(45)}function or(ve){function xe(Ie,ze){var Qe=T-ze,Xe=Qe&&Ie*ve*m(Qe)/Qe;return[Qe*m(Xe)/ve,T-Qe*o(Xe)]}return xe.invert=function(Ie,ze){var Qe=Ie*ve,Xe=T-ze,nt=G(Qe*Qe+Xe*Xe),qt=a(Qe,Xe);return[(nt?nt/m(nt):1)*qt/ve,T-nt]},xe}function mr(){var ve=.5,xe=t.geoProjectionMutator(or),Ie=xe(ve);return Ie.fraction=function(ze){return arguments.length?xe(ve=+ze):ve},Ie.scale(158.837)}var Ar=rr(1,4/M,M);function ei(){return t.geoProjection(Ar).scale(152.63)}function qr(ve,xe,Ie,ze,Qe,Xe){var nt=o(Xe),qt;if(n(ve)>1||n(Xe)>1)qt=V(Ie*Qe+xe*ze*nt);else{var Wt=m(ve/2),nr=m(Xe/2);qt=2*q(G(Wt*Wt+xe*ze*nr*nr))}return n(qt)>p?[qt,a(ze*m(Xe),xe*Qe-Ie*ze*nt)]:[0,0]}function jr(ve,xe,Ie){return V((ve*ve+xe*xe-Ie*Ie)/(2*ve*xe))}function gt(ve){return ve-2*M*l((ve+M)/(2*M))}function Ge(ve,xe,Ie){for(var ze=[[ve[0],ve[1],m(ve[1]),o(ve[1])],[xe[0],xe[1],m(xe[1]),o(xe[1])],[Ie[0],Ie[1],m(Ie[1]),o(Ie[1])]],Qe=ze[2],Xe,nt=0;nt<3;++nt,Qe=Xe)Xe=ze[nt],Qe.v=qr(Xe[1]-Qe[1],Qe[3],Qe[2],Xe[3],Xe[2],Xe[0]-Qe[0]),Qe.point=[0,0];var qt=jr(ze[0].v[0],ze[2].v[0],ze[1].v[0]),Wt=jr(ze[0].v[0],ze[1].v[0],ze[2].v[0]),nr=M-qt;ze[2].point[1]=0,ze[0].point[0]=-(ze[1].point[0]=ze[0].v[0]/2);var fr=[ze[2].point[0]=ze[0].point[0]+ze[2].v[0]*o(qt),2*(ze[0].point[1]=ze[1].point[1]=ze[2].v[0]*m(qt))];function br(Fr,Hr){var ri=m(Hr),Ci=o(Hr),cn=new Array(3),sn;for(sn=0;sn<3;++sn){var Ln=ze[sn];if(cn[sn]=qr(Hr-Ln[1],Ln[3],Ln[2],Ci,ri,Fr-Ln[0]),!cn[sn][0])return Ln.point;cn[sn][1]=gt(cn[sn][1]-Ln.v[1])}var Yn=fr.slice();for(sn=0;sn<3;++sn){var Aa=sn==2?0:sn+1,fa=jr(ze[sn].v[0],cn[sn][0],cn[Aa][0]);cn[sn][1]<0&&(fa=-fa),sn?sn==1?(fa=Wt-fa,Yn[0]-=cn[sn][0]*o(fa),Yn[1]-=cn[sn][0]*m(fa)):(fa=nr-fa,Yn[0]+=cn[sn][0]*o(fa),Yn[1]+=cn[sn][0]*m(fa)):(Yn[0]+=cn[sn][0]*o(fa),Yn[1]-=cn[sn][0]*m(fa))}return Yn[0]/=3,Yn[1]/=3,Yn}return br}function Je(ve){return ve[0]*=E,ve[1]*=E,ve}function We(){return et([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function et(ve,xe,Ie){var ze=t.geoCentroid({type:"MultiPoint",coordinates:[ve,xe,Ie]}),Qe=[-ze[0],-ze[1]],Xe=t.geoRotation(Qe),nt=Ge(Je(Xe(ve)),Je(Xe(xe)),Je(Xe(Ie)));nt.invert=at(nt);var qt=t.geoProjection(nt).rotate(Qe),Wt=qt.center;return delete qt.rotate,qt.center=function(nr){return arguments.length?Wt(Xe(nr)):Xe.invert(Wt())},qt.clipAngle(90)}function xt(ve,xe){var Ie=G(1-m(xe));return[2/S*ve*Ie,S*(1-Ie)]}xt.invert=function(ve,xe){var Ie=(Ie=xe/S-1)*Ie;return[Ie>0?ve*G(M/Ie)/2:0,q(1-Ie)]};function At(){return t.geoProjection(xt).scale(95.6464).center([0,30])}function Kt(ve){var xe=b(ve);function Ie(ze,Qe){return[ze,(ze?ze/m(ze):1)*(m(Qe)*o(ze)-xe*o(Qe))]}return Ie.invert=xe?function(ze,Qe){ze&&(Qe*=m(ze)/ze);var Xe=o(ze);return[ze,2*a(G(Xe*Xe+xe*xe-Qe*Qe)-Xe,xe-Qe)]}:function(ze,Qe){return[ze,q(ze?Qe*b(ze)/ze:Qe)]},Ie}function Qt(){return Tt(Kt).scale(249.828).clipAngle(90)}var Mr=G(3);function Gr(ve,xe){return[Mr*ve*(2*o(2*xe/3)-1)/S,Mr*S*m(xe/3)]}Gr.invert=function(ve,xe){var Ie=3*q(xe/(Mr*S));return[S*ve/(Mr*(2*o(2*Ie/3)-1)),Ie]};function Ir(){return t.geoProjection(Gr).scale(156.19)}function Yr(ve){var xe=o(ve);function Ie(ze,Qe){return[ze*xe,m(Qe)/xe]}return Ie.invert=function(ze,Qe){return[ze/xe,q(Qe*xe)]},Ie}function _i(){return Tt(Yr).parallel(38.58).scale(195.044)}function Pi(ve){var xe=o(ve);function Ie(ze,Qe){return[ze*xe,(1+xe)*b(Qe/2)]}return Ie.invert=function(ze,Qe){return[ze/xe,i(Qe/(1+xe))*2]},Ie}function ai(){return Tt(Pi).scale(124.75)}function mi(ve,xe){var Ie=G(8/(3*M));return[Ie*ve*(1-n(xe)/M),Ie*xe]}mi.invert=function(ve,xe){var Ie=G(8/(3*M)),ze=xe/Ie;return[ve/(Ie*(1-n(ze)/M)),ze]};function un(){return t.geoProjection(mi).scale(165.664)}function Fn(ve,xe){var Ie=G(4-3*m(n(xe)));return[2/G(6*M)*ve*Ie,v(xe)*G(2*M/3)*(2-Ie)]}Fn.invert=function(ve,xe){var Ie=2-n(xe)/G(2*M/3);return[ve*G(6*M)/(2*Ie),v(xe)*q((4-Ie*Ie)/3)]};function An(){return t.geoProjection(Fn).scale(165.664)}function Hn(ve,xe){var Ie=G(M*(4+M));return[2/Ie*ve*(1+G(1-4*xe*xe/(M*M))),4/Ie*xe]}Hn.invert=function(ve,xe){var Ie=G(M*(4+M))/2;return[ve*Ie/(1+G(1-xe*xe*(4+M)/(4*M))),xe*Ie/2]};function Qn(){return t.geoProjection(Hn).scale(180.739)}function Vi(ve,xe){var Ie=(2+T)*m(xe);xe/=2;for(var ze=0,Qe=1/0;ze<10&&n(Qe)>p;ze++){var Xe=o(xe);xe-=Qe=(xe+m(xe)*(Xe+2)-Ie)/(2*Xe*(1+Xe))}return[2/G(M*(4+M))*ve*(1+o(xe)),2*G(M/(4+M))*m(xe)]}Vi.invert=function(ve,xe){var Ie=xe*G((4+M)/M)/2,ze=q(Ie),Qe=o(ze);return[ve/(2/G(M*(4+M))*(1+Qe)),q((ze+Ie*(Qe+2))/(2+T))]};function Kn(){return t.geoProjection(Vi).scale(180.739)}function Jn(ve,xe){return[ve*(1+o(xe))/G(2+M),2*xe/G(2+M)]}Jn.invert=function(ve,xe){var Ie=G(2+M),ze=xe*Ie/2;return[Ie*ve/(1+o(ze)),ze]};function Gt(){return t.geoProjection(Jn).scale(173.044)}function wt(ve,xe){for(var Ie=(1+T)*m(xe),ze=0,Qe=1/0;ze<10&&n(Qe)>p;ze++)xe-=Qe=(xe+m(xe)-Ie)/(1+o(xe));return Ie=G(2+M),[ve*(1+o(xe))/Ie,2*xe/Ie]}wt.invert=function(ve,xe){var Ie=1+T,ze=G(Ie/2);return[ve*2*ze/(1+o(xe*=ze)),q((xe+m(xe))/Ie)]};function tr(){return t.geoProjection(wt).scale(173.044)}var ir=3+2*C;function wr(ve,xe){var Ie=m(ve/=2),ze=o(ve),Qe=G(o(xe)),Xe=o(xe/=2),nt=m(xe)/(Xe+C*ze*Qe),qt=G(2/(1+nt*nt)),Wt=G((C*Xe+(ze+Ie)*Qe)/(C*Xe+(ze-Ie)*Qe));return[ir*(qt*(Wt-1/Wt)-2*u(Wt)),ir*(qt*nt*(Wt+1/Wt)-2*i(nt))]}wr.invert=function(ve,xe){if(!(Xe=Se.invert(ve/1.2,xe*1.065)))return null;var Ie=Xe[0],ze=Xe[1],Qe=20,Xe;ve/=ir,xe/=ir;do{var nt=Ie/2,qt=ze/2,Wt=m(nt),nr=o(nt),fr=m(qt),br=o(qt),Fr=o(ze),Hr=G(Fr),ri=fr/(br+C*nr*Hr),Ci=ri*ri,cn=G(2/(1+Ci)),sn=C*br+(nr+Wt)*Hr,Ln=C*br+(nr-Wt)*Hr,Yn=sn/Ln,Aa=G(Yn),fa=Aa-1/Aa,$a=Aa+1/Aa,Co=cn*fa-2*u(Aa)-ve,Qa=cn*ri*$a-2*i(ri)-xe,mo=fr&&x*Hr*Wt*Ci/fr,Bo=(C*nr*br+Hr)/(2*(br+C*nr*Hr)*(br+C*nr*Hr)*Hr),Ps=-.5*ri*cn*cn*cn,Ts=Ps*mo,wo=Ps*Bo,To=(To=2*br+C*Hr*(nr-Wt))*To*Aa,hl=(C*nr*br*Hr+Fr)/To,Ul=-(C*Wt*fr)/(Hr*To),Lu=fa*Ts-2*hl/Aa+cn*(hl+hl/Yn),au=fa*wo-2*Ul/Aa+cn*(Ul+Ul/Yn),Js=ri*$a*Ts-2*mo/(1+Ci)+cn*$a*mo+cn*ri*(hl-hl/Yn),eu=ri*$a*wo-2*Bo/(1+Ci)+cn*$a*Bo+cn*ri*(Ul-Ul/Yn),dc=au*Js-eu*Lu;if(!dc)break;var Tl=(Qa*au-Co*eu)/dc,Al=(Co*Js-Qa*Lu)/dc;Ie-=Tl,ze=c(-T,f(T,ze-Al))}while((n(Tl)>p||n(Al)>p)&&--Qe>0);return n(n(ze)-T)ze){var br=G(fr),Fr=a(nr,Wt),Hr=Ie*d(Fr/Ie),ri=Fr-Hr,Ci=ve*o(ri),cn=(ve*m(ri)-ri*m(Ci))/(T-Ci),sn=Wa(ri,cn),Ln=(M-ve)/Fa(sn,Ci,M);Wt=br;var Yn=50,Aa;do Wt-=Aa=(ve+Fa(sn,Ci,Wt)*Ln-br)/(sn(Wt)*Ln);while(n(Aa)>p&&--Yn>0);nr=ri*m(Wt),Wtze){var Wt=G(qt),nr=a(nt,Xe),fr=Ie*d(nr/Ie),br=nr-fr;Xe=Wt*o(br),nt=Wt*m(br);for(var Fr=Xe-T,Hr=m(Xe),ri=nt/Hr,Ci=Xep||n(ri)>p)&&--Ci>0);return[br,Fr]},Wt}var jn=da(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Ha(){return t.geoProjection(jn).scale(149.995)}var vo=da(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Gn(){return t.geoProjection(vo).scale(153.93)}var Ct=da(5/6*M,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Sr(){return t.geoProjection(Ct).scale(130.945)}function Jr(ve,xe){var Ie=ve*ve,ze=xe*xe;return[ve*(1-.162388*ze)*(.87-952426e-9*Ie*Ie),xe*(1+ze/12)]}Jr.invert=function(ve,xe){var Ie=ve,ze=xe,Qe=50,Xe;do{var nt=ze*ze;ze-=Xe=(ze*(1+nt/12)-xe)/(1+nt/4)}while(n(Xe)>p&&--Qe>0);Qe=50,ve/=1-.162388*nt;do{var qt=(qt=Ie*Ie)*qt;Ie-=Xe=(Ie*(.87-952426e-9*qt)-ve)/(.87-.00476213*qt)}while(n(Xe)>p&&--Qe>0);return[Ie,ze]};function hi(){return t.geoProjection(Jr).scale(131.747)}var hn=da(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Sn(){return t.geoProjection(hn).scale(131.087)}function En(ve){var xe=ve(T,0)[0]-ve(-T,0)[0];function Ie(ze,Qe){var Xe=ze>0?-.5:.5,nt=ve(ze+Xe*M,Qe);return nt[0]-=Xe*xe,nt}return ve.invert&&(Ie.invert=function(ze,Qe){var Xe=ze>0?-.5:.5,nt=ve.invert(ze+Xe*xe,Qe),qt=nt[0]-Xe*M;return qt<-M?qt+=2*M:qt>M&&(qt-=2*M),nt[0]=qt,nt}),Ie}function ki(ve,xe){var Ie=v(ve),ze=v(xe),Qe=o(xe),Xe=o(ve)*Qe,nt=m(ve)*Qe,qt=m(ze*xe);ve=n(a(nt,qt)),xe=q(Xe),n(ve-T)>p&&(ve%=T);var Wt=_n(ve>M/4?T-ve:ve,xe);return ve>M/4&&(qt=Wt[0],Wt[0]=-Wt[1],Wt[1]=-qt),Wt[0]*=Ie,Wt[1]*=-ze,Wt}ki.invert=function(ve,xe){n(ve)>1&&(ve=v(ve)*2-ve),n(xe)>1&&(xe=v(xe)*2-xe);var Ie=v(ve),ze=v(xe),Qe=-Ie*ve,Xe=-ze*xe,nt=Xe/Qe<1,qt=ya(nt?Xe:Qe,nt?Qe:Xe),Wt=qt[0],nr=qt[1],fr=o(nr);return nt&&(Wt=-T-Wt),[Ie*(a(m(Wt)*fr,-m(nr))+M),ze*q(o(Wt)*fr)]};function _n(ve,xe){if(xe===T)return[0,0];var Ie=m(xe),ze=Ie*Ie,Qe=ze*ze,Xe=1+Qe,nt=1+3*Qe,qt=1-Qe,Wt=q(1/G(Xe)),nr=qt+ze*Xe*Wt,fr=(1-Ie)/nr,br=G(fr),Fr=fr*Xe,Hr=G(Fr),ri=br*qt,Ci,cn;if(ve===0)return[0,-(ri+ze*Hr)];var sn=o(xe),Ln=1/sn,Yn=2*Ie*sn,Aa=(-3*ze+Wt*nt)*Yn,fa=(-nr*sn-(1-Ie)*Aa)/(nr*nr),$a=.5*fa/br,Co=qt*$a-2*ze*br*Yn,Qa=ze*Xe*fa+fr*nt*Yn,mo=-Ln*Yn,Bo=-Ln*Qa,Ps=-2*Ln*Co,Ts=4*ve/M,wo;if(ve>.222*M||xe.175*M){if(Ci=(ri+ze*G(Fr*(1+Qe)-ri*ri))/(1+Qe),ve>M/4)return[Ci,Ci];var To=Ci,hl=.5*Ci;Ci=.5*(hl+To),cn=50;do{var Ul=G(Fr-Ci*Ci),Lu=Ci*(Ps+mo*Ul)+Bo*q(Ci/Hr)-Ts;if(!Lu)break;Lu<0?hl=Ci:To=Ci,Ci=.5*(hl+To)}while(n(To-hl)>p&&--cn>0)}else{Ci=p,cn=25;do{var au=Ci*Ci,Js=G(Fr-au),eu=Ps+mo*Js,dc=Ci*eu+Bo*q(Ci/Hr)-Ts,Tl=eu+(Bo-mo*au)/Js;Ci-=wo=Js?dc/Tl:0}while(n(wo)>p&&--cn>0)}return[Ci,-ri-ze*G(Fr-Ci*Ci)]}function ya(ve,xe){for(var Ie=0,ze=1,Qe=.5,Xe=50;;){var nt=Qe*Qe,qt=G(Qe),Wt=q(1/G(1+nt)),nr=1-nt+Qe*(1+nt)*Wt,fr=(1-qt)/nr,br=G(fr),Fr=fr*(1+nt),Hr=br*(1-nt),ri=Fr-ve*ve,Ci=G(ri),cn=xe+Hr+Qe*Ci;if(n(ze-Ie)0?Ie=Qe:ze=Qe,Qe=.5*(Ie+ze)}if(!Xe)return null;var sn=q(qt),Ln=o(sn),Yn=1/Ln,Aa=2*qt*Ln,fa=(-3*Qe+Wt*(1+3*nt))*Aa,$a=(-nr*Ln-(1-qt)*fa)/(nr*nr),Co=.5*$a/br,Qa=(1-nt)*Co-2*Qe*br*Aa,mo=-2*Yn*Qa,Bo=-Yn*Aa,Ps=-Yn*(Qe*(1+nt)*$a+fr*(1+3*nt)*Aa);return[M/4*(ve*(mo+Bo*Ci)+Ps*q(ve/G(Fr))),sn]}function ea(){return t.geoProjection(En(ki)).scale(239.75)}function Ma(ve,xe,Ie){var ze,Qe,Xe;return ve?(ze=_o(ve,Ie),xe?(Qe=_o(xe,1-Ie),Xe=Qe[1]*Qe[1]+Ie*ze[0]*ze[0]*Qe[0]*Qe[0],[[ze[0]*Qe[2]/Xe,ze[1]*ze[2]*Qe[0]*Qe[1]/Xe],[ze[1]*Qe[1]/Xe,-ze[0]*ze[2]*Qe[0]*Qe[2]/Xe],[ze[2]*Qe[1]*Qe[2]/Xe,-Ie*ze[0]*ze[1]*Qe[0]/Xe]]):[[ze[0],0],[ze[1],0],[ze[2],0]]):(Qe=_o(xe,1-Ie),[[0,Qe[0]/Qe[1]],[1/Qe[1],0],[Qe[2]/Qe[1],0]])}function _o(ve,xe){var Ie,ze,Qe,Xe,nt;if(xe=1-p)return Ie=(1-xe)/4,ze=N(ve),Xe=Z(ve),Qe=1/ze,nt=ze*j(ve),[Xe+Ie*(nt-ve)/(ze*ze),Qe-Ie*Xe*Qe*(nt-ve),Qe+Ie*Xe*Qe*(nt+ve),2*i(s(ve))-T+Ie*(nt-ve)/ze];var qt=[1,0,0,0,0,0,0,0,0],Wt=[G(xe),0,0,0,0,0,0,0,0],nr=0;for(ze=G(1-xe),nt=1;n(Wt[nr]/qt[nr])>p&&nr<8;)Ie=qt[nr++],Wt[nr]=(Ie-ze)/2,qt[nr]=(Ie+ze)/2,ze=G(Ie*ze),nt*=2;Qe=nt*qt[nr]*ve;do Xe=Wt[nr]*m(ze=Qe)/qt[nr],Qe=(q(Xe)+Qe)/2;while(--nr);return[m(Qe),Xe=o(Qe),Xe/o(Qe-ze),Qe]}function No(ve,xe,Ie){var ze=n(ve),Qe=n(xe),Xe=j(Qe);if(ze){var nt=1/m(ze),qt=1/(b(ze)*b(ze)),Wt=-(qt+Ie*(Xe*Xe*nt*nt)-1+Ie),nr=(Ie-1)*qt,fr=(-Wt+G(Wt*Wt-4*nr))/2;return[po(i(1/G(fr)),Ie)*v(ve),po(i(G((fr/qt-1)/Ie)),1-Ie)*v(xe)]}return[0,po(i(Xe),1-Ie)*v(xe)]}function po(ve,xe){if(!xe)return ve;if(xe===1)return u(b(ve/2+L));for(var Ie=1,ze=G(1-xe),Qe=G(xe),Xe=0;n(Qe)>p;Xe++){if(ve%M){var nt=i(ze*b(ve)/Ie);nt<0&&(nt+=M),ve+=nt+~~(ve/M)*M}else ve+=ve;Qe=(Ie+ze)/2,ze=G(Ie*ze),Qe=((Ie=Qe)-ze)/2}return ve/(h(2,Xe)*Ie)}function Lo(ve,xe){var Ie=(C-1)/(C+1),ze=G(1-Ie*Ie),Qe=po(T,ze*ze),Xe=-1,nt=u(b(M/4+n(xe)/2)),qt=s(Xe*nt)/G(Ie),Wt=ko(qt*o(Xe*ve),qt*m(Xe*ve)),nr=No(Wt[0],Wt[1],ze*ze);return[-nr[1],(xe>=0?1:-1)*(.5*Qe-nr[0])]}function ko(ve,xe){var Ie=ve*ve,ze=xe+1,Qe=1-Ie-xe*xe;return[.5*((ve>=0?T:-T)-a(Qe,2*ve)),-.25*u(Qe*Qe+4*Ie)+.5*u(ze*ze+Ie)]}function Ds(ve,xe){var Ie=xe[0]*xe[0]+xe[1]*xe[1];return[(ve[0]*xe[0]+ve[1]*xe[1])/Ie,(ve[1]*xe[0]-ve[0]*xe[1])/Ie]}Lo.invert=function(ve,xe){var Ie=(C-1)/(C+1),ze=G(1-Ie*Ie),Qe=po(T,ze*ze),Xe=-1,nt=Ma(.5*Qe-xe,-ve,ze*ze),qt=Ds(nt[0],nt[1]),Wt=a(qt[1],qt[0])/Xe;return[Wt,2*i(s(.5/Xe*u(Ie*qt[0]*qt[0]+Ie*qt[1]*qt[1])))-T]};function Fs(){return t.geoProjection(En(Lo)).scale(151.496)}function ll(ve){var xe=m(ve),Ie=o(ve),ze=ul(ve);ze.invert=ul(-ve);function Qe(Xe,nt){var qt=ze(Xe,nt);Xe=qt[0],nt=qt[1];var Wt=m(nt),nr=o(nt),fr=o(Xe),br=V(xe*Wt+Ie*nr*fr),Fr=m(br),Hr=n(Fr)>p?br/Fr:1;return[Hr*Ie*m(Xe),(n(Xe)>T?Hr:-Hr)*(xe*nr-Ie*Wt*fr)]}return Qe.invert=function(Xe,nt){var qt=G(Xe*Xe+nt*nt),Wt=-m(qt),nr=o(qt),fr=qt*nr,br=-nt*Wt,Fr=qt*xe,Hr=G(fr*fr+br*br-Fr*Fr),ri=a(fr*Fr+br*Hr,br*Fr-fr*Hr),Ci=(qt>T?-1:1)*a(Xe*Wt,qt*o(ri)*nr+nt*m(ri)*Wt);return ze.invert(Ci,ri)},Qe}function ul(ve){var xe=m(ve),Ie=o(ve);return function(ze,Qe){var Xe=o(Qe),nt=o(ze)*Xe,qt=m(ze)*Xe,Wt=m(Qe);return[a(qt,nt*Ie-Wt*xe),q(Wt*Ie+nt*xe)]}}function zl(){var ve=0,xe=t.geoProjectionMutator(ll),Ie=xe(ve),ze=Ie.rotate,Qe=Ie.stream,Xe=t.geoCircle();return Ie.parallel=function(nt){if(!arguments.length)return ve*P;var qt=Ie.rotate();return xe(ve=nt*E).rotate(qt)},Ie.rotate=function(nt){return arguments.length?(ze.call(Ie,[nt[0],nt[1]-ve*P]),Xe.center([-nt[0],-nt[1]]),Ie):(nt=ze.call(Ie),nt[1]+=ve*P,nt)},Ie.stream=function(nt){return nt=Qe(nt),nt.sphere=function(){nt.polygonStart();var qt=.01,Wt=Xe.radius(90-qt)().coordinates[0],nr=Wt.length-1,fr=-1,br;for(nt.lineStart();++fr=0;)nt.point((br=Wt[fr])[0],br[1]);nt.lineEnd(),nt.polygonEnd()},nt},Ie.scale(79.4187).parallel(45).clipAngle(180-.001)}var us=3,il=q(1-1/us)*P,As=Yr(0);function cl(ve){var xe=il*E,Ie=xt(M,xe)[0]-xt(-M,xe)[0],ze=As(0,xe)[1],Qe=xt(0,xe)[1],Xe=S-Qe,nt=g/ve,qt=4/g,Wt=ze+Xe*Xe*4/g;function nr(fr,br){var Fr,Hr=n(br);if(Hr>xe){var ri=f(ve-1,c(0,l((fr+M)/nt)));fr+=M*(ve-1)/ve-ri*nt,Fr=xt(fr,Hr),Fr[0]=Fr[0]*g/Ie-g*(ve-1)/(2*ve)+ri*g/ve,Fr[1]=ze+(Fr[1]-Qe)*4*Xe/g,br<0&&(Fr[1]=-Fr[1])}else Fr=As(fr,br);return Fr[0]*=qt,Fr[1]/=Wt,Fr}return nr.invert=function(fr,br){fr/=qt,br*=Wt;var Fr=n(br);if(Fr>ze){var Hr=f(ve-1,c(0,l((fr+M)/nt)));fr=(fr+M*(ve-1)/ve-Hr*nt)*Ie/g;var ri=xt.invert(fr,.25*(Fr-ze)*g/Xe+Qe);return ri[0]-=M*(ve-1)/ve-Hr*nt,br<0&&(ri[1]=-ri[1]),ri}return As.invert(fr,br)},nr}function Ks(ve,xe){return[ve,xe&1?90-p:il]}function zs(ve,xe){return[ve,xe&1?-90+p:-il]}function Io(ve){return[ve[0]*(1-p),ve[1]]}function ls(ve){var xe=[].concat(r.range(-180,180+ve/2,ve).map(Ks),r.range(180,-180-ve/2,-ve).map(zs));return{type:"Polygon",coordinates:[ve===180?xe.map(Io):xe]}}function Yl(){var ve=4,xe=t.geoProjectionMutator(cl),Ie=xe(ve),ze=Ie.stream;return Ie.lobes=function(Qe){return arguments.length?xe(ve=+Qe):ve},Ie.stream=function(Qe){var Xe=Ie.rotate(),nt=ze(Qe),qt=(Ie.rotate([0,0]),ze(Qe));return Ie.rotate(Xe),nt.sphere=function(){t.geoStream(ls(180/ve),qt)},nt},Ie.scale(239.75)}function Su(ve){var xe=1+ve,Ie=m(1/xe),ze=q(Ie),Qe=2*G(M/(Xe=M+4*ze*xe)),Xe,nt=.5*Qe*(xe+G(ve*(2+ve))),qt=ve*ve,Wt=xe*xe;function nr(fr,br){var Fr=1-m(br),Hr,ri;if(Fr&&Fr<2){var Ci=T-br,cn=25,sn;do{var Ln=m(Ci),Yn=o(Ci),Aa=ze+a(Ln,xe-Yn),fa=1+Wt-2*xe*Yn;Ci-=sn=(Ci-qt*ze-xe*Ln+fa*Aa-.5*Fr*Xe)/(2*xe*Ln*Aa)}while(n(sn)>k&&--cn>0);Hr=Qe*G(fa),ri=fr*Aa/M}else Hr=Qe*(ve+Fr),ri=fr*ze/M;return[Hr*m(ri),nt-Hr*o(ri)]}return nr.invert=function(fr,br){var Fr=fr*fr+(br-=nt)*br,Hr=(1+Wt-Fr/(Qe*Qe))/(2*xe),ri=V(Hr),Ci=m(ri),cn=ze+a(Ci,xe-Hr);return[q(fr/G(Fr))*M/cn,q(1-2*(ri-qt*ze-xe*Ci+(1+Wt-2*xe*Hr)*cn)/Xe)]},nr}function nc(){var ve=1,xe=t.geoProjectionMutator(Su),Ie=xe(ve);return Ie.ratio=function(ze){return arguments.length?xe(ve=+ze):ve},Ie.scale(167.774).center([0,18.67])}var bs=.7109889596207567,Rn=.0528035274542;function _a(ve,xe){return xe>-bs?(ve=tt(ve,xe),ve[1]+=Rn,ve):dt(ve,xe)}_a.invert=function(ve,xe){return xe>-bs?tt.invert(ve,xe-Rn):dt.invert(ve,xe)};function Vu(){return t.geoProjection(_a).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function ql(ve,xe){return n(xe)>bs?(ve=tt(ve,xe),ve[1]-=xe>0?Rn:-Rn,ve):dt(ve,xe)}ql.invert=function(ve,xe){return n(xe)>bs?tt.invert(ve,xe+(xe>0?Rn:-Rn)):dt.invert(ve,xe)};function xo(){return t.geoProjection(ql).scale(152.63)}function Kl(ve,xe,Ie,ze){var Qe=G(4*M/(2*Ie+(1+ve-xe/2)*m(2*Ie)+(ve+xe)/2*m(4*Ie)+xe/2*m(6*Ie))),Xe=G(ze*m(Ie)*G((1+ve*o(2*Ie)+xe*o(4*Ie))/(1+ve+xe))),nt=Ie*Wt(1);function qt(br){return G(1+ve*o(2*br)+xe*o(4*br))}function Wt(br){var Fr=br*Ie;return(2*Fr+(1+ve-xe/2)*m(2*Fr)+(ve+xe)/2*m(4*Fr)+xe/2*m(6*Fr))/Ie}function nr(br){return qt(br)*m(br)}var fr=function(br,Fr){var Hr=Ie*Ht(Wt,nt*m(Fr)/Ie,Fr/M);isNaN(Hr)&&(Hr=Ie*v(Fr));var ri=Qe*qt(Hr);return[ri*Xe*br/M*o(Hr),ri/Xe*m(Hr)]};return fr.invert=function(br,Fr){var Hr=Ht(nr,Fr*Xe/Qe);return[br*M/(o(Hr)*Qe*Xe*qt(Hr)),q(Ie*Wt(Hr/Ie)/nt)]},Ie===0&&(Qe=G(ze/M),fr=function(br,Fr){return[br*Qe,m(Fr)/Qe]},fr.invert=function(br,Fr){return[br/Qe,q(Fr*Qe)]}),fr}function Ns(){var ve=1,xe=0,Ie=45*E,ze=2,Qe=t.geoProjectionMutator(Kl),Xe=Qe(ve,xe,Ie,ze);return Xe.a=function(nt){return arguments.length?Qe(ve=+nt,xe,Ie,ze):ve},Xe.b=function(nt){return arguments.length?Qe(ve,xe=+nt,Ie,ze):xe},Xe.psiMax=function(nt){return arguments.length?Qe(ve,xe,Ie=+nt*E,ze):Ie*P},Xe.ratio=function(nt){return arguments.length?Qe(ve,xe,Ie,ze=+nt):ze},Xe.scale(180.739)}function Hl(ve,xe,Ie,ze,Qe,Xe,nt,qt,Wt,nr,fr){if(fr.nanEncountered)return NaN;var br,Fr,Hr,ri,Ci,cn,sn,Ln,Yn,Aa;if(br=Ie-xe,Fr=ve(xe+br*.25),Hr=ve(Ie-br*.25),isNaN(Fr)){fr.nanEncountered=!0;return}if(isNaN(Hr)){fr.nanEncountered=!0;return}return ri=br*(ze+4*Fr+Qe)/12,Ci=br*(Qe+4*Hr+Xe)/12,cn=ri+Ci,Aa=(cn-nt)/15,nr>Wt?(fr.maxDepthCount++,cn+Aa):Math.abs(Aa)>1;do Wt[cn]>Hr?Ci=cn:ri=cn,cn=ri+Ci>>1;while(cn>ri);var sn=Wt[cn+1]-Wt[cn];return sn&&(sn=(Hr-Wt[cn+1])/sn),(cn+1+sn)/nt}var br=2*fr(1)/M*Xe/Ie,Fr=function(Hr,ri){var Ci=fr(n(m(ri))),cn=ze(Ci)*Hr;return Ci/=br,[cn,ri>=0?Ci:-Ci]};return Fr.invert=function(Hr,ri){var Ci;return ri*=br,n(ri)<1&&(Ci=v(ri)*q(Qe(n(ri))*Xe)),[Hr/ze(n(ri)),Ci]},Fr}function qo(){var ve=0,xe=2.5,Ie=1.183136,ze=t.geoProjectionMutator(oa),Qe=ze(ve,xe,Ie);return Qe.alpha=function(Xe){return arguments.length?ze(ve=+Xe,xe,Ie):ve},Qe.k=function(Xe){return arguments.length?ze(ve,xe=+Xe,Ie):xe},Qe.gamma=function(Xe){return arguments.length?ze(ve,xe,Ie=+Xe):Ie},Qe.scale(152.63)}function Oo(ve,xe){return n(ve[0]-xe[0])=0;--Wt)Ie=ve[1][Wt],ze=Ie[0][0],Qe=Ie[0][1],Xe=Ie[1][1],nt=Ie[2][0],qt=Ie[2][1],xe.push(Ol([[nt-p,qt-p],[nt-p,Xe+p],[ze+p,Xe+p],[ze+p,Qe-p]],30));return{type:"Polygon",coordinates:[r.merge(xe)]}}function Do(ve,xe,Ie){var ze,Qe;function Xe(Wt,nr){for(var fr=nr<0?-1:1,br=xe[+(nr<0)],Fr=0,Hr=br.length-1;Frbr[Fr][2][0];++Fr);var ri=ve(Wt-br[Fr][1][0],nr);return ri[0]+=ve(br[Fr][1][0],fr*nr>fr*br[Fr][0][1]?br[Fr][0][1]:nr)[0],ri}Ie?Xe.invert=Ie(Xe):ve.invert&&(Xe.invert=function(Wt,nr){for(var fr=Qe[+(nr<0)],br=xe[+(nr<0)],Fr=0,Hr=fr.length;Frri&&(Ci=Hr,Hr=ri,ri=Ci),[[br,Hr],[Fr,ri]]})}),nt):xe.map(function(nr){return nr.map(function(fr){return[[fr[0][0]*P,fr[0][1]*P],[fr[1][0]*P,fr[1][1]*P],[fr[2][0]*P,fr[2][1]*P]]})})},xe!=null&&nt.lobes(xe),nt}var nf=[[[[-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 Vf(){return Do(rt,nf).scale(160.857)}var pl=[[[[-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 Zc(){return Do(ql,pl).scale(152.63)}var Jl=[[[[-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 qs(){return Do(tt,Jl).scale(169.529)}var yu=[[[[-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 oc(){return Do(tt,yu).scale(169.529).rotate([20,0])}var Cf=[[[[-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 sc(){return Do(_a,Cf,at).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var jh=[[[[-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 Lf(){return Do(dt,jh).scale(152.63).rotate([-20,0])}function cs(ve,xe){return[3/g*ve*G(M*M/3-xe*xe),xe]}cs.invert=function(ve,xe){return[g/3*ve/G(M*M/3-xe*xe),xe]};function af(){return t.geoProjection(cs).scale(158.837)}function Gf(ve){function xe(Ie,ze){if(n(n(ze)-T)2)return null;Ie/=2,ze/=2;var Xe=Ie*Ie,nt=ze*ze,qt=2*ze/(1+Xe+nt);return qt=h((1+qt)/(1-qt),1/ve),[a(2*Ie,1-Xe-nt)/ve,q((qt-1)/(qt+1))]},xe}function $l(){var ve=.5,xe=t.geoProjectionMutator(Gf),Ie=xe(ve);return Ie.spacing=function(ze){return arguments.length?xe(ve=+ze):ve},Ie.scale(124.75)}var fl=M/C;function lc(ve,xe){return[ve*(1+G(o(xe)))/2,xe/(o(xe/2)*o(ve/6))]}lc.invert=function(ve,xe){var Ie=n(ve),ze=n(xe),Qe=p,Xe=T;zep||n(cn)>p)&&--Qe>0);return Qe&&[Ie,ze]};function Hs(){return t.geoProjection(Es).scale(139.98)}function Go(ve,xe){return[m(ve)/o(xe),b(xe)*o(ve)]}Go.invert=function(ve,xe){var Ie=ve*ve,ze=xe*xe,Qe=ze+1,Xe=Ie+Qe,nt=ve?x*G((Xe-G(Xe*Xe-4*Ie))/Ie):1/G(Qe);return[q(ve*nt),v(xe)*V(nt)]};function ps(){return t.geoProjection(Go).scale(144.049).clipAngle(90-.001)}function uc(ve){var xe=o(ve),Ie=b(L+ve/2);function ze(Qe,Xe){var nt=Xe-ve,qt=n(nt)=0;)fr=ve[nr],br=fr[0]+qt*(Hr=br)-Wt*Fr,Fr=fr[1]+qt*Fr+Wt*Hr;return br=qt*(Hr=br)-Wt*Fr,Fr=qt*Fr+Wt*Hr,[br,Fr]}return Ie.invert=function(ze,Qe){var Xe=20,nt=ze,qt=Qe;do{for(var Wt=xe,nr=ve[Wt],fr=nr[0],br=nr[1],Fr=0,Hr=0,ri;--Wt>=0;)nr=ve[Wt],Fr=fr+nt*(ri=Fr)-qt*Hr,Hr=br+nt*Hr+qt*ri,fr=nr[0]+nt*(ri=fr)-qt*br,br=nr[1]+nt*br+qt*ri;Fr=fr+nt*(ri=Fr)-qt*Hr,Hr=br+nt*Hr+qt*ri,fr=nt*(ri=fr)-qt*br-ze,br=nt*br+qt*ri-Qe;var Ci=Fr*Fr+Hr*Hr,cn,sn;nt-=cn=(fr*Fr+br*Hr)/Ci,qt-=sn=(br*Fr-fr*Hr)/Ci}while(n(cn)+n(sn)>p*p&&--Xe>0);if(Xe){var Ln=G(nt*nt+qt*qt),Yn=2*i(Ln*.5),Aa=m(Yn);return[a(nt*Aa,Ln*o(Yn)),Ln?q(qt*Aa/Ln):0]}},Ie}var Po=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],sd=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ko=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Pa=[[.9245,0],[0,0],[.01943,0]],of=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Hu(){return Bl(Po,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function bl(){return Bl(sd,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Hf(){return Bl(Ko,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Ic(){return Bl(Pa,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function yf(){return Bl(of,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Bl(ve,xe){var Ie=t.geoProjection(od(ve)).rotate(xe).clipAngle(90),ze=t.geoRotation(xe),Qe=Ie.center;return delete Ie.rotate,Ie.center=function(Xe){return arguments.length?Qe(ze(Xe)):ze.invert(Qe())},Ie}var Ah=G(6),Qf=G(7);function _f(ve,xe){var Ie=q(7*m(xe)/(3*Ah));return[Ah*ve*(2*o(2*Ie/3)-1)/Qf,9*m(Ie/3)/Qf]}_f.invert=function(ve,xe){var Ie=3*q(xe*Qf/9);return[ve*Qf/(Ah*(2*o(2*Ie/3)-1)),q(m(Ie)*3*Ah/7)]};function Yc(){return t.geoProjection(_f).scale(164.859)}function eh(ve,xe){for(var Ie=(1+x)*m(xe),ze=xe,Qe=0,Xe;Qe<25&&(ze-=Xe=(m(ze/2)+m(ze)-Ie)/(.5*o(ze/2)+o(ze)),!(n(Xe)k&&--ze>0);return Xe=Ie*Ie,nt=Xe*Xe,qt=Xe*nt,[ve/(.84719-.13063*Xe+qt*qt*(-.04515+.05494*Xe-.02326*nt+.00331*qt)),Ie]};function sf(){return t.geoProjection(cc).scale(175.295)}function Nl(ve,xe){return[ve*(1+o(xe))/2,2*(xe-b(xe/2))]}Nl.invert=function(ve,xe){for(var Ie=xe/2,ze=0,Qe=1/0;ze<10&&n(Qe)>p;++ze){var Xe=o(xe/2);xe-=Qe=(xe-b(xe/2)-Ie)/(1-.5/(Xe*Xe))}return[2*ve/(1+o(xe)),xe]};function Kc(){return t.geoProjection(Nl).scale(152.63)}var Rc=[[[[-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 gs(){return Do(He(1/0),Rc).rotate([20,0]).scale(152.63)}function Wf(ve,xe){var Ie=m(xe),ze=o(xe),Qe=v(ve);if(ve===0||n(xe)===T)return[0,xe];if(xe===0)return[ve,0];if(n(ve)===T)return[ve*ze,T*Ie];var Xe=M/(2*ve)-2*ve/M,nt=2*xe/M,qt=(1-nt*nt)/(Ie-nt),Wt=Xe*Xe,nr=qt*qt,fr=1+Wt/nr,br=1+nr/Wt,Fr=(Xe*Ie/qt-Xe/2)/fr,Hr=(nr*Ie/Wt+qt/2)/br,ri=Fr*Fr+ze*ze/fr,Ci=Hr*Hr-(nr*Ie*Ie/Wt+qt*Ie-1)/br;return[T*(Fr+G(ri)*Qe),T*(Hr+G(Ci<0?0:Ci)*v(-xe*Xe)*Qe)]}Wf.invert=function(ve,xe){ve/=T,xe/=T;var Ie=ve*ve,ze=xe*xe,Qe=Ie+ze,Xe=M*M;return[ve?(Qe-1+G((1-Qe)*(1-Qe)+4*Ie))/(2*ve)*T:0,Ht(function(nt){return Qe*(M*m(nt)-2*nt)*M+4*nt*nt*(xe-m(nt))+2*M*nt-Xe*xe},0)]};function Wh(){return t.geoProjection(Wf).scale(127.267)}var rh=1.0148,lf=.23185,Sh=-.14499,Mu=.02406,ih=rh,js=5*lf,Eu=7*Sh,Dc=9*Mu,ks=1.790857183;function bc(ve,xe){var Ie=xe*xe;return[ve,xe*(rh+Ie*Ie*(lf+Ie*(Sh+Mu*Ie)))]}bc.invert=function(ve,xe){xe>ks?xe=ks:xe<-ks&&(xe=-ks);var Ie=xe,ze;do{var Qe=Ie*Ie;Ie-=ze=(Ie*(rh+Qe*Qe*(lf+Qe*(Sh+Mu*Qe)))-xe)/(ih+Qe*Qe*(js+Qe*(Eu+Dc*Qe)))}while(n(ze)>p);return[ve,Ie]};function hu(){return t.geoProjection(bc).scale(139.319)}function _u(ve,xe){if(n(xe)p&&--Qe>0);return nt=b(ze),[(n(xe)=0;)if(ze=xe[qt],Ie[0]===ze[0]&&Ie[1]===ze[1]){if(Xe)return[Xe,Ie];Xe=Ie}}}function jl(ve){for(var xe=ve.length,Ie=[],ze=ve[xe-1],Qe=0;Qe0?[-ze[0],0]:[180-ze[0],180])};var xe=If.map(function(Ie){return{face:Ie,project:ve(Ie)}});return[-1,0,0,1,0,1,4,5].forEach(function(Ie,ze){var Qe=xe[Ie];Qe&&(Qe.children||(Qe.children=[])).push(xe[ze])}),xf(xe[0],function(Ie,ze){return xe[Ie<-M/2?ze<0?6:4:Ie<0?ze<0?2:0:Ieze^Hr>ze&&Ie<(Fr-nr)*(ze-fr)/(Hr-fr)+nr&&(Qe=!Qe)}return Qe}function Wl(ve,xe){var Ie=xe.stream,ze;if(!Ie)throw new Error("invalid projection");switch(ve&&ve.type){case"Feature":ze=Zu;break;case"FeatureCollection":ze=ah;break;default:ze=Tc;break}return ze(ve,Ie)}function ah(ve,xe){return{type:"FeatureCollection",features:ve.features.map(function(Ie){return Zu(Ie,xe)})}}function Zu(ve,xe){return{type:"Feature",id:ve.id,properties:ve.properties,geometry:Tc(ve.geometry,xe)}}function qc(ve,xe){return{type:"GeometryCollection",geometries:ve.geometries.map(function(Ie){return Tc(Ie,xe)})}}function Tc(ve,xe){if(!ve)return null;if(ve.type==="GeometryCollection")return qc(ve,xe);var Ie;switch(ve.type){case"Point":Ie=Oc;break;case"MultiPoint":Ie=Oc;break;case"LineString":Ie=ff;break;case"MultiLineString":Ie=ff;break;case"Polygon":Ie=fc;break;case"MultiPolygon":Ie=fc;break;case"Sphere":Ie=fc;break;default:return null}return t.geoStream(ve,xe(Ie)),Ie.result()}var wl=[],vu=[],Oc={point:function(ve,xe){wl.push([ve,xe])},result:function(){var ve=wl.length?wl.length<2?{type:"Point",coordinates:wl[0]}:{type:"MultiPoint",coordinates:wl}:null;return wl=[],ve}},ff={lineStart:Xu,point:function(ve,xe){wl.push([ve,xe])},lineEnd:function(){wl.length&&(vu.push(wl),wl=[])},result:function(){var ve=vu.length?vu.length<2?{type:"LineString",coordinates:vu[0]}:{type:"MultiLineString",coordinates:vu}:null;return vu=[],ve}},fc={polygonStart:Xu,lineStart:Xu,point:function(ve,xe){wl.push([ve,xe])},lineEnd:function(){var ve=wl.length;if(ve){do wl.push(wl[0].slice());while(++ve<4);vu.push(wl),wl=[]}},polygonEnd:Xu,result:function(){if(!vu.length)return null;var ve=[],xe=[];return vu.forEach(function(Ie){cf(Ie)?ve.push([Ie]):xe.push(Ie)}),xe.forEach(function(Ie){var ze=Ie[0];ve.some(function(Qe){if(Zf(Qe[0],ze))return Qe.push(Ie),!0})||ve.push([Ie])}),vu=[],ve.length?ve.length>1?{type:"MultiPolygon",coordinates:ve}:{type:"Polygon",coordinates:ve[0]}:null}};function Bc(ve){var xe=ve(T,0)[0]-ve(-T,0)[0];function Ie(ze,Qe){var Xe=n(ze)0?ze-M:ze+M,Qe),qt=(nt[0]-nt[1])*x,Wt=(nt[0]+nt[1])*x;if(Xe)return[qt,Wt];var nr=xe*x,fr=qt>0^Wt>0?-1:1;return[fr*qt-v(Wt)*nr,fr*Wt-v(qt)*nr]}return ve.invert&&(Ie.invert=function(ze,Qe){var Xe=(ze+Qe)*x,nt=(Qe-ze)*x,qt=n(Xe)<.5*xe&&n(nt)<.5*xe;if(!qt){var Wt=xe*x,nr=Xe>0^nt>0?-1:1,fr=-nr*ze+(nt>0?1:-1)*Wt,br=-nr*Qe+(Xe>0?1:-1)*Wt;Xe=(-fr-br)*x,nt=(fr-br)*x}var Fr=ve.invert(Xe,nt);return qt||(Fr[0]+=Xe>0?M:-M),Fr}),t.geoProjection(Ie).rotate([-90,-90,45]).clipAngle(180-.001)}function kt(){return Bc(ki).scale(176.423)}function Zt(){return Bc(Lo).scale(111.48)}function Er(ve,xe){if(!(0<=(xe=+xe)&&xe<=20))throw new Error("invalid digits");function Ie(nr){var fr=nr.length,br=2,Fr=new Array(fr);for(Fr[0]=+nr[0].toFixed(xe),Fr[1]=+nr[1].toFixed(xe);br2||Hr[0]!=fr[0]||Hr[1]!=fr[1])&&(br.push(Hr),fr=Hr)}return br.length===1&&nr.length>1&&br.push(Ie(nr[nr.length-1])),br}function Xe(nr){return nr.map(Qe)}function nt(nr){if(nr==null)return nr;var fr;switch(nr.type){case"GeometryCollection":fr={type:"GeometryCollection",geometries:nr.geometries.map(nt)};break;case"Point":fr={type:"Point",coordinates:Ie(nr.coordinates)};break;case"MultiPoint":fr={type:nr.type,coordinates:ze(nr.coordinates)};break;case"LineString":fr={type:nr.type,coordinates:Qe(nr.coordinates)};break;case"MultiLineString":case"Polygon":fr={type:nr.type,coordinates:Xe(nr.coordinates)};break;case"MultiPolygon":fr={type:"MultiPolygon",coordinates:nr.coordinates.map(Xe)};break;default:return nr}return nr.bbox!=null&&(fr.bbox=nr.bbox),fr}function qt(nr){var fr={type:"Feature",properties:nr.properties,geometry:nt(nr.geometry)};return nr.id!=null&&(fr.id=nr.id),nr.bbox!=null&&(fr.bbox=nr.bbox),fr}if(ve!=null)switch(ve.type){case"Feature":return qt(ve);case"FeatureCollection":{var Wt={type:"FeatureCollection",features:ve.features.map(qt)};return ve.bbox!=null&&(Wt.bbox=ve.bbox),Wt}default:return nt(ve)}return ve}function xr(ve){var xe=m(ve);function Ie(ze,Qe){var Xe=xe?b(ze*xe/2)/xe:ze/2;if(!Qe)return[2*Xe,-ve];var nt=2*i(Xe*m(Qe)),qt=1/b(Qe);return[m(nt)*qt,Qe+(1-o(nt))*qt-ve]}return Ie.invert=function(ze,Qe){if(n(Qe+=ve)p&&--qt>0);var Fr=ze*(nr=b(nt)),Hr=b(n(Qe)0?T:-T)*(Wt+Qe*(fr-nt)/2+Qe*Qe*(fr-2*Wt+nt)/2)]}Wi.invert=function(ve,xe){var Ie=xe/T,ze=Ie*90,Qe=f(18,n(ze/5)),Xe=c(0,l(Qe));do{var nt=Mi[Xe][1],qt=Mi[Xe+1][1],Wt=Mi[f(19,Xe+2)][1],nr=Wt-nt,fr=Wt-2*qt+nt,br=2*(n(Ie)-qt)/nr,Fr=fr/nr,Hr=br*(1-Fr*br*(1-2*Fr*br));if(Hr>=0||Xe===1){ze=(xe>=0?5:-5)*(Hr+Qe);var ri=50,Ci;do Qe=f(18,n(ze)/5),Xe=l(Qe),Hr=Qe-Xe,nt=Mi[Xe][1],qt=Mi[Xe+1][1],Wt=Mi[f(19,Xe+2)][1],ze-=(Ci=(xe>=0?T:-T)*(qt+Hr*(Wt-nt)/2+Hr*Hr*(Wt-2*qt+nt)/2)-xe)*P;while(n(Ci)>k&&--ri>0);break}}while(--Xe>=0);var cn=Mi[Xe][0],sn=Mi[Xe+1][0],Ln=Mi[f(19,Xe+2)][0];return[ve/(sn+Hr*(Ln-cn)/2+Hr*Hr*(Ln-2*sn+cn)/2),ze*E]};function dn(){return t.geoProjection(Wi).scale(152.63)}function wn(ve){function xe(Ie,ze){var Qe=o(ze),Xe=(ve-1)/(ve-Qe*o(Ie));return[Xe*Qe*m(Ie),Xe*m(ze)]}return xe.invert=function(Ie,ze){var Qe=Ie*Ie+ze*ze,Xe=G(Qe),nt=(ve-G(1-Qe*(ve+1)/(ve-1)))/((ve-1)/Xe+Xe/(ve-1));return[a(Ie*nt,Xe*G(1-nt*nt)),Xe?q(ze*nt/Xe):0]},xe}function On(ve,xe){var Ie=wn(ve);if(!xe)return Ie;var ze=o(xe),Qe=m(xe);function Xe(nt,qt){var Wt=Ie(nt,qt),nr=Wt[1],fr=nr*Qe/(ve-1)+ze;return[Wt[0]*ze/fr,nr/fr]}return Xe.invert=function(nt,qt){var Wt=(ve-1)/(ve-1-qt*Qe);return Ie.invert(Wt*nt,Wt*qt*ze)},Xe}function Yi(){var ve=2,xe=0,Ie=t.geoProjectionMutator(On),ze=Ie(ve,xe);return ze.distance=function(Qe){return arguments.length?Ie(ve=+Qe,xe):ve},ze.tilt=function(Qe){return arguments.length?Ie(ve,xe=Qe*E):xe*P},ze.scale(432.147).clipAngle(V(1/ve)*P-1e-6)}var $i=1e-4,an=1e4,Fi=-180,ta=Fi+$i,Ca=180,Ra=Ca-$i,La=-90,Ua=La+$i,Zn=90,Dn=Zn-$i;function Ka(ve){return ve.length>0}function bo(ve){return Math.floor(ve*an)/an}function Zo(ve){return ve===La||ve===Zn?[0,ve]:[Fi,bo(ve)]}function Ss(ve){var xe=ve[0],Ie=ve[1],ze=!1;return xe<=ta?(xe=Fi,ze=!0):xe>=Ra&&(xe=Ca,ze=!0),Ie<=Ua?(Ie=La,ze=!0):Ie>=Dn&&(Ie=Zn,ze=!0),ze?[xe,Ie]:ve}function as(ve){return ve.map(Ss)}function ws(ve,xe,Ie){for(var ze=0,Qe=ve.length;ze=Ra||fr<=Ua||fr>=Dn){Xe[nt]=Ss(Wt);for(var br=nt+1;brta&&HrUa&&ri=qt)break;Ie.push({index:-1,polygon:xe,ring:Xe=Xe.slice(br-1)}),Xe[0]=Zo(Xe[0][1]),nt=-1,qt=Xe.length}}}}function Ho(ve){var xe,Ie=ve.length,ze={},Qe={},Xe,nt,qt,Wt,nr;for(xe=0;xe0?M-qt:qt)*P],nr=t.geoProjection(ve(nt)).rotate(Wt),fr=t.geoRotation(Wt),br=nr.center;return delete nr.rotate,nr.center=function(Fr){return arguments.length?br(fr(Fr)):fr.invert(br())},nr.clipAngle(90)}function rs(ve){var xe=o(ve);function Ie(ze,Qe){var Xe=t.geoGnomonicRaw(ze,Qe);return Xe[0]*=xe,Xe}return Ie.invert=function(ze,Qe){return t.geoGnomonicRaw.invert(ze/xe,Qe)},Ie}function Ql(){return Cu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Cu(ve,xe){return ys(rs,ve,xe)}function Yu(ve){if(!(ve*=2))return t.geoAzimuthalEquidistantRaw;var xe=-ve/2,Ie=-xe,ze=ve*ve,Qe=b(Ie),Xe=.5/m(Ie);function nt(qt,Wt){var nr=V(o(Wt)*o(qt-xe)),fr=V(o(Wt)*o(qt-Ie)),br=Wt<0?-1:1;return nr*=nr,fr*=fr,[(nr-fr)/(2*ve),br*G(4*ze*fr-(ze-nr+fr)*(ze-nr+fr))/(2*ve)]}return nt.invert=function(qt,Wt){var nr=Wt*Wt,fr=o(G(nr+(Fr=qt+xe)*Fr)),br=o(G(nr+(Fr=qt+Ie)*Fr)),Fr,Hr;return[a(Hr=fr-br,Fr=(fr+br)*Qe),(Wt<0?-1:1)*V(G(Fr*Fr+Hr*Hr)*Xe)]},nt}function Nc(){return pu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function pu(ve,xe){return ys(Yu,ve,xe)}function Uc(ve,xe){if(n(xe)p&&--qt>0);return[v(ve)*(G(Qe*Qe+4)+Qe)*M/4,T*nt]};function Ku(){return t.geoProjection(hc).scale(127.16)}function ue(ve,xe,Ie,ze,Qe){function Xe(nt,qt){var Wt=Ie*m(ze*qt),nr=G(1-Wt*Wt),fr=G(2/(1+nr*o(nt*=Qe)));return[ve*nr*fr*m(nt),xe*Wt*fr]}return Xe.invert=function(nt,qt){var Wt=nt/ve,nr=qt/xe,fr=G(Wt*Wt+nr*nr),br=2*q(fr/2);return[a(nt*b(br),ve*fr)/Qe,fr&&q(qt*m(br)/(xe*Ie*fr))/ze]},Xe}function w(ve,xe,Ie,ze){var Qe=M/3;ve=c(ve,p),xe=c(xe,p),ve=f(ve,T),xe=f(xe,M-p),Ie=c(Ie,0),Ie=f(Ie,100-p),ze=c(ze,p);var Xe=Ie/100+1,nt=ze/100,qt=V(Xe*o(Qe))/Qe,Wt=m(ve)/m(qt*T),nr=xe/M,fr=G(nt*m(ve/2)/m(xe/2)),br=fr/G(nr*Wt*qt),Fr=1/(fr*G(nr*Wt*qt));return ue(br,Fr,Wt,qt,nr)}function B(){var ve=65*E,xe=60*E,Ie=20,ze=200,Qe=t.geoProjectionMutator(w),Xe=Qe(ve,xe,Ie,ze);return Xe.poleline=function(nt){return arguments.length?Qe(ve=+nt*E,xe,Ie,ze):ve*P},Xe.parallels=function(nt){return arguments.length?Qe(ve,xe=+nt*E,Ie,ze):xe*P},Xe.inflation=function(nt){return arguments.length?Qe(ve,xe,Ie=+nt,ze):Ie},Xe.ratio=function(nt){return arguments.length?Qe(ve,xe,Ie,ze=+nt):ze},Xe.scale(163.775)}function Q(){return B().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var ee=4*M+3*G(3),le=2*G(2*M*G(3)/ee),Fe=rr(le*G(3)/M,le,ee/6);function Ze(){return t.geoProjection(Fe).scale(176.84)}function ut(ve,xe){return[ve*G(1-3*xe*xe/(M*M)),xe]}ut.invert=function(ve,xe){return[ve/G(1-3*xe*xe/(M*M)),xe]};function Mt(){return t.geoProjection(ut).scale(152.63)}function Jt(ve,xe){var Ie=o(xe),ze=o(ve)*Ie,Qe=1-ze,Xe=o(ve=a(m(ve)*Ie,-m(xe))),nt=m(ve);return Ie=G(1-ze*ze),[nt*Ie-Xe*Qe,-Xe*Ie-nt*Qe]}Jt.invert=function(ve,xe){var Ie=(ve*ve+xe*xe)/-2,ze=G(-Ie*(2+Ie)),Qe=xe*Ie+ve*ze,Xe=ve*Ie-xe*ze,nt=G(Xe*Xe+Qe*Qe);return[a(ze*Qe,nt*(1+Ie)),nt?-q(ze*Xe/nt):0]};function $t(){return t.geoProjection(Jt).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function yr(ve,xe){var Ie=Ee(ve,xe);return[(Ie[0]+ve/T)/2,(Ie[1]+xe)/2]}yr.invert=function(ve,xe){var Ie=ve,ze=xe,Qe=25;do{var Xe=o(ze),nt=m(ze),qt=m(2*ze),Wt=nt*nt,nr=Xe*Xe,fr=m(Ie),br=o(Ie/2),Fr=m(Ie/2),Hr=Fr*Fr,ri=1-nr*br*br,Ci=ri?V(Xe*br)*G(cn=1/ri):cn=0,cn,sn=.5*(2*Ci*Xe*Fr+Ie/T)-ve,Ln=.5*(Ci*nt+ze)-xe,Yn=.5*cn*(nr*Hr+Ci*Xe*br*Wt)+.5/T,Aa=cn*(fr*qt/4-Ci*nt*Fr),fa=.125*cn*(qt*Fr-Ci*nt*nr*fr),$a=.5*cn*(Wt*br+Ci*Hr*Xe)+.5,Co=Aa*fa-$a*Yn,Qa=(Ln*Aa-sn*$a)/Co,mo=(sn*fa-Ln*Yn)/Co;Ie-=Qa,ze-=mo}while((n(Qa)>p||n(mo)>p)&&--Qe>0);return[Ie,ze]};function Cr(){return t.geoProjection(yr).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=_e,e.geoAiryRaw=ae,e.geoAitoff=Ce,e.geoAitoffRaw=Ee,e.geoArmadillo=re,e.geoArmadilloRaw=ge,e.geoAugust=ke,e.geoAugustRaw=Se,e.geoBaker=me,e.geoBakerRaw=Le,e.geoBerghaus=ce,e.geoBerghausRaw=Pe,e.geoBertin1953=ar,e.geoBertin1953Raw=ct,e.geoBoggs=St,e.geoBoggsRaw=rt,e.geoBonne=jt,e.geoBonneRaw=pt,e.geoBottomley=mr,e.geoBottomleyRaw=or,e.geoBromley=ei,e.geoBromleyRaw=Ar,e.geoChamberlin=et,e.geoChamberlinRaw=Ge,e.geoChamberlinAfrica=We,e.geoCollignon=At,e.geoCollignonRaw=xt,e.geoCraig=Qt,e.geoCraigRaw=Kt,e.geoCraster=Ir,e.geoCrasterRaw=Gr,e.geoCylindricalEqualArea=_i,e.geoCylindricalEqualAreaRaw=Yr,e.geoCylindricalStereographic=ai,e.geoCylindricalStereographicRaw=Pi,e.geoEckert1=un,e.geoEckert1Raw=mi,e.geoEckert2=An,e.geoEckert2Raw=Fn,e.geoEckert3=Qn,e.geoEckert3Raw=Hn,e.geoEckert4=Kn,e.geoEckert4Raw=Vi,e.geoEckert5=Gt,e.geoEckert5Raw=Jn,e.geoEckert6=tr,e.geoEckert6Raw=wt,e.geoEisenlohr=Xr,e.geoEisenlohrRaw=wr,e.geoFahey=Ri,e.geoFaheyRaw=$r,e.geoFoucaut=en,e.geoFoucautRaw=Zi,e.geoFoucautSinusoidal=yn,e.geoFoucautSinusoidalRaw=fn,e.geoGilbert=ua,e.geoGingery=Xo,e.geoGingeryRaw=ma,e.geoGinzburg4=Ha,e.geoGinzburg4Raw=jn,e.geoGinzburg5=Gn,e.geoGinzburg5Raw=vo,e.geoGinzburg6=Sr,e.geoGinzburg6Raw=Ct,e.geoGinzburg8=hi,e.geoGinzburg8Raw=Jr,e.geoGinzburg9=Sn,e.geoGinzburg9Raw=hn,e.geoGringorten=ea,e.geoGringortenRaw=ki,e.geoGuyou=Fs,e.geoGuyouRaw=Lo,e.geoHammer=mt,e.geoHammerRaw=He,e.geoHammerRetroazimuthal=zl,e.geoHammerRetroazimuthalRaw=ll,e.geoHealpix=Yl,e.geoHealpixRaw=cl,e.geoHill=nc,e.geoHillRaw=Su,e.geoHomolosine=xo,e.geoHomolosineRaw=ql,e.geoHufnagel=Ns,e.geoHufnagelRaw=Kl,e.geoHyperelliptical=qo,e.geoHyperellipticalRaw=oa,e.geoInterrupt=Do,e.geoInterruptedBoggs=Vf,e.geoInterruptedHomolosine=Zc,e.geoInterruptedMollweide=qs,e.geoInterruptedMollweideHemispheres=oc,e.geoInterruptedSinuMollweide=sc,e.geoInterruptedSinusoidal=Lf,e.geoKavrayskiy7=af,e.geoKavrayskiy7Raw=cs,e.geoLagrange=$l,e.geoLagrangeRaw=Gf,e.geoLarrivee=Fu,e.geoLarriveeRaw=lc,e.geoLaskowski=Hs,e.geoLaskowskiRaw=Es,e.geoLittrow=ps,e.geoLittrowRaw=Go,e.geoLoximuthal=xl,e.geoLoximuthalRaw=uc,e.geoMiller=Os,e.geoMillerRaw=Gu,e.geoModifiedStereographic=Bl,e.geoModifiedStereographicRaw=od,e.geoModifiedStereographicAlaska=Hu,e.geoModifiedStereographicGs48=bl,e.geoModifiedStereographicGs50=Hf,e.geoModifiedStereographicMiller=Ic,e.geoModifiedStereographicLee=yf,e.geoMollweide=je,e.geoMollweideRaw=tt,e.geoMtFlatPolarParabolic=Yc,e.geoMtFlatPolarParabolicRaw=_f,e.geoMtFlatPolarQuartic=th,e.geoMtFlatPolarQuarticRaw=eh,e.geoMtFlatPolarSinusoidal=jf,e.geoMtFlatPolarSinusoidalRaw=ju,e.geoNaturalEarth2=sf,e.geoNaturalEarth2Raw=cc,e.geoNellHammer=Kc,e.geoNellHammerRaw=Nl,e.geoInterruptedQuarticAuthalic=gs,e.geoNicolosi=Wh,e.geoNicolosiRaw=Wf,e.geoPatterson=hu,e.geoPattersonRaw=bc,e.geoPolyconic=nl,e.geoPolyconicRaw=_u,e.geoPolyhedral=xf,e.geoPolyhedralButterfly=Cs,e.geoPolyhedralCollignon=Xf,e.geoPolyhedralWaterman=Us,e.geoProject=Wl,e.geoGringortenQuincuncial=kt,e.geoPeirceQuincuncial=Zt,e.geoPierceQuincuncial=Zt,e.geoQuantize=Er,e.geoQuincuncial=Bc,e.geoRectangularPolyconic=Kr,e.geoRectangularPolyconicRaw=xr,e.geoRobinson=dn,e.geoRobinsonRaw=Wi,e.geoSatellite=Yi,e.geoSatelliteRaw=On,e.geoSinuMollweide=Vu,e.geoSinuMollweideRaw=_a,e.geoSinusoidal=Et,e.geoSinusoidalRaw=dt,e.geoStitch=Ls,e.geoTimes=no,e.geoTimesRaw=va,e.geoTwoPointAzimuthal=Cu,e.geoTwoPointAzimuthalRaw=rs,e.geoTwoPointAzimuthalUsa=Ql,e.geoTwoPointEquidistant=pu,e.geoTwoPointEquidistantRaw=Yu,e.geoTwoPointEquidistantUsa=Nc,e.geoVanDerGrinten=xu,e.geoVanDerGrintenRaw=Uc,e.geoVanDerGrinten2=Va,e.geoVanDerGrinten2Raw=Ac,e.geoVanDerGrinten3=Vc,e.geoVanDerGrinten3Raw=oo,e.geoVanDerGrinten4=Ku,e.geoVanDerGrinten4Raw=hc,e.geoWagner=B,e.geoWagner7=Q,e.geoWagnerRaw=w,e.geoWagner4=Ze,e.geoWagner4Raw=Fe,e.geoWagner6=Mt,e.geoWagner6Raw=ut,e.geoWiechel=$t,e.geoWiechelRaw=Jt,e.geoWinkel3=Cr,e.geoWinkel3Raw=yr,Object.defineProperty(e,"__esModule",{value:!0})})});var XDe=ye((Gmr,WDe)=>{"use strict";var nd=qa(),VZ=Pr(),Xzt=Oa(),i5=Math.PI/180,iw=180/Math.PI,HZ={cursor:"pointer"},jZ={cursor:"auto"};function Zzt(e,t){var r=e.projection,n;return t._isScoped?n=Yzt:t._isClipped?n=Jzt:n=Kzt,n(e,r)}WDe.exports=Zzt;function WZ(e,t){return nd.behavior.zoom().translate(t.translate()).scale(t.scale())}function XZ(e,t,r){var n=e.id,i=e.graphDiv,a=i.layout,o=a[n],s=i._fullLayout,l=s[n],u={},c={};function f(h,d){u[n+"."+h]=VZ.nestedProperty(o,h).get(),Xzt.call("_storeDirectGUIEdit",a,s._preGUI,u);var v=VZ.nestedProperty(l,h);v.get()!==d&&(v.set(d),VZ.nestedProperty(o,h).set(d),c[n+"."+h]=d)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),i.emit("plotly_relayout",c)}function Yzt(e,t){var r=WZ(e,t);function n(){nd.select(this).style(HZ)}function i(){t.scale(nd.event.scale).translate(nd.event.translate),e.render(!0);var s=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":s[0],"geo.center.lat":s[1]})}function a(s){var l=t.invert(e.midPt);s("center.lon",l[0]),s("center.lat",l[1])}function o(){nd.select(this).style(jZ),XZ(e,t,a)}return r.on("zoomstart",n).on("zoom",i).on("zoomend",o),r}function Kzt(e,t){var r=WZ(e,t),n=2,i,a,o,s,l,u,c,f,h;function d(M){return t.invert(M)}function v(M){var T=d(M);if(!T)return!0;var L=t(T);return Math.abs(L[0]-M[0])>n||Math.abs(L[1]-M[1])>n}function m(){nd.select(this).style(HZ),i=nd.mouse(this),a=t.rotate(),o=t.translate(),s=a,l=d(i)}function b(){if(u=nd.mouse(this),v(i)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(nd.event.scale),t.translate([o[0],nd.event.translate[1]]),l?d(u)&&(f=d(u),c=[s[0]+(f[0]-l[0]),a[1],a[2]],t.rotate(c),s=c):(i=u,l=d(i)),h=!0,e.render(!0);var M=t.rotate(),T=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":T[0],"geo.center.lat":T[1],"geo.projection.rotation.lon":-M[0]})}function p(){nd.select(this).style(jZ),h&&XZ(e,t,k)}function k(M){var T=t.rotate(),L=t.invert(e.midPt);M("projection.rotation.lon",-T[0]),M("center.lon",L[0]),M("center.lat",L[1])}return r.on("zoomstart",m).on("zoom",b).on("zoomend",p),r}function Jzt(e,t){var r={r:t.rotate(),k:t.scale()},n=WZ(e,t),i=a7t(n,"zoomstart","zoom","zoomend"),a=0,o=n.on,s;n.on("zoomstart",function(){nd.select(this).style(HZ);var h=nd.mouse(this),d=t.rotate(),v=d,m=t.translate(),b=$zt(d);s=OF(t,h),o.call(n,"zoom",function(){var p=nd.mouse(this);if(t.scale(r.k=nd.event.scale),!s)h=p,s=OF(t,h);else if(OF(t,p)){t.rotate(d).translate(m);var k=OF(t,p),M=e7t(s,k),T=r7t(Qzt(b,M)),L=r.r=t7t(T,s,v);(!isFinite(L[0])||!isFinite(L[1])||!isFinite(L[2]))&&(L=v),t.rotate(L),v=L}u(i.of(this,arguments))}),l(i.of(this,arguments))}).on("zoomend",function(){nd.select(this).style(jZ),o.call(n,"zoom",null),c(i.of(this,arguments)),XZ(e,t,f)}).on("zoom.redraw",function(){e.render(!0);var h=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-h[0],"geo.projection.rotation.lat":-h[1]})});function l(h){a++||h({type:"zoomstart"})}function u(h){h({type:"zoom"})}function c(h){--a||h({type:"zoomend"})}function f(h){var d=t.rotate();h("projection.rotation.lon",-d[0]),h("projection.rotation.lat",-d[1])}return nd.rebind(n,i,"on")}function OF(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&i7t(r)}function $zt(e){var t=.5*e[0]*i5,r=.5*e[1]*i5,n=.5*e[2]*i5,i=Math.sin(t),a=Math.cos(t),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[a*s*u+i*o*l,i*s*u-a*o*l,a*o*u+i*s*l,a*s*l-i*o*u]}function Qzt(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=t[0],s=t[1],l=t[2],u=t[3];return[r*o-n*s-i*l-a*u,r*s+n*o+i*u-a*l,r*l-n*u+i*o+a*s,r*u+n*l-i*s+a*o]}function e7t(e,t){if(!(!e||!t)){var r=n7t(e,t),n=Math.sqrt(jDe(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,jDe(e,t)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function t7t(e,t,r){var n=GZ(t,2,e[0]);n=GZ(n,1,e[1]),n=GZ(n,0,e[2]-r[2]);var i=t[0],a=t[1],o=t[2],s=n[0],l=n[1],u=n[2],c=Math.atan2(a,i)*iw,f=Math.sqrt(i*i+a*a),h,d;Math.abs(l)>f?(d=(l>0?90:-90)-c,h=0):(d=Math.asin(l/f)*iw-c,h=Math.sqrt(f*f-l*l));var v=180-d-2*c,m=(Math.atan2(u,s)-Math.atan2(o,h))*iw,b=(Math.atan2(u,s)-Math.atan2(o,-h))*iw,p=GDe(r[0],r[1],d,m),k=GDe(r[0],r[1],v,b);return p<=k?[d,m,r[2]]:[v,b,r[2]]}function GDe(e,t,r,n){var i=HDe(r-e),a=HDe(n-t);return Math.sqrt(i*i+a*a)}function HDe(e){return(e%360+540)%360-180}function GZ(e,t,r){var n=r*i5,i=e.slice(),a=t===0?1:0,o=t===2?1:2,s=Math.cos(n),l=Math.sin(n);return i[a]=e[a]*s-e[o]*l,i[o]=e[o]*s+e[a]*l,i}function r7t(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*iw,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*iw,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*iw]}function i7t(e){var t=e[0]*i5,r=e[1]*i5,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function jDe(e,t){for(var r=0,n=0,i=e.length;n{"use strict";var l1=qa(),KZ=UZ(),o7t=KZ.geoPath,s7t=KZ.geoDistance,l7t=VDe(),u7t=Oa(),pk=Pr(),c7t=pk.strTranslate,BF=ka(),vk=So(),ZDe=ef(),f7t=Mc(),YZ=ho(),YDe=Mg().getAutoRange,ZZ=yv(),h7t=qf().prepSelect,d7t=qf().clearOutline,v7t=qf().selectOnClick,p7t=XDe(),hp=ck(),g7t=dx(),JDe=TF(),m7t=MZ().feature;function $De(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var tm=$De.prototype;QDe.exports=function(t){return new $De(t)};tm.plot=function(e,t,r,n){var i=this;if(n)return i.update(e,t,!0);i._geoCalcData=e,i._fullLayout=t;var a=t[this.id],o=[],s=!1;for(var l in hp.layerNameToAdjective)if(l!=="frame"&&a["show"+l]){s=!0;break}for(var u=!1,c=0;c0&&o._module.calcGeoJSON(a,t)}if(!r){var s=this.updateProjection(e,t);if(s)return;(!this.viewInitial||this.scope!==n.scope)&&this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),f7t.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var l=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=l.selectAll(".point"),this.dataPoints.text=l.selectAll("text"),this.dataPaths.line=l.selectAll(".js-line");var u=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=u.selectAll("path"),this._render()};tm.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],i=t._size,a=n.domain,o=n.projection,s=n.lonaxis,l=n.lataxis,u=s._ax,c=l._ax,f=this.projection=y7t(n),h=[[i.l+i.w*a.x[0],i.t+i.h*(1-a.y[1])],[i.l+i.w*a.x[1],i.t+i.h*(1-a.y[0])]],d=n.center||{},v=o.rotation||{},m=s.range||[],b=l.range||[];if(n.fitbounds){u._length=h[1][0]-h[0][0],c._length=h[1][1]-h[0][1],u.range=YDe(r,u),c.range=YDe(r,c);var p=(u.range[0]+u.range[1])/2,k=(c.range[0]+c.range[1])/2;if(n._isScoped)d={lon:p,lat:k};else if(n._isClipped){d={lon:p,lat:k},v={lon:p,lat:k,roll:v.roll};var M=o.type,T=hp.lonaxisSpan[M]/2||180,L=hp.lataxisSpan[M]/2||90;m=[p-T,p+T],b=[k-L,k+L]}else d={lon:p,lat:k},v={lon:p,lat:v.lat,roll:v.roll}}f.center([d.lon-v.lon,d.lat-v.lat]).rotate([-v.lon,-v.lat,v.roll]).parallels(o.parallels);var x=KDe(m,b);f.fitExtent(h,x);var C=this.bounds=f.getBounds(x),S=this.fitScale=f.scale(),g=f.translate();if(n.fitbounds){var P=f.getBounds(KDe(u.range,c.range)),E=Math.min((C[1][0]-C[0][0])/(P[1][0]-P[0][0]),(C[1][1]-C[0][1])/(P[1][1]-P[0][1]));isFinite(E)?f.scale(E*S):pk.warn("Something went wrong during"+this.id+"fitbounds computations.")}else f.scale(o.scale*S);var z=this.midPt=[(C[0][0]+C[1][0])/2,(C[0][1]+C[1][1])/2];if(f.translate([g[0]+(z[0]-g[0]),g[1]+(z[1]-g[1])]).clipExtent(C),n._isAlbersUsa){var q=f([d.lon,d.lat]),V=f.translate();f.translate([V[0]-(q[0]-V[0]),V[1]-(q[1]-V[1])])}};tm.updateBaseLayers=function(e,t){var r=this,n=r.topojson,i=r.layers,a=r.basePaths;function o(h){return h==="lonaxis"||h==="lataxis"}function s(h){return!!hp.lineLayers[h]}function l(h){return!!hp.fillLayers[h]}var u=this.hasChoropleth?hp.layersForChoropleth:hp.layers,c=u.filter(function(h){return s(h)||l(h)?t["show"+h]:o(h)?t[h].showgrid:!0}),f=r.framework.selectAll(".layer").data(c,String);f.exit().each(function(h){delete i[h],delete a[h],l1.select(this).remove()}),f.enter().append("g").attr("class",function(h){return"layer "+h}).each(function(h){var d=i[h]=l1.select(this);h==="bg"?r.bgRect=d.append("rect").style("pointer-events","all"):o(h)?a[h]=d.append("path").style("fill","none"):h==="backplot"?d.append("g").classed("choroplethlayer",!0):h==="frontplot"?d.append("g").classed("scatterlayer",!0):s(h)?a[h]=d.append("path").style("fill","none").style("stroke-miterlimit",2):l(h)&&(a[h]=d.append("path").style("stroke","none"))}),f.order(),f.each(function(h){var d=a[h],v=hp.layerNameToAdjective[h];h==="frame"?d.datum(hp.sphereSVG):s(h)||l(h)?d.datum(m7t(n,n.objects[h])):o(h)&&d.datum(_7t(h,t,e)).call(BF.stroke,t[h].gridcolor).call(vk.dashLine,t[h].griddash,t[h].gridwidth),s(h)?d.call(BF.stroke,t[v+"color"]).call(vk.dashLine,"",t[v+"width"]):l(h)&&d.call(BF.fill,t[v+"color"])})};tm.updateDims=function(e,t){var r=this.bounds,n=(t.framewidth||0)/2,i=r[0][0]-n,a=r[0][1]-n,o=r[1][0]-i+n,s=r[1][1]-a+n;vk.setRect(this.clipRect,i,a,o,s),this.bgRect.call(vk.setRect,i,a,o,s).call(BF.fill,t.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s};tm.updateFx=function(e,t){var r=this,n=r.graphDiv,i=r.bgRect,a=e.dragmode,o=e.clickmode;if(r.isStatic)return;function s(){var f=r.viewInitial,h={};for(var d in f)h[r.id+"."+d]=f[d];u7t.call("_guiRelayout",n,h),n.emit("plotly_doubleclick",null)}function l(f){return r.projection.invert([f[0]+r.xaxis._offset,f[1]+r.yaxis._offset])}var u=function(f,h){if(h.isRect){var d=f.range={};d[r.id]=[l([h.xmin,h.ymin]),l([h.xmax,h.ymax])]}else{var v=f.lassoPoints={};v[r.id]=h.map(l)}},c={element:r.bgRect.node(),gd:n,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(f){f===2&&d7t(n)}};a==="pan"?(i.node().onmousedown=null,i.call(p7t(r,t)),i.on("dblclick.zoom",s),n._context._scrollZoom.geo||i.on("wheel.zoom",null)):(a==="select"||a==="lasso")&&(i.on(".zoom",null),c.prepFn=function(f,h,d){h7t(f,h,d,c,a)},ZZ.init(c)),i.on("mousemove",function(){var f=r.projection.invert(pk.getPositionFromD3Event());if(!f)return ZZ.unhover(n,l1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},ZDe.hover(n,l1.event,r.id)}),i.on("mouseout",function(){n._dragging||ZZ.unhover(n,l1.event)}),i.on("click",function(){a!=="select"&&a!=="lasso"&&(o.indexOf("select")>-1&&v7t(l1.event,n,[r.xaxis],[r.yaxis],r.id,c),o.indexOf("event")>-1&&ZDe.click(n,l1.event))})};tm.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,n="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",n),e.clipRect=e.clipDef.append("rect"),e.framework=l1.select(e.container).append("g").attr("class","geo "+e.id).call(vk.setClipUrl,n,t),e.project=function(i){var a=e.projection(i);return a?[a[0]-e.xaxis._offset,a[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(i){return e.project(i)[0]}},e.yaxis={_id:"y",c2p:function(i){return e.project(i)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},YZ.setConvert(e.mockAxis,r)};tm.saveViewInitial=function(e){var t=e.center||{},r=e.projection,n=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":r.scale};var i;e._isScoped?i={"center.lon":t.lon,"center.lat":t.lat}:e._isClipped?i={"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat}:i={"center.lon":t.lon,"center.lat":t.lat,"projection.rotation.lon":n.lon},pk.extendFlat(this.viewInitial,i)};tm.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};tm._render=function(){var e=this.projection,t=e.getPath(),r;function n(a){var o=e(a.lonlat);return o?c7t(o[0],o[1]):null}function i(a){return e.isLonLatOverEdges(a.lonlat)?"none":null}for(r in this.basePaths)this.basePaths[r].attr("d",t);for(r in this.dataPaths)this.dataPaths[r].attr("d",function(a){return t(a.geojson)});for(r in this.dataPoints)this.dataPoints[r].attr("display",i).attr("transform",n)};function y7t(e){var t=e.projection,r=t.type,n=hp.projNames[r];n="geo"+pk.titleCase(n);for(var i=KZ[n]||l7t[n],a=i(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?hp.lonaxisSpan[r]/2:null,s=["center","rotate","parallels","clipExtent"],l=function(f){return f?a:[]},u=0;uv}else return!1},a.getPath=function(){return o7t().projection(a)},a.getBounds=function(f){return a.getPath().bounds(f)},a.precision(hp.precision),e._isSatellite&&a.tilt(t.tilt).distance(t.distance),o&&a.clipAngle(o-hp.clipPad),a}function _7t(e,t,r){var n=1e-6,i=2.5,a=t[e],o=hp.scopeDefaults[t.scope],s,l,u;e==="lonaxis"?(s=o.lonaxisRange,l=o.lataxisRange,u=function(k,M){return[k,M]}):e==="lataxis"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(k,M){return[M,k]});var c={type:"linear",range:[s[0],s[1]-n],tick0:a.tick0,dtick:a.dtick};YZ.setConvert(c,r);var f=YZ.calcTicks(c);!t.isScoped&&e==="lonaxis"&&f.pop();for(var h=f.length,d=new Array(h),v=0;v0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}});var JZ=ye((jmr,iFe)=>{"use strict";var a5=Ih(),x7t=Cc().attributes,b7t=Pd().dash,n5=ck(),w7t=mc().overrideAll,tFe=t_(),rFe={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:a5.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:b7t},T7t=iFe.exports=w7t({domain:x7t({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:tFe(n5.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:tFe(n5.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:a5.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:n5.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:n5.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:n5.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:n5.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:a5.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:a5.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:a5.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:a5.background},lonaxis:rFe,lataxis:rFe},"plot","from-root");T7t.uirevision={valType:"any",editType:"none"}});var oFe=ye((Wmr,aFe)=>{"use strict";var NF=Pr(),A7t=q_(),S7t=Id().getSubplotData,UF=ck(),M7t=JZ(),nFe=UF.axesNames;aFe.exports=function(t,r,n){A7t(t,r,n,{type:"geo",attributes:M7t,handleDefaults:E7t,fullData:n,partition:"y"})};function E7t(e,t,r,n){var i=S7t(n.fullData,"geo",n.id),a=i.map(function(ae){return ae.index}),o=r("resolution"),s=r("scope"),l=UF.scopeDefaults[s],u=r("projection.type",l.projType),c=t._isAlbersUsa=u==="albers usa";c&&(s=t.scope="usa");var f=t._isScoped=s!=="world",h=t._isSatellite=u==="satellite",d=t._isConic=u.indexOf("conic")!==-1||u==="albers",v=t._isClipped=!!UF.lonaxisSpan[u];if(e.visible===!1){var m=NF.extendDeep({},t._template);m.showcoastlines=!1,m.showcountries=!1,m.showframe=!1,m.showlakes=!1,m.showland=!1,m.showocean=!1,m.showrivers=!1,m.showsubunits=!1,m.lonaxis&&(m.lonaxis.showgrid=!1),m.lataxis&&(m.lataxis.showgrid=!1),t._template=m}for(var b=r("visible"),p,k=0;k0&&q<0&&(q+=360);var V=(z+q)/2,G;if(!c){var Z=f?l.projRotate:[V,0,0];G=r("projection.rotation.lon",Z[0]),r("projection.rotation.lat",Z[1]),r("projection.rotation.roll",Z[2]),p=r("showcoastlines",!f&&b),p&&(r("coastlinecolor"),r("coastlinewidth")),p=r("showocean",b?void 0:!1),p&&r("oceancolor")}var j,N;if(c?(j=-96.6,N=38.7):(j=f?V:G,N=(E[0]+E[1])/2),r("center.lon",j),r("center.lat",N),h&&(r("projection.tilt"),r("projection.distance")),d){var H=l.projParallels||[0,60];r("projection.parallels",H)}r("projection.scale"),p=r("showland",b?void 0:!1),p&&r("landcolor"),p=r("showlakes",b?void 0:!1),p&&r("lakecolor"),p=r("showrivers",b?void 0:!1),p&&(r("rivercolor"),r("riverwidth")),p=r("showcountries",f&&s!=="usa"&&b),p&&(r("countrycolor"),r("countrywidth")),(s==="usa"||s==="north america"&&o===50)&&(r("showsubunits",b),r("subunitcolor"),r("subunitwidth")),f||(p=r("showframe",b),p&&(r("framecolor"),r("framewidth"))),r("bgcolor");var ie=r("fitbounds");ie&&(delete t.projection.scale,f?(delete t.center.lon,delete t.center.lat):v?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}});var $Z=ye((Xmr,uFe)=>{"use strict";var k7t=Id().getSubplotCalcData,C7t=Pr().counterRegex,L7t=eFe(),ey="geo",sFe=C7t(ey),lFe={};lFe[ey]={valType:"subplotid",dflt:ey,editType:"calc"};function P7t(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[ey],i=0;i{"use strict";cFe.exports={attributes:tw(),supplyDefaults:GRe(),colorbar:Qd(),formatLabels:WRe(),calc:bF(),calcGeoJSON:NZ().calcGeoJSON,plot:NZ().plot,style:zZ(),styleOnSelect:sp().styleOnSelect,hoverPoints:RDe(),eventData:FDe(),selectPoints:ODe(),moduleType:"trace",name:"scattergeo",basePlotModule:$Z(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var dFe=ye((Ymr,hFe)=>{"use strict";hFe.exports=fFe()});var o5=ye((Kmr,gFe)=>{"use strict";var{hovertemplateAttrs:D7t,templatefallbackAttrs:F7t}=Ll(),px=tw(),z7t=Tu(),vFe=Gl(),q7t=Ih().defaultLine,vx=Ao().extendFlat,pFe=px.marker.line;gFe.exports=vx({locations:{valType:"data_array",editType:"calc"},locationmode:px.locationmode,z:{valType:"data_array",editType:"calc"},geojson:vx({},px.geojson,{}),featureidkey:px.featureidkey,text:vx({},px.text,{}),hovertext:vx({},px.hovertext,{}),marker:{line:{color:vx({},pFe.color,{dflt:q7t}),width:vx({},pFe.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:px.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:px.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:vx({},vFe.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:D7t(),hovertemplatefallback:F7t(),showlegend:vx({},vFe.showlegend,{dflt:!1})},z7t("",{cLetter:"z",editTypeOverride:"calc"}))});var yFe=ye((Jmr,mFe)=>{"use strict";var gk=Pr(),O7t=td(),B7t=o5(),N7t=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");mFe.exports=function(t,r,n,i){function a(h,d){return gk.coerce(t,r,B7t,h,d)}var o=a("locations"),s=a("z");if(!(o&&o.length&&gk.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var l=a("geojson"),u;(typeof l=="string"&&l!==""||gk.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="country names"&&gk.warn(N7t),c==="geojson-id"&&a("featureidkey"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("marker.line.width");f&&a("marker.line.color"),a("marker.opacity"),O7t(t,r,i,a,{prefix:"",cLetter:"z"}),gk.coerceSelectionMarkerOpacity(r,a)}});var VF=ye(($mr,bFe)=>{"use strict";var _Fe=Eo(),U7t=fs().BADNUM,V7t=gv(),G7t=Dm(),H7t=q0();function xFe(e){return e&&typeof e=="string"}bFe.exports=function(t,r){var n=r._length,i=new Array(n),a;r.geojson?a=function(c){return xFe(c)||_Fe(c)}:a=xFe;for(var o=0;o{"use strict";var j7t=qa(),W7t=ka(),QZ=So(),X7t=tc();function Z7t(e,t){t&&wFe(e,t)}function wFe(e,t){var r=t[0].trace,n=t[0].node3,i=n.selectAll(".choroplethlocation"),a=r.marker||{},o=a.line||{},s=X7t.makeColorScaleFuncFromTrace(r);i.each(function(l){j7t.select(this).attr("fill",s(l.z)).call(W7t.stroke,l.mlc||o.color).call(QZ.dashLine,"",l.mlw||o.width||0).style("opacity",a.opacity)}),QZ.selectedPointStyle(i,r)}function Y7t(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?QZ.selectedPointStyle(r.selectAll(".choroplethlocation"),n):wFe(e,t)}TFe.exports={style:Z7t,styleOnSelect:Y7t}});var eY=ye((eyr,MFe)=>{"use strict";var K7t=qa(),AFe=Pr(),s5=dx(),J7t=TF().getTopojsonFeatures,SFe=Mg().findExtremes,$7t=GF().style;function Q7t(e,t,r){var n=t.layers.backplot.select(".choroplethlayer");AFe.makeTraceGroups(n,r,"trace choropleth").each(function(i){var a=K7t.select(this),o=a.selectAll("path.choroplethlocation").data(AFe.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),$7t(e,i)})}function e9t(e,t){for(var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r.locationmode,o=r._length,s=a==="geojson-id"?s5.extractTraceFeature(e):J7t(r,i.topojson),l=[],u=[],c=0;c{"use strict";var t9t=ho(),r9t=o5(),i9t=Pr().fillText;EFe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s,l,u,c,f=[r,n],h=[r+360,n];for(l=0;l")}}});var jF=ye((ryr,kFe)=>{"use strict";kFe.exports=function(t,r,n,i,a){t.location=r.location,t.z=r.z;var o=i[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t.ct=o.ct,t}});var WF=ye((iyr,CFe)=>{"use strict";CFe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l,u,c,f;if(r===!1)for(s=0;s{"use strict";LFe.exports={attributes:o5(),supplyDefaults:yFe(),colorbar:D_(),calc:VF(),calcGeoJSON:eY().calcGeoJSON,plot:eY().plot,style:GF().style,styleOnSelect:GF().styleOnSelect,hoverPoints:HF(),eventData:jF(),selectPoints:WF(),moduleType:"trace",name:"choropleth",basePlotModule:$Z(),categories:["geo","noOpacity","showLegend"],meta:{}}});var RFe=ye((ayr,IFe)=>{"use strict";IFe.exports=PFe()});var XF=ye((oyr,FFe)=>{"use strict";var a9t=Oa(),l0=Pr(),o9t=yT();function s9t(e,t,r,n){var i=e.cd,a=i[0].t,o=i[0].trace,s=e.xa,l=e.ya,u=a.x,c=a.y,f=s.c2p(t),h=l.c2p(r),d=e.distance,v;if(a.tree){var m=s.p2c(f-d),b=s.p2c(f+d),p=l.p2c(h-d),k=l.p2c(h+d);n==="x"?v=a.tree.range(Math.min(m,b),Math.min(l._rl[0],l._rl[1]),Math.max(m,b),Math.max(l._rl[0],l._rl[1])):v=a.tree.range(Math.min(m,b),Math.min(p,k),Math.max(m,b),Math.max(p,k))}else v=a.ids;var M,T,L,x,C,S,g,P,E,z=d;if(n==="x"){var q=!!o.xperiodalignment,V=!!o.yperiodalignment;for(C=0;C=Math.min(G,Z)&&f<=Math.max(G,Z)?0:1/0}if(S=Math.min(j,N)&&h<=Math.max(j,N)?0:1/0}E=Math.sqrt(S*S+g*g),T=v[C]}}}else for(C=v.length-1;C>-1;C--)M=v[C],L=u[M],x=c[M],S=s.c2p(L)-f,g=l.c2p(x)-h,P=Math.sqrt(S*S+g*g),P{"use strict";var zFe=20;qFe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:zFe,SYMBOL_STROKE:zFe/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]}}});var mk=ye((lyr,UFe)=>{"use strict";var l9t=Gl(),u9t=ec(),c9t=Pg(),mf=pf(),OFe=vf().axisHoverFormat,BFe=Tu(),f9t=t_(),tY=Ao().extendFlat,h9t=mc().overrideAll,d9t=gx().DASHES,NFe=mf.line,u1=mf.marker,v9t=u1.line,mx=UFe.exports=h9t({x:mf.x,x0:mf.x0,dx:mf.dx,y:mf.y,y0:mf.y0,dy:mf.dy,xperiod:mf.xperiod,yperiod:mf.yperiod,xperiod0:mf.xperiod0,yperiod0:mf.yperiod0,xperiodalignment:mf.xperiodalignment,yperiodalignment:mf.yperiodalignment,xhoverformat:OFe("x"),yhoverformat:OFe("y"),text:mf.text,hovertext:mf.hovertext,textposition:mf.textposition,textfont:u9t({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"]}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:NFe.color,width:NFe.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:f9t(d9t),dflt:"solid"}},marker:tY({},BFe("marker"),{symbol:u1.symbol,angle:u1.angle,size:u1.size,sizeref:u1.sizeref,sizemin:u1.sizemin,sizemode:u1.sizemode,opacity:u1.opacity,colorbar:u1.colorbar,line:tY({},BFe("marker.line"),{width:v9t.width})}),connectgaps:mf.connectgaps,fill:tY({},mf.fill,{dflt:"none"}),fillcolor:c9t(),selected:{marker:mf.selected.marker,textfont:mf.selected.textfont},unselected:{marker:mf.unselected.marker,textfont:mf.unselected.textfont},opacity:l9t.opacity},"calc","nested");mx.x.editType=mx.y.editType=mx.x0.editType=mx.y0.editType="calc+clearAxisTypes";mx.hovertemplate=mf.hovertemplate;mx.hovertemplatefallback=mf.hovertemplatefallback;mx.texttemplate=mf.texttemplate;mx.texttemplatefallback=mf.texttemplatefallback});var ZF=ye(rY=>{"use strict";var VFe=gx();rY.isOpenSymbol=function(e){return typeof e=="string"?VFe.OPEN_RE.test(e):e%200>100};rY.isDotSymbol=function(e){return typeof e=="string"?VFe.DOT_RE.test(e):e>200}});var jFe=ye((cyr,HFe)=>{"use strict";var GFe=Pr(),p9t=Oa(),g9t=ZF(),m9t=mk(),y9t=Pm(),YF=Ru(),_9t=lT(),x9t=Dg(),b9t=$p(),w9t=D0(),T9t=Fg(),A9t=F0();HFe.exports=function(t,r,n,i){function a(d,v){return GFe.coerce(t,r,m9t,d,v)}var o=t.marker?g9t.isOpenSymbol(t.marker.symbol):!1,s=YF.isBubble(t),l=_9t(t,r,i,a);if(!l){r.visible=!1;return}x9t(t,r,i,a),a("xhoverformat"),a("yhoverformat");var u=l{"use strict";var S9t=uI();WFe.exports=function(t,r,n){var i=t.i;return"x"in t||(t.x=r._x[i]),"y"in t||(t.y=r._y[i]),S9t(t,r,n)}});var YFe=ye((hyr,ZFe)=>{"use strict";function M9t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>=0?(a=o,i=o-1):n=o+1}return a}function E9t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>0?(a=o,i=o-1):n=o+1}return a}function k9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<0?(a=o,n=o+1):i=o-1}return a}function C9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<=0?(a=o,n=o+1):i=o-1}return a}function L9t(e,t,r,n,i){for(;n<=i;){var a=n+i>>>1,o=e[a],s=r!==void 0?r(o,t):o-t;if(s===0)return a;s<=0?n=a+1:i=a-1}return-1}function yk(e,t,r,n,i,a){return typeof r=="function"?a(e,t,r,n===void 0?0:n|0,i===void 0?e.length-1:i|0):a(e,t,void 0,r===void 0?0:r|0,n===void 0?e.length-1:n|0)}ZFe.exports={ge:function(e,t,r,n,i){return yk(e,t,r,n,i,M9t)},gt:function(e,t,r,n,i){return yk(e,t,r,n,i,E9t)},lt:function(e,t,r,n,i){return yk(e,t,r,n,i,k9t)},le:function(e,t,r,n,i){return yk(e,t,r,n,i,C9t)},eq:function(e,t,r,n,i){return yk(e,t,r,n,i,L9t)}}});var ty=ye((dyr,JFe)=>{"use strict";JFe.exports=function(t,r,n){var i={},a,o;if(typeof r=="string"&&(r=KFe(r)),Array.isArray(r)){var s={};for(o=0;o{"use strict";var P9t=ty();$Fe.exports=I9t;function I9t(e){var t;return arguments.length>1&&(e=arguments),typeof e=="string"?e=e.split(/\s/).map(parseFloat):typeof e=="number"&&(e=[e]),e.length&&typeof e[0]=="number"?e.length===1?t={width:e[0],height:e[0],x:0,y:0}:e.length===2?t={width:e[0],height:e[1],x:0,y:0}:t={x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(e=P9t(e,{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"}),t={x:e.left||0,y:e.top||0},e.width==null?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,e.height==null?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}});var nw=ye((pyr,QFe)=>{"use strict";QFe.exports=R9t;function R9t(e,t){if(!e||e.length==null)throw Error("Argument should be an array");t==null?t=1:t=Math.floor(t);for(var r=Array(t*2),n=0;ni&&(i=e[o]),e[o]{eze.exports=function(){for(var e=0;e{var rze=tF();ize.exports=D9t;function D9t(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=+(r||0)|0,Array.isArray(e)&&e[0]&&typeof e[0][0]=="number"){var n=e[0].length,i=e.length*n,a,o,s,l;(!t||typeof t=="string")&&(t=new(rze(t||"float32"))(i+r));var u=t.length-r;if(i!==u)throw new Error("source length "+i+" ("+n+"x"+e.length+") does not match destination length "+u);for(a=0,s=r;a{"use strict";nze.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var sze=ye((_yr,oze)=>{"use strict";oze.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var vze=ye((xyr,dze)=>{"use strict";var lze=YFe(),uze=ik(),F9t=l5(),z9t=nw(),cze=ty(),nY=tze(),q9t=aw(),O9t=aze(),B9t=tF(),fze=sze(),N9t=1073741824;dze.exports=function(t,r){r||(r={}),t=q9t(t,"float64"),r=cze(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let n=nY(r.maxDepth,255),i=nY(r.bounds,z9t(t,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;let a=hze(t,i),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(B9t(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let p=0;pn||x>N9t){for(let N=0;N_e||g>Ee||P=z||ie===ae)return;let Ce=l[H];ae===void 0&&(ae=Ce.length);for(let Pe=ie;Pe=T&&He<=x&<>=L&<<=C&&q.push(ce)}let ge=u[H],re=ge[ie*4+0],Se=ge[ie*4+1],ke=ge[ie*4+2],be=ge[ie*4+3],Be=G(ge,ie+1),Le=N*.5,me=H+1;V(Z,j,Le,me,re,Se||ke||be||Be),V(Z,j+Le,Le,me,Se,ke||be||Be),V(Z+Le,j,Le,me,ke,be||Be),V(Z+Le,j+Le,Le,me,be,Be)}function G(Z,j){let N=null,H=0;for(;N===null;)if(N=Z[j*4+H],H++,H>Z.length)return null;return N}return q}function m(p,k,M,T,L){let x=[];for(let C=0;C{"use strict";pze.exports=vze()});var aY=ye((wyr,gze)=>{gze.exports=U9t;function U9t(e){var t=0,r=0,n=0,i=0;return e.map(function(a){a=a.slice();var o=a[0],s=o.toUpperCase();if(o!=s)switch(a[0]=s,o){case"a":a[6]+=n,a[7]+=i;break;case"v":a[1]+=i;break;case"h":a[1]+=n;break;default:for(var l=1;l{"use strict";Object.defineProperty(JF,"__esModule",{value:!0});var V9t=function(){function e(t,r){var n=[],i=!0,a=!1,o=void 0;try{for(var s=t[Symbol.iterator](),l;!(i=(l=s.next()).done)&&(n.push(l.value),!(r&&n.length===r));i=!0);}catch(u){a=!0,o=u}finally{try{!i&&s.return&&s.return()}finally{if(a)throw o}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_k=Math.PI*2,oY=function(t,r,n,i,a,o,s){var l=t.x,u=t.y;l*=r,u*=n;var c=i*l-a*u,f=a*l+i*u;return{x:c+o,y:f+s}},G9t=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(t),a=Math.sin(t),o=Math.cos(t+r),s=Math.sin(t+r);return[{x:i-a*n,y:a+i*n},{x:o+s*n,y:s-o*n},{x:o,y:s}]},mze=function(t,r,n,i){var a=t*i-r*n<0?-1:1,o=t*n+r*i;return o>1&&(o=1),o<-1&&(o=-1),a*Math.acos(o)},H9t=function(t,r,n,i,a,o,s,l,u,c,f,h){var d=Math.pow(a,2),v=Math.pow(o,2),m=Math.pow(f,2),b=Math.pow(h,2),p=d*v-d*b-v*m;p<0&&(p=0),p/=d*b+v*m,p=Math.sqrt(p)*(s===l?-1:1);var k=p*a/o*h,M=p*-o/a*f,T=c*k-u*M+(t+n)/2,L=u*k+c*M+(r+i)/2,x=(f-k)/a,C=(h-M)/o,S=(-f-k)/a,g=(-h-M)/o,P=mze(1,0,x,C),E=mze(x,C,S,g);return l===0&&E>0&&(E-=_k),l===1&&E<0&&(E+=_k),[T,L,P,E]},j9t=function(t){var r=t.px,n=t.py,i=t.cx,a=t.cy,o=t.rx,s=t.ry,l=t.xAxisRotation,u=l===void 0?0:l,c=t.largeArcFlag,f=c===void 0?0:c,h=t.sweepFlag,d=h===void 0?0:h,v=[];if(o===0||s===0)return[];var m=Math.sin(u*_k/360),b=Math.cos(u*_k/360),p=b*(r-i)/2+m*(n-a)/2,k=-m*(r-i)/2+b*(n-a)/2;if(p===0&&k===0)return[];o=Math.abs(o),s=Math.abs(s);var M=Math.pow(p,2)/Math.pow(o,2)+Math.pow(k,2)/Math.pow(s,2);M>1&&(o*=Math.sqrt(M),s*=Math.sqrt(M));var T=H9t(r,n,i,a,o,s,f,d,m,b,p,k),L=V9t(T,4),x=L[0],C=L[1],S=L[2],g=L[3],P=Math.abs(g)/(_k/4);Math.abs(1-P)<1e-7&&(P=1);var E=Math.max(Math.ceil(P),1);g/=E;for(var z=0;z{"use strict";bze.exports=X9t;var W9t=_ze();function X9t(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f4?(n=d[d.length-4],i=d[d.length-3]):(n=u,i=c),r.push(d)}return r}function $F(e,t,r,n){return["C",e,t,r,n,r,n]}function xze(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}});var sY=ye((Ayr,Tze)=>{"use strict";Tze.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))}});var Mze=ye((Syr,Sze)=>{"use strict";var Z9t=aM(),Y9t=aY(),K9t=wze(),J9t=sY(),Aze=mE();Sze.exports=$9t;function $9t(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"&&(Aze(J9t(e),"String is not an SVG path."),e=Z9t(e)),Aze(Array.isArray(e),"Argument should be a string or an array of path segments."),e=Y9t(e),e=K9t(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],r=0,n=e.length;rt[2]&&(t[2]=i[a+0]),i[a+1]>t[3]&&(t[3]=i[a+1]);return t}});var Ize=ye((Myr,Pze)=>{var ow=Math.PI,Eze=Lze(120);Pze.exports=Q9t;function Q9t(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f7&&(r.push(d.splice(0,7)),d.unshift("C"));break;case"S":var m=u,b=c;(t=="C"||t=="S")&&(m+=m-n,b+=b-i),d=["C",m,b,d[1],d[2],d[3],d[4]];break;case"T":t=="Q"||t=="T"?(s=u*2-s,l=c*2-l):(s=u,l=c),d=kze(u,c,s,l,d[1],d[2]);break;case"Q":s=d[1],l=d[2],d=kze(u,c,d[1],d[2],d[3],d[4]);break;case"L":d=QF(u,c,d[1],d[2]);break;case"H":d=QF(u,c,d[1],c);break;case"V":d=QF(u,c,u,d[1]);break;case"Z":d=QF(u,c,a,o);break}t=v,u=d[d.length-2],c=d[d.length-1],d.length>4?(n=d[d.length-4],i=d[d.length-3]):(n=u,i=c),r.push(d)}return r}function QF(e,t,r,n){return["C",e,t,r,n,r,n]}function kze(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function Cze(e,t,r,n,i,a,o,s,l,u){if(u)M=u[0],T=u[1],p=u[2],k=u[3];else{var c=lY(e,t,-i);e=c.x,t=c.y,c=lY(s,l,-i),s=c.x,l=c.y;var f=(e-s)/2,h=(t-l)/2,d=f*f/(r*r)+h*h/(n*n);d>1&&(d=Math.sqrt(d),r=d*r,n=d*n);var v=r*r,m=n*n,b=(a==o?-1:1)*Math.sqrt(Math.abs((v*m-v*h*h-m*f*f)/(v*h*h+m*f*f)));b==1/0&&(b=1);var p=b*r*h/n+(e+s)/2,k=b*-n*f/r+(t+l)/2,M=Math.asin(((t-k)/n).toFixed(9)),T=Math.asin(((l-k)/n).toFixed(9));M=eT&&(M=M-ow*2),!o&&T>M&&(T=T-ow*2)}if(Math.abs(T-M)>Eze){var L=T,x=s,C=l;T=M+Eze*(o&&T>M?1:-1),s=p+r*Math.cos(T),l=k+n*Math.sin(T);var S=Cze(s,l,r,n,i,0,o,x,C,[T,L,p,k])}var g=Math.tan((T-M)/4),P=4/3*r*g,E=4/3*n*g,z=[2*e-(e+P*Math.sin(M)),2*t-(t-E*Math.cos(M)),s+P*Math.sin(T),l-E*Math.cos(T),s,l];if(u)return z;S&&(z=z.concat(S));for(var q=0;q{var eqt=aY(),tqt=Ize(),rqt={M:"moveTo",C:"bezierCurveTo"};Rze.exports=function(e,t){e.beginPath(),tqt(eqt(t)).forEach(function(r){var n=r[0],i=r.slice(1);e[rqt[n]].apply(e,i)}),e.closePath()}});var Oze=ye((kyr,qze)=>{"use strict";var iqt=ik();qze.exports=nqt;var xk=1e20;function nqt(e,t){t||(t={});var r=t.cutoff==null?.25:t.cutoff,n=t.radius==null?8:t.radius,i=t.channel||0,a,o,s,l,u,c,f,h,d,v,m;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");a=t.width,o=t.height,l=e,t.stride?c=t.stride:c=Math.floor(e.length/a/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=e,f=h.getContext("2d"),a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e.canvas,f=e,a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.ImageData&&e instanceof window.ImageData&&(d=e,a=e.width,o=e.height,l=d.data,c=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(a*o),v=0,m=u.length;v{"use strict";var aqt=Mze(),oqt=aM(),sqt=Dze(),lqt=sY(),uqt=Oze(),uY=document.createElement("canvas"),dp=uY.getContext("2d");Bze.exports=cqt;function cqt(e,t){if(!lqt(e))throw Error("Argument should be valid svg path string");t||(t={});var r,n;t.shape?(r=t.shape[0],n=t.shape[1]):(r=uY.width=t.w||t.width||200,n=uY.height=t.h||t.height||200);var i=Math.min(r,n),a=t.stroke||0,o=t.viewbox||t.viewBox||aqt(e),s=[r/(o[2]-o[0]),n/(o[3]-o[1])],l=Math.min(s[0]||0,s[1]||0)/2;if(dp.fillStyle="black",dp.fillRect(0,0,r,n),dp.fillStyle="white",a&&(typeof a!="number"&&(a=1),a>0?dp.strokeStyle="white":dp.strokeStyle="black",dp.lineWidth=Math.abs(a)),dp.translate(r*.5,n*.5),dp.scale(l,l),fqt()){var u=new Path2D(e);dp.fill(u),a&&dp.stroke(u)}else{var c=oqt(e);sqt(dp,c),dp.fill(),a&&dp.stroke()}dp.setTransform(1,0,0,1,0,0);var f=uqt(dp,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:i*.5});return f}var ez;function fqt(){if(ez!=null)return ez;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return ez=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var r=e.getImageData(0,0,1,1);return ez=r&&r.data&&r.data[3]===255}});var lw=ye((Lyr,Jze)=>{"use strict";var rz=Eo(),hqt=Nze(),tz=sx(),dqt=Oa(),f5=Pr(),bh=f5.isArrayOrTypedArray,u5=So(),Uze=df(),Vze=a1().formatColor,c5=Ru(),vqt=B3(),fY=ZF(),bk=gx(),pqt=X1().DESELECTDIM,Gze={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},gqt=ip().appendArrayPointValue;function mqt(e,t){var r,n={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},i=e._context.plotGlPixelRatio;if(t.visible!==!0)return n;if(c5.hasText(t)&&(n.text=Kze(e,t),n.textSel=jze(e,t,t.selected),n.textUnsel=jze(e,t,t.unselected)),c5.hasMarkers(t)&&(n.marker=dY(e,t),n.markerSel=hY(e,t,t.selected),n.markerUnsel=hY(e,t,t.unselected),!t.unselected&&bh(t.marker.opacity))){var a=t.marker.opacity;for(n.markerUnsel.opacity=new Array(a.length),r=0;r500?"bold":"normal":e}function dY(e,t){var r=t._length,n=t.marker,i={},a,o=bh(n.symbol),s=bh(n.angle),l=bh(n.color),u=bh(n.line.color),c=bh(n.opacity),f=bh(n.size),h=bh(n.line.width),d;if(o||(d=fY.isOpenSymbol(n.symbol)),o||l||u||c||s){i.symbols=new Array(r),i.angles=new Array(r),i.colors=new Array(r),i.borderColors=new Array(r);var v=n.symbol,m=n.angle,b=Vze(n,n.opacity,r),p=Vze(n.line,n.opacity,r);if(!bh(p[0])){var k=p;for(p=Array(r),a=0;abk.TOO_MANY_POINTS||c5.hasMarkers(t)?"rect":"round";if(u&&t.connectgaps){var f=a[0],h=a[1];for(o=0;o1?l[o]:l[0]:l,d=bh(u)?u.length>1?u[o]:u[0]:u,v=Gze[h],m=Gze[d],b=c?c/.8+1:0,p=-m*b-m*.5;a.offset[o]=[v*b/f,p/f]}}return a}Jze.exports={style:mqt,markerStyle:dY,markerSelection:hY,linePositions:_qt,errorBarPositions:xqt,textPosition:bqt}});var vY=ye((Pyr,$ze)=>{"use strict";var iz=Pr();$ze.exports=function(t,r){var n=r._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(n=r._scene={},n.init=function(){iz.extendFlat(n,a,i)},n.init(),n.update=function(s){var l=iz.repeat(s,n.count);if(n.fill2d&&n.fill2d.update(l),n.scatter2d&&n.scatter2d.update(l),n.line2d&&n.line2d.update(l),n.error2d&&n.error2d.update(l.concat(l)),n.select2d&&n.select2d.update(l),n.glText)for(var u=0;u{"use strict";var wqt=KF(),h5=Pr(),Qze=df(),Tqt=Mg().findExtremes,e7e=zg(),pY=O0(),Aqt=pY.calcMarkerSize,Sqt=pY.calcAxisExpansion,Mqt=pY.setFirstScatter,Eqt=z0(),d5=lw(),kqt=vY(),t7e=fs().BADNUM,Cqt=gx().TOO_MANY_POINTS;i7e.exports=function(t,r){var n=t._fullLayout,i=r._xA=Qze.getFromId(t,r.xaxis,"x"),a=r._yA=Qze.getFromId(t,r.yaxis,"y"),o=n._plots[r.xaxis+r.yaxis],s=r._length,l=s>=Cqt,u=s*2,c={},f,h=i.makeCalcdata(r,"x"),d=a.makeCalcdata(r,"y"),v=e7e(r,i,"x",h),m=e7e(r,a,"y",d),b=v.vals,p=m.vals;r._x=b,r._y=p,r.xperiodalignment&&(r._origX=h,r._xStarts=v.starts,r._xEnds=v.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=m.starts,r._yEnds=m.ends);var k=new Array(u),M=new Array(s);for(f=0;f1&&h5.extendFlat(o.line,d5.linePositions(e,r,n)),o.errorX||o.errorY){var s=d5.errorBarPositions(e,r,n,i,a);o.errorX&&h5.extendFlat(o.errorX,s.x),o.errorY&&h5.extendFlat(o.errorY,s.y)}return o.text&&(h5.extendFlat(o.text,{positions:n},d5.textPosition(e,r,o.text,o.marker)),h5.extendFlat(o.textSel,{positions:n},d5.textPosition(e,r,o.text,o.markerSel)),h5.extendFlat(o.textUnsel,{positions:n},d5.textPosition(e,r,o.text,o.markerUnsel))),o}});var gY=ye((Ryr,o7e)=>{"use strict";var a7e=Pr(),Pqt=ka(),Iqt=X1().DESELECTDIM;function Rqt(e){var t=e[0],r=t.trace,n=t.t,i=n._scene,a=n.index,o=i.selectBatch[a],s=i.unselectBatch[a],l=i.textOptions[a],u=i.textSelectedOptions[a]||{},c=i.textUnselectedOptions[a]||{},f=a7e.extendFlat({},l),h,d;if(o.length||s.length){var v=u.color,m=c.color,b=l.color,p=a7e.isArrayOrTypedArray(b);for(f.color=new Array(r._length),h=0;h{"use strict";var s7e=Ru(),Dqt=gY().styleTextSelection;l7e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l=n[0].t,u=s._length,c=l.x,f=l.y,h=l._scene,d=l.index;if(!h)return o;var v=s7e.hasText(s),m=s7e.hasMarkers(s),b=!m&&!v;if(s.visible!==!0||b)return o;var p=[],k=[];if(r!==!1&&!r.degenerate)for(var M=0;M{"use strict";var Fqt=XF();u7e.exports={moduleType:"trace",name:"scattergl",basePlotModule:mh(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:mk(),supplyDefaults:jFe(),crossTraceDefaults:hU(),colorbar:Qd(),formatLabels:XFe(),calc:n7e(),hoverPoints:Fqt.hoverPoints,selectPoints:mY(),meta:{}}});var h7e=ye((zyr,az)=>{"use strict";var nz=ik();az.exports=f7e;az.exports.to=f7e;az.exports.from=zqt;function f7e(e,t){t==null&&(t=!0);var r=e[0],n=e[1],i=e[2],a=e[3];a==null&&(a=t?1:255),t&&(r*=255,n*=255,i*=255,a*=255),r=nz(r,0,255)&255,n=nz(n,0,255)&255,i=nz(i,0,255)&255,a=nz(a,0,255)&255;var o=r*16777216+(n<<16)+(i<<8)+a;return o}function zqt(e,t){e=+e;var r=e>>>24,n=(e&16711680)>>>16,i=(e&65280)>>>8,a=e&255;return t===!1?[r,n,i,a]:[r/255,n/255,i/255,a/255]}});var Nh=ye((qyr,v7e)=>{"use strict";var d7e=Object.getOwnPropertySymbols,qqt=Object.prototype.hasOwnProperty,Oqt=Object.prototype.propertyIsEnumerable;function Bqt(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Nqt(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(a){return t[a]});if(n.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(a){i[a]=a}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch(a){return!1}}v7e.exports=Nqt()?Object.assign:function(e,t){for(var r,n=Bqt(e),i,a=1;a{p7e.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n{"use strict";m7e.exports=function(t,r,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var i=0,a=n.length;i{"use strict";y7e.exports=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))});var oz=ye((Uyr,v5)=>{"use strict";v5.exports=wk;v5.exports.float32=v5.exports.float=wk;v5.exports.fract32=v5.exports.fract=Uqt;var x7e=new Float32Array(1);function Uqt(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=wk(e));for(var r=0,n=t.length;r{"use strict";function Vqt(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Gqt(e,t){return Wqt(e)||Vqt(e,t)||w7e(e,t)||Yqt()}function Hqt(e){return jqt(e)||Xqt(e)||w7e(e)||Zqt()}function jqt(e){if(Array.isArray(e))return _Y(e)}function Wqt(e){if(Array.isArray(e))return e}function Xqt(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function w7e(e,t){if(e){if(typeof e=="string")return _Y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _Y(e,t)}}function _Y(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r 1.0 + delta) { + discard; + } + + alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius); + + float borderRadius = fragBorderRadius; + float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius); + vec4 color = mix(fragColor, fragBorderColor, ratio); + color.a *= alpha * opacity; + gl_FragColor = color; +} +`]),v.vert=sz([`precision highp float; +#define GLSLIFY 1 + +attribute float x, y, xFract, yFract; +attribute float size, borderSize; +attribute vec4 colorId, borderColorId; +attribute float isActive; + +// \`invariant\` effectively turns off optimizations for the position. +// We need this because -fast-math on M1 Macs is re-ordering +// floating point operations in a way that causes floating point +// precision limits to put points in the wrong locations. +invariant gl_Position; + +uniform bool constPointSize; +uniform float pixelRatio; +uniform vec2 paletteSize, scale, scaleFract, translate, translateFract; +uniform sampler2D paletteTexture; + +const float maxSize = 100.; + +varying vec4 fragColor, fragBorderColor; +varying float fragBorderRadius, fragWidth; + +float pointSizeScale = (constPointSize) ? 2. : pixelRatio; + +bool isDirect = (paletteSize.x < 1.); + +vec4 getColor(vec4 id) { + return isDirect ? id / 255. : texture2D(paletteTexture, + vec2( + (id.x + .5) / paletteSize.x, + (id.y + .5) / paletteSize.y + ) + ); +} + +void main() { + // ignore inactive points + if (isActive == 0.) return; + + vec2 position = vec2(x, y); + vec2 positionFract = vec2(xFract, yFract); + + vec4 color = getColor(colorId); + vec4 borderColor = getColor(borderColorId); + + float size = size * maxSize / 255.; + float borderSize = borderSize * maxSize / 255.; + + gl_PointSize = (size + borderSize) * pointSizeScale; + + vec2 pos = (position + translate) * scale + + (positionFract + translateFract) * scale + + (position + translate) * scaleFract + + (positionFract + translateFract) * scaleFract; + + gl_Position = vec4(pos * 2. - 1., 0., 1.); + + fragBorderRadius = 1. - 2. * borderSize / (size + borderSize); + fragColor = color; + fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; + fragWidth = 1. / gl_PointSize; +} +`]),b7e&&(v.frag=v.frag.replace("smoothstep","smoothStep"),d.frag=d.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(v)}av.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4};av.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this};av.prototype.draw=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;nie)?N.tree=Qqt(j,{bounds:ge}):ie&&ie.length&&(N.tree=ie),N.tree){var re={primitive:"points",usage:"static",data:N.tree,type:"uint32"};N.elements?N.elements(re):N.elements=o.elements(re)}var Se=lz.float32(j);ae({data:Se,usage:"dynamic"});var ke=lz.fract32(j,Se);return _e({data:ke,usage:"dynamic"}),Ee({data:new Uint8Array(Ce),type:"uint8",usage:"stream"}),j}},{marker:function(j,N,H){var ie=N.activation;if(ie.forEach(function(ke){return ke&&ke.destroy&&ke.destroy()}),ie.length=0,!j||typeof j[0]=="number"){var ae=e.addMarker(j);ie[ae]=!0}else{for(var _e=[],Ee=0,Ce=Math.min(j.length,N.count);Ee=0)return i;var a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)a=e;else{a=new Uint8Array(e.length);for(var o=0,s=e.length;on*4&&(this.tooManyColors=!0),this.updatePalette(r),i.length===1?i[0]:i};av.prototype.updatePalette=function(e){if(!this.tooManyColors){var t=this.maxColors,r=this.paletteTexture,n=Math.ceil(e.length*.25/t);if(n>1){e=e.slice();for(var i=e.length*.25%t;i{"use strict";AY.exports=fz;AY.exports.default=fz;function fz(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,a=S7e(e,0,i,r,!0),o=[];if(!a||a.next===a.prev)return o;var s,l,u,c,f,h,d;if(n&&(a=fOt(e,t,a,r)),e.length>80*r){s=u=e[0],l=c=e[1];for(var v=r;vu&&(u=f),h>c&&(c=h);d=Math.max(u-s,c-l),d=d!==0?32767/d:0}return Tk(a,o,r,s,l,d,0),o}function S7e(e,t,r,n,i){var a,o;if(i===TY(e,t,r,n)>0)for(a=t;a=t;a-=n)o=A7e(a,e[a],e[a+1],o);return o&&hz(o,o.next)&&(Sk(o),o=o.next),o}function cw(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(hz(r,r.next)||wh(r.prev,r,r.next)===0)){if(Sk(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function Tk(e,t,r,n,i,a,o){if(e){!o&&a&&gOt(e,n,i,a);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,a?lOt(e,n,i,a):sOt(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),Sk(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=uOt(cw(e),t,r),Tk(e,t,r,n,i,a,2)):o===2&&cOt(e,t,r,n,i,a):Tk(cw(e),t,r,n,i,a,1);break}}}}function sOt(e){var t=e.prev,r=e,n=e.next;if(wh(t,r,n)>=0)return!1;for(var i=t.x,a=r.x,o=n.x,s=t.y,l=r.y,u=n.y,c=ia?i>o?i:o:a>o?a:o,d=s>l?s>u?s:u:l>u?l:u,v=n.next;v!==t;){if(v.x>=c&&v.x<=h&&v.y>=f&&v.y<=d&&p5(i,s,a,l,o,u,v.x,v.y)&&wh(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function lOt(e,t,r,n){var i=e.prev,a=e,o=e.next;if(wh(i,a,o)>=0)return!1;for(var s=i.x,l=a.x,u=o.x,c=i.y,f=a.y,h=o.y,d=sl?s>u?s:u:l>u?l:u,b=c>f?c>h?c:h:f>h?f:h,p=bY(d,v,t,r,n),k=bY(m,b,t,r,n),M=e.prevZ,T=e.nextZ;M&&M.z>=p&&T&&T.z<=k;){if(M.x>=d&&M.x<=m&&M.y>=v&&M.y<=b&&M!==i&&M!==o&&p5(s,c,l,f,u,h,M.x,M.y)&&wh(M.prev,M,M.next)>=0||(M=M.prevZ,T.x>=d&&T.x<=m&&T.y>=v&&T.y<=b&&T!==i&&T!==o&&p5(s,c,l,f,u,h,T.x,T.y)&&wh(T.prev,T,T.next)>=0))return!1;T=T.nextZ}for(;M&&M.z>=p;){if(M.x>=d&&M.x<=m&&M.y>=v&&M.y<=b&&M!==i&&M!==o&&p5(s,c,l,f,u,h,M.x,M.y)&&wh(M.prev,M,M.next)>=0)return!1;M=M.prevZ}for(;T&&T.z<=k;){if(T.x>=d&&T.x<=m&&T.y>=v&&T.y<=b&&T!==i&&T!==o&&p5(s,c,l,f,u,h,T.x,T.y)&&wh(T.prev,T,T.next)>=0)return!1;T=T.nextZ}return!0}function uOt(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!hz(i,a)&&M7e(i,n,n.next,a)&&Ak(i,a)&&Ak(a,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),Sk(n),Sk(n.next),n=e=a),n=n.next}while(n!==e);return cw(n)}function cOt(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&_Ot(o,s)){var l=E7e(o,s);o=cw(o,o.next),l=cw(l,l.next),Tk(o,t,r,n,i,a,0),Tk(l,t,r,n,i,a,0);return}s=s.next}o=o.next}while(o!==e)}function fOt(e,t,r,n){var i=[],a,o,s,l,u;for(a=0,o=t.length;a=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>a&&(a=s,o=r.x=r.x&&r.x>=u&&n!==r.x&&p5(io.x||r.x===o.x&&pOt(o,r)))&&(o=r,f=h)),r=r.next;while(r!==l);return o}function pOt(e,t){return wh(e.prev,e,t.prev)<0&&wh(t.next,e,e.next)<0}function gOt(e,t,r,n){var i=e;do i.z===0&&(i.z=bY(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,mOt(i)}function mOt(e){var t,r,n,i,a,o,s,l,u=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1);return e}function bY(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function yOt(e){var t=e,r=e;do(t.x=(e-o)*(a-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function _Ot(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!xOt(e,t)&&(Ak(e,t)&&Ak(t,e)&&bOt(e,t)&&(wh(e.prev,e,t.prev)||wh(e,t.prev,t))||hz(e,t)&&wh(e.prev,e,e.next)>0&&wh(t.prev,t,t.next)>0)}function wh(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function hz(e,t){return e.x===t.x&&e.y===t.y}function M7e(e,t,r,n){var i=cz(wh(e,t,r)),a=cz(wh(e,t,n)),o=cz(wh(r,n,e)),s=cz(wh(r,n,t));return!!(i!==a&&o!==s||i===0&&uz(e,r,t)||a===0&&uz(e,n,t)||o===0&&uz(r,e,n)||s===0&&uz(r,t,n))}function uz(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function cz(e){return e>0?1:e<0?-1:0}function xOt(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&M7e(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Ak(e,t){return wh(e.prev,e,e.next)<0?wh(e,t,e.next)>=0&&wh(e,e.prev,t)>=0:wh(e,t,e.prev)<0||wh(e,e.next,t)<0}function bOt(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function E7e(e,t){var r=new wY(e.i,e.x,e.y),n=new wY(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function A7e(e,t,r,n){var i=new wY(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Sk(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function wY(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}fz.deviation=function(e,t,r,n){var i=t&&t.length,a=i?t[0]*r:e.length,o=Math.abs(TY(e,0,a,r));if(i)for(var s=0,l=t.length;s0&&(n+=e[i-1].length,r.holes.push(n))}return r}});var L7e=ye((Hyr,C7e)=>{"use strict";var wOt=nw();C7e.exports=TOt;function TOt(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=wOt(e,t));for(var n=0;n{"use strict";P7e.exports=function(){var e,t;if(typeof WeakMap!="function")return!1;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(r){return!1}return!(String(e)!=="[object WeakMap]"||typeof e.set!="function"||e.set({},1)!==e||typeof e.delete!="function"||typeof e.has!="function"||e.get(t)!=="one")}});var D7e=ye((Wyr,R7e)=>{"use strict";R7e.exports=function(){}});var yx=ye((Xyr,F7e)=>{"use strict";var AOt=D7e()();F7e.exports=function(e){return e!==AOt&&e!==null}});var SY=ye((Zyr,q7e)=>{"use strict";var SOt=Object.create,MOt=Object.getPrototypeOf,z7e={};q7e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||SOt;return typeof e!="function"?!1:MOt(e(t(null),z7e))===z7e}});var MY=ye((Yyr,O7e)=>{"use strict";var EOt=yx(),kOt={function:!0,object:!0};O7e.exports=function(e){return EOt(e)&&kOt[typeof e]||!1}});var c1=ye((Kyr,B7e)=>{"use strict";var COt=yx();B7e.exports=function(e){if(!COt(e))throw new TypeError("Cannot use null or undefined");return e}});var U7e=ye((Jyr,N7e)=>{"use strict";var EY=Object.create,dz;SY()()||(dz=kY());N7e.exports=function(){var e,t,r;return!dz||dz.level!==1?EY:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(n){if(n==="__proto__"){t[n]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}t[n]=r}),Object.defineProperties(e,t),Object.defineProperty(dz,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,i){return EY(n===null?e:n,i)})}()});var kY=ye(($yr,V7e)=>{"use strict";var LOt=MY(),POt=c1(),IOt=Object.prototype.isPrototypeOf,ROt=Object.defineProperty,DOt={configurable:!0,enumerable:!1,writable:!0,value:void 0},vz;vz=function(e,t){if(POt(e),t===null||LOt(t))return e;throw new TypeError("Prototype must be null or an object")};V7e.exports=function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,i){return r.call(vz(n,i),i),n}):t=function(n,i){return vz(n,i).__proto__=i,n}:t=function n(i,a){var o;return vz(i,a),o=IOt.call(n.nullPolyfill,i),o&&delete n.nullPolyfill.__proto__,a===null&&(a=n.nullPolyfill),i.__proto__=a,o&&ROt(n.nullPolyfill,"__proto__",DOt),i},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e=Object.create(null),t={},r,n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{r=n.set,r.call(e,t)}catch(i){}if(Object.getPrototypeOf(e)===t)return{set:r,level:2}}return e.__proto__=t,Object.getPrototypeOf(e)===t?{level:2}:(e={},e.__proto__=t,Object.getPrototypeOf(e)===t?{level:1}:!1)}());U7e()});var pz=ye((Qyr,G7e)=>{"use strict";G7e.exports=SY()()?Object.setPrototypeOf:kY()});var j7e=ye((e1r,H7e)=>{"use strict";var FOt=MY();H7e.exports=function(e){if(!FOt(e))throw new TypeError(e+" is not an Object");return e}});var X7e=ye((t1r,W7e)=>{"use strict";var zOt=Object.create(null),qOt=Math.random;W7e.exports=function(){var e;do e=qOt().toString(36).slice(2);while(zOt[e]);return e}});var fw=ye((r1r,Z7e)=>{"use strict";var OOt=void 0;Z7e.exports=function(e){return e!==OOt&&e!==null}});var gz=ye((i1r,Y7e)=>{"use strict";var BOt=fw(),NOt={object:!0,function:!0,undefined:!0};Y7e.exports=function(e){return BOt(e)?hasOwnProperty.call(NOt,typeof e):!1}});var J7e=ye((n1r,K7e)=>{"use strict";var UOt=gz();K7e.exports=function(e){if(!UOt(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var Q7e=ye((a1r,$7e)=>{"use strict";var VOt=J7e();$7e.exports=function(e){if(typeof e!="function"||!hasOwnProperty.call(e,"length"))return!1;try{if(typeof e.length!="number"||typeof e.call!="function"||typeof e.apply!="function")return!1}catch(t){return!1}return!VOt(e)}});var CY=ye((o1r,e9e)=>{"use strict";var GOt=Q7e(),HOt=/^\s*class[\s{/}]/,jOt=Function.prototype.toString;e9e.exports=function(e){return!(!GOt(e)||HOt.test(jOt.call(e)))}});var r9e=ye((s1r,t9e)=>{"use strict";t9e.exports=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}});var n9e=ye((l1r,i9e)=>{"use strict";i9e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var o9e=ye((u1r,a9e)=>{"use strict";var WOt=yx(),XOt=Object.keys;a9e.exports=function(e){return XOt(WOt(e)?Object(e):e)}});var l9e=ye((c1r,s9e)=>{"use strict";s9e.exports=n9e()()?Object.keys:o9e()});var c9e=ye((f1r,u9e)=>{"use strict";var ZOt=l9e(),YOt=c1(),KOt=Math.max;u9e.exports=function(e,t){var r,n,i=KOt(arguments.length,2),a;for(e=Object(YOt(e)),a=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n{"use strict";f9e.exports=r9e()()?Object.assign:c9e()});var LY=ye((d1r,h9e)=>{"use strict";var JOt=yx(),$Ot=Array.prototype.forEach,QOt=Object.create,eBt=function(e,t){var r;for(r in e)t[r]=e[r]};h9e.exports=function(e){var t=QOt(null);return $Ot.call(arguments,function(r){JOt(r)&&eBt(Object(r),t)}),t}});var v9e=ye((v1r,d9e)=>{"use strict";var PY="razdwatrzy";d9e.exports=function(){return typeof PY.contains!="function"?!1:PY.contains("dwa")===!0&&PY.contains("foo")===!1}});var g9e=ye((p1r,p9e)=>{"use strict";var tBt=String.prototype.indexOf;p9e.exports=function(e){return tBt.call(this,e,arguments[1])>-1}});var IY=ye((g1r,m9e)=>{"use strict";m9e.exports=v9e()()?String.prototype.contains:g9e()});var f1=ye((m1r,b9e)=>{"use strict";var yz=fw(),y9e=CY(),_9e=mz(),x9e=LY(),Mk=IY(),rBt=b9e.exports=function(e,t){var r,n,i,a,o;return arguments.length<2||typeof e!="string"?(a=t,t=e,e=null):a=arguments[2],yz(e)?(r=Mk.call(e,"c"),n=Mk.call(e,"e"),i=Mk.call(e,"w")):(r=i=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:i},a?_9e(x9e(a),o):o};rBt.gs=function(e,t,r){var n,i,a,o;return typeof e!="string"?(a=r,r=t,t=e,e=null):a=arguments[3],yz(t)?y9e(t)?yz(r)?y9e(r)||(a=r,r=void 0):r=void 0:(a=t,t=r=void 0):t=void 0,yz(e)?(n=Mk.call(e,"c"),i=Mk.call(e,"e")):(n=!0,i=!1),o={get:t,set:r,configurable:n,enumerable:i},a?_9e(x9e(a),o):o}});var Ek=ye((y1r,T9e)=>{"use strict";var w9e=Object.prototype.toString,iBt=w9e.call(function(){return arguments}());T9e.exports=function(e){return w9e.call(e)===iBt}});var kk=ye((_1r,S9e)=>{"use strict";var A9e=Object.prototype.toString,nBt=A9e.call("");S9e.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||A9e.call(e)===nBt)||!1}});var E9e=ye((x1r,M9e)=>{"use strict";M9e.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var L9e=ye((b1r,C9e)=>{var k9e=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};C9e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return k9e()}try{return __global__||k9e()}finally{delete Object.prototype.__global__}}()});var Ck=ye((w1r,P9e)=>{"use strict";P9e.exports=E9e()()?globalThis:L9e()});var R9e=ye((T1r,I9e)=>{"use strict";var aBt=Ck(),RY={object:!0,symbol:!0};I9e.exports=function(){var e=aBt.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!RY[typeof e.iterator]||!RY[typeof e.toPrimitive]||!RY[typeof e.toStringTag])}});var F9e=ye((A1r,D9e)=>{"use strict";D9e.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var DY=ye((S1r,z9e)=>{"use strict";var oBt=F9e();z9e.exports=function(e){if(!oBt(e))throw new TypeError(e+" is not a symbol");return e}});var U9e=ye((M1r,N9e)=>{"use strict";var q9e=f1(),sBt=Object.create,O9e=Object.defineProperty,lBt=Object.prototype,B9e=sBt(null);N9e.exports=function(e){for(var t=0,r,n;B9e[e+(t||"")];)++t;return e+=t||"",B9e[e]=!0,r="@@"+e,O9e(lBt,r,q9e.gs(null,function(i){n||(n=!0,O9e(this,r,q9e(i)),n=!1)})),r}});var G9e=ye((E1r,V9e)=>{"use strict";var rm=f1(),Uh=Ck().Symbol;V9e.exports=function(e){return Object.defineProperties(e,{hasInstance:rm("",Uh&&Uh.hasInstance||e("hasInstance")),isConcatSpreadable:rm("",Uh&&Uh.isConcatSpreadable||e("isConcatSpreadable")),iterator:rm("",Uh&&Uh.iterator||e("iterator")),match:rm("",Uh&&Uh.match||e("match")),replace:rm("",Uh&&Uh.replace||e("replace")),search:rm("",Uh&&Uh.search||e("search")),species:rm("",Uh&&Uh.species||e("species")),split:rm("",Uh&&Uh.split||e("split")),toPrimitive:rm("",Uh&&Uh.toPrimitive||e("toPrimitive")),toStringTag:rm("",Uh&&Uh.toStringTag||e("toStringTag")),unscopables:rm("",Uh&&Uh.unscopables||e("unscopables"))})}});var W9e=ye((k1r,j9e)=>{"use strict";var H9e=f1(),uBt=DY(),Lk=Object.create(null);j9e.exports=function(e){return Object.defineProperties(e,{for:H9e(function(t){return Lk[t]?Lk[t]:Lk[t]=e(String(t))}),keyFor:H9e(function(t){var r;uBt(t);for(r in Lk)if(Lk[r]===t)return r})})}});var Y9e=ye((C1r,Z9e)=>{"use strict";var ry=f1(),FY=DY(),_z=Ck().Symbol,cBt=U9e(),fBt=G9e(),hBt=W9e(),dBt=Object.create,zY=Object.defineProperties,xz=Object.defineProperty,Xv,g5,X9e;if(typeof _z=="function")try{String(_z()),X9e=!0}catch(e){}else _z=null;g5=function(t){if(this instanceof g5)throw new TypeError("Symbol is not a constructor");return Xv(t)};Z9e.exports=Xv=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return X9e?_z(t):(r=dBt(g5.prototype),t=t===void 0?"":String(t),zY(r,{__description__:ry("",t),__name__:ry("",cBt(t))}))};fBt(Xv);hBt(Xv);zY(g5.prototype,{constructor:ry(Xv),toString:ry("",function(){return this.__name__})});zY(Xv.prototype,{toString:ry(function(){return"Symbol ("+FY(this).__description__+")"}),valueOf:ry(function(){return FY(this)})});xz(Xv.prototype,Xv.toPrimitive,ry("",function(){var e=FY(this);return typeof e=="symbol"?e:e.toString()}));xz(Xv.prototype,Xv.toStringTag,ry("c","Symbol"));xz(g5.prototype,Xv.toStringTag,ry("c",Xv.prototype[Xv.toStringTag]));xz(g5.prototype,Xv.toPrimitive,ry("c",Xv.prototype[Xv.toPrimitive]))});var _x=ye((L1r,K9e)=>{"use strict";K9e.exports=R9e()()?Ck().Symbol:Y9e()});var $9e=ye((P1r,J9e)=>{"use strict";var vBt=c1();J9e.exports=function(){return vBt(this).length=0,this}});var m5=ye((I1r,Q9e)=>{"use strict";Q9e.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var tqe=ye((R1r,eqe)=>{"use strict";var pBt=fw(),gBt=gz(),mBt=Object.prototype.toString;eqe.exports=function(e){if(!pBt(e))return null;if(gBt(e)){var t=e.toString;if(typeof t!="function"||t===mBt)return null}try{return""+e}catch(r){return null}}});var iqe=ye((D1r,rqe)=>{"use strict";rqe.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var aqe=ye((F1r,nqe)=>{"use strict";var yBt=iqe(),_Bt=/[\n\r\u2028\u2029]/g;nqe.exports=function(e){var t=yBt(e);return t===null?"":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(_Bt,function(r){switch(r){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),t)}});var qY=ye((z1r,lqe)=>{"use strict";var oqe=fw(),xBt=gz(),bBt=tqe(),wBt=aqe(),sqe=function(e,t){return e.replace("%v",wBt(t))};lqe.exports=function(e,t,r){if(!xBt(r))throw new TypeError(sqe(t,e));if(!oqe(e)){if("default"in r)return r.default;if(r.isOptional)return null}var n=bBt(r.errorMessage);throw oqe(n)||(n=t),new TypeError(sqe(n,e))}});var cqe=ye((q1r,uqe)=>{"use strict";var TBt=qY(),ABt=fw();uqe.exports=function(e){return ABt(e)?e:TBt(e,"Cannot use %v",arguments[1])}});var hqe=ye((O1r,fqe)=>{"use strict";var SBt=qY(),MBt=CY();fqe.exports=function(e){return MBt(e)?e:SBt(e,"%v is not a plain function",arguments[1])}});var vqe=ye((B1r,dqe)=>{"use strict";dqe.exports=function(){var e=Array.from,t,r;return typeof e!="function"?!1:(t=["raz","dwa"],r=e(t),!!(r&&r!==t&&r[1]==="dwa"))}});var gqe=ye((N1r,pqe)=>{"use strict";var EBt=Object.prototype.toString,kBt=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);pqe.exports=function(e){return typeof e=="function"&&kBt(EBt.call(e))}});var yqe=ye((U1r,mqe)=>{"use strict";mqe.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var xqe=ye((V1r,_qe)=>{"use strict";_qe.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var wqe=ye((G1r,bqe)=>{"use strict";bqe.exports=yqe()()?Math.sign:xqe()});var Aqe=ye((H1r,Tqe)=>{"use strict";var CBt=wqe(),LBt=Math.abs,PBt=Math.floor;Tqe.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:CBt(e)*PBt(LBt(e)))}});var Mqe=ye((j1r,Sqe)=>{"use strict";var IBt=Aqe(),RBt=Math.max;Sqe.exports=function(e){return RBt(0,IBt(e))}});var Lqe=ye((W1r,Cqe)=>{"use strict";var DBt=_x().iterator,FBt=Ek(),zBt=gqe(),qBt=Mqe(),Eqe=m5(),OBt=c1(),BBt=yx(),NBt=kk(),kqe=Array.isArray,OY=Function.prototype.call,hw={configurable:!0,enumerable:!0,writable:!0,value:null},BY=Object.defineProperty;Cqe.exports=function(e){var t=arguments[1],r=arguments[2],n,i,a,o,s,l,u,c,f,h;if(e=Object(OBt(e)),BBt(t)&&Eqe(t),!this||this===Array||!zBt(this)){if(!t){if(FBt(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(kqe(e)){for(o=new Array(s=e.length),i=0;i=55296&&l<=56319&&(h+=e[++i])),h=t?OY.call(t,r,h,a):h,n?(hw.value=h,BY(o,a,hw)):o[a]=h,++a;s=a}}if(s===void 0)for(s=qBt(e.length),n&&(o=new n(s)),i=0;i{"use strict";Pqe.exports=vqe()()?Array.from:Lqe()});var Dqe=ye((Z1r,Rqe)=>{"use strict";var UBt=Iqe(),VBt=mz(),GBt=c1();Rqe.exports=function(e){var t=Object(GBt(e)),r=arguments[1],n=Object(arguments[2]);if(t!==e&&!r)return t;var i={};return r?UBt(r,function(a){(n.ensure||a in e)&&(i[a]=e[a])}):VBt(i,e),i}});var qqe=ye((Y1r,zqe)=>{"use strict";var HBt=m5(),jBt=c1(),WBt=Function.prototype.bind,Fqe=Function.prototype.call,XBt=Object.keys,ZBt=Object.prototype.propertyIsEnumerable;zqe.exports=function(e,t){return function(r,n){var i,a=arguments[2],o=arguments[3];return r=Object(jBt(r)),HBt(n),i=XBt(r),o&&i.sort(typeof o=="function"?WBt.call(o,r):void 0),typeof e!="function"&&(e=i[e]),Fqe.call(e,i,function(s,l){return ZBt.call(r,s)?Fqe.call(n,a,r[s],s,r,l):t})}}});var Bqe=ye((K1r,Oqe)=>{"use strict";Oqe.exports=qqe()("forEach")});var Uqe=ye((J1r,Nqe)=>{"use strict";var YBt=m5(),KBt=Bqe(),JBt=Function.prototype.call;Nqe.exports=function(e,t){var r={},n=arguments[2];return YBt(t),KBt(e,function(i,a,o,s){r[a]=JBt.call(t,n,i,a,o,s)}),r}});var jqe=ye(($1r,Hqe)=>{"use strict";var $Bt=fw(),QBt=cqe(),Vqe=hqe(),eNt=Dqe(),tNt=LY(),rNt=Uqe(),iNt=Function.prototype.bind,nNt=Object.defineProperty,aNt=Object.prototype.hasOwnProperty,Gqe;Gqe=function(e,t,r){var n=QBt(t)&&Vqe(t.value),i;return i=eNt(t),delete i.writable,delete i.value,i.get=function(){return!r.overwriteDefinition&&aNt.call(this,e)?n:(t.value=iNt.call(n,r.resolveContext?r.resolveContext(this):this),nNt(this,e,t),this[e])},i};Hqe.exports=function(e){var t=tNt(arguments[1]);return $Bt(t.resolveContext)&&Vqe(t.resolveContext),rNt(e,function(r,n){return Gqe(n,r,t)})}});var NY=ye((Q1r,Yqe)=>{"use strict";var oNt=$9e(),sNt=mz(),lNt=m5(),uNt=c1(),Op=f1(),cNt=jqe(),Wqe=_x(),Xqe=Object.defineProperty,Zqe=Object.defineProperties,Pk;Yqe.exports=Pk=function(e,t){if(!(this instanceof Pk))throw new TypeError("Constructor requires 'new'");Zqe(this,{__list__:Op("w",uNt(e)),__context__:Op("w",t),__nextIndex__:Op("w",0)}),t&&(lNt(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))};delete Pk.prototype.constructor;Zqe(Pk.prototype,sNt({_next:Op(function(){var e;if(this.__list__){if(this.__redo__&&(e=this.__redo__.shift(),e!==void 0))return e;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){Xqe(this,"__redo__",Op("c",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:Op(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(r,n){r>e&&(this.__redo__[n]=--r)},this)))}),_onClear:Op(function(){this.__redo__&&oNt.call(this.__redo__),this.__nextIndex__=0})})));Xqe(Pk.prototype,Wqe.iterator,Op(function(){return this}))});var eOe=ye((e_r,Qqe)=>{"use strict";var Kqe=pz(),Jqe=IY(),UY=f1(),fNt=_x(),VY=NY(),$qe=Object.defineProperty,y5;y5=Qqe.exports=function(e,t){if(!(this instanceof y5))throw new TypeError("Constructor requires 'new'");VY.call(this,e),t?Jqe.call(t,"key+value")?t="key+value":Jqe.call(t,"key")?t="key":t="value":t="value",$qe(this,"__kind__",UY("",t))};Kqe&&Kqe(y5,VY);delete y5.prototype.constructor;y5.prototype=Object.create(VY.prototype,{_resolve:UY(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});$qe(y5.prototype,fNt.toStringTag,UY("c","Array Iterator"))});var nOe=ye((t_r,iOe)=>{"use strict";var tOe=pz(),bz=f1(),hNt=_x(),GY=NY(),rOe=Object.defineProperty,_5;_5=iOe.exports=function(e){if(!(this instanceof _5))throw new TypeError("Constructor requires 'new'");e=String(e),GY.call(this,e),rOe(this,"__length__",bz("",e.length))};tOe&&tOe(_5,GY);delete _5.prototype.constructor;_5.prototype=Object.create(GY.prototype,{_next:bz(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});rOe(_5.prototype,hNt.toStringTag,bz("c","String Iterator"))});var oOe=ye((r_r,aOe)=>{"use strict";var dNt=Ek(),vNt=yx(),pNt=kk(),gNt=_x().iterator,mNt=Array.isArray;aOe.exports=function(e){return vNt(e)?mNt(e)||pNt(e)||dNt(e)?!0:typeof e[gNt]=="function":!1}});var lOe=ye((i_r,sOe)=>{"use strict";var yNt=oOe();sOe.exports=function(e){if(!yNt(e))throw new TypeError(e+" is not iterable");return e}});var HY=ye((n_r,fOe)=>{"use strict";var _Nt=Ek(),xNt=kk(),uOe=eOe(),bNt=nOe(),wNt=lOe(),cOe=_x().iterator;fOe.exports=function(e){return typeof wNt(e)[cOe]=="function"?e[cOe]():_Nt(e)?new uOe(e):xNt(e)?new bNt(e):new uOe(e)}});var dOe=ye((a_r,hOe)=>{"use strict";var TNt=Ek(),ANt=m5(),SNt=kk(),MNt=HY(),ENt=Array.isArray,jY=Function.prototype.call,kNt=Array.prototype.some;hOe.exports=function(e,t){var r,n=arguments[2],i,a,o,s,l,u,c;if(ENt(e)||TNt(e)?r="array":SNt(e)?r="string":e=MNt(e),ANt(t),a=function(){o=!0},r==="array"){kNt.call(e,function(f){return jY.call(t,n,f,a),o});return}if(r==="string"){for(l=e.length,s=0;s=55296&&c<=56319&&(u+=e[++s])),jY.call(t,n,u,a),!o);++s);return}for(i=e.next();!i.done;){if(jY.call(t,n,i.value,a),o)return;i=e.next()}}});var pOe=ye((o_r,vOe)=>{"use strict";vOe.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()});var yOe=ye((s_r,mOe)=>{"use strict";var CNt=yx(),Tz=pz(),wz=j7e(),LNt=c1(),PNt=X7e(),h1=f1(),INt=HY(),RNt=dOe(),DNt=_x().toStringTag,gOe=pOe(),FNt=Array.isArray,XY=Object.defineProperty,WY=Object.prototype.hasOwnProperty,zNt=Object.getPrototypeOf,xx;mOe.exports=xx=function(){var e=arguments[0],t;if(!(this instanceof xx))throw new TypeError("Constructor requires 'new'");return t=gOe&&Tz&&WeakMap!==xx?Tz(new WeakMap,zNt(this)):this,CNt(e)&&(FNt(e)||(e=INt(e))),XY(t,"__weakMapData__",h1("c","$weakMap$"+PNt())),e&&RNt(e,function(r){LNt(r),t.set(r[0],r[1])}),t};gOe&&(Tz&&Tz(xx,WeakMap),xx.prototype=Object.create(WeakMap.prototype,{constructor:h1(xx)}));Object.defineProperties(xx.prototype,{delete:h1(function(e){return WY.call(wz(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:h1(function(e){if(WY.call(wz(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:h1(function(e){return WY.call(wz(e),this.__weakMapData__)}),set:h1(function(e,t){return XY(wz(e),this.__weakMapData__,h1("c",t)),this}),toString:h1(function(){return"[object WeakMap]"})});XY(xx.prototype,DNt,h1("c","WeakMap"))});var ZY=ye((l_r,_Oe)=>{"use strict";_Oe.exports=I7e()()?WeakMap:yOe()});var bOe=ye((u_r,xOe)=>{"use strict";xOe.exports=function(e,t,r){if(typeof Array.prototype.findIndex=="function")return e.findIndex(t,r);if(typeof t!="function")throw new TypeError("predicate must be a function");var n=Object(e),i=n.length;if(i===0)return-1;for(var a=0;a{"use strict";var Az=sx(),qNt=nw(),KY=Nh(),ONt=ty(),BNt=aw(),wOe=k7e(),NNt=L7e(),{float32:UNt,fract32:YY}=oz(),VNt=ZY(),TOe=l5(),GNt=bOe(),HNt=` +precision highp float; + +attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract; +attribute vec4 color; +attribute float lineEnd, lineTop; + +uniform vec2 scale, scaleFract, translate, translateFract; +uniform float thickness, pixelRatio, id, depth; +uniform vec4 viewport; + +varying vec4 fragColor; +varying vec2 tangent; + +vec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) { + // the order is important + return position * scale + translate + + positionFract * scale + translateFract + + position * scaleFract + + positionFract * scaleFract; +} + +void main() { + float lineStart = 1. - lineEnd; + float lineOffset = lineTop * 2. - 1.; + + vec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract); + tangent = normalize(diff * scale * viewport.zw); + vec2 normal = vec2(-tangent.y, tangent.x); + + vec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart + + project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd + + + thickness * normal * .5 * lineOffset / viewport.zw; + + gl_Position = vec4(position * 2.0 - 1.0, depth, 1); + + fragColor = color / 255.; +} +`,jNt=` +precision highp float; + +uniform float dashLength, pixelRatio, thickness, opacity, id; +uniform sampler2D dashTexture; + +varying vec4 fragColor; +varying vec2 tangent; + +void main() { + float alpha = 1.; + + float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; + float dash = texture2D(dashTexture, vec2(t, .5)).r; + + gl_FragColor = fragColor; + gl_FragColor.a *= alpha * opacity * dash; +} +`,WNt=` +precision highp float; + +attribute vec2 position, positionFract; + +uniform vec4 color; +uniform vec2 scale, scaleFract, translate, translateFract; +uniform float pixelRatio, id; +uniform vec4 viewport; +uniform float opacity; + +varying vec4 fragColor; + +const float MAX_LINES = 256.; + +void main() { + float depth = (MAX_LINES - 4. - id) / (MAX_LINES); + + vec2 position = position * scale + translate + + positionFract * scale + translateFract + + position * scaleFract + + positionFract * scaleFract; + + gl_Position = vec4(position * 2.0 - 1.0, depth, 1); + + fragColor = color / 255.; + fragColor.a *= opacity; +} +`,XNt=` +precision highp float; +varying vec4 fragColor; + +void main() { + gl_FragColor = fragColor; +} +`,ZNt=` +precision highp float; + +attribute vec2 aCoord, bCoord, nextCoord, prevCoord; +attribute vec4 aColor, bColor; +attribute float lineEnd, lineTop; + +uniform vec2 scale, translate; +uniform float thickness, pixelRatio, id, depth; +uniform vec4 viewport; +uniform float miterLimit, miterMode; + +varying vec4 fragColor; +varying vec4 startCutoff, endCutoff; +varying vec2 tangent; +varying vec2 startCoord, endCoord; +varying float enableStartMiter, enableEndMiter; + +const float REVERSE_THRESHOLD = -.875; +const float MIN_DIFF = 1e-6; + +// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead +// TODO: precalculate dot products, normalize things beforehead etc. +// TODO: refactor to rectangular algorithm + +float distToLine(vec2 p, vec2 a, vec2 b) { + vec2 diff = b - a; + vec2 perp = normalize(vec2(-diff.y, diff.x)); + return dot(p - a, perp); +} + +bool isNaN( float val ){ + return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true; +} + +void main() { + vec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord; + + vec2 adjustedScale; + adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x; + adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y; + + vec2 scaleRatio = adjustedScale * viewport.zw; + vec2 normalWidth = thickness / scaleRatio; + + float lineStart = 1. - lineEnd; + float lineBot = 1. - lineTop; + + fragColor = (lineStart * aColor + lineEnd * bColor) / 255.; + + if (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return; + + if (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord); + if (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord); + + + vec2 prevDiff = aCoord - prevCoord; + vec2 currDiff = bCoord - aCoord; + vec2 nextDiff = nextCoord - bCoord; + + vec2 prevTangent = normalize(prevDiff * scaleRatio); + vec2 currTangent = normalize(currDiff * scaleRatio); + vec2 nextTangent = normalize(nextDiff * scaleRatio); + + vec2 prevNormal = vec2(-prevTangent.y, prevTangent.x); + vec2 currNormal = vec2(-currTangent.y, currTangent.x); + vec2 nextNormal = vec2(-nextTangent.y, nextTangent.x); + + vec2 startJoinDirection = normalize(prevTangent - currTangent); + vec2 endJoinDirection = normalize(currTangent - nextTangent); + + // collapsed/unidirectional segment cases + // FIXME: there should be more elegant solution + vec2 prevTanDiff = abs(prevTangent - currTangent); + vec2 nextTanDiff = abs(nextTangent - currTangent); + if (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) { + startJoinDirection = currNormal; + } + if (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) { + endJoinDirection = currNormal; + } + if (aCoord == bCoord) { + endJoinDirection = startJoinDirection; + currNormal = prevNormal; + currTangent = prevTangent; + } + + tangent = currTangent; + + //calculate join shifts relative to normals + float startJoinShift = dot(currNormal, startJoinDirection); + float endJoinShift = dot(currNormal, endJoinDirection); + + float startMiterRatio = abs(1. / startJoinShift); + float endMiterRatio = abs(1. / endJoinShift); + + vec2 startJoin = startJoinDirection * startMiterRatio; + vec2 endJoin = endJoinDirection * endMiterRatio; + + vec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin; + startTopJoin = sign(startJoinShift) * startJoin * .5; + startBotJoin = -startTopJoin; + + endTopJoin = sign(endJoinShift) * endJoin * .5; + endBotJoin = -endTopJoin; + + vec2 aTopCoord = aCoord + normalWidth * startTopJoin; + vec2 bTopCoord = bCoord + normalWidth * endTopJoin; + vec2 aBotCoord = aCoord + normalWidth * startBotJoin; + vec2 bBotCoord = bCoord + normalWidth * endBotJoin; + + //miter anti-clipping + float baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x))); + float abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x))); + + //prevent close to reverse direction switch + bool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal); + bool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal); + + if (prevReverse) { + //make join rectangular + vec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5; + float normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.); + aBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; + aTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; + } + else if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) { + //handle miter clipping + bTopCoord -= normalWidth * endTopJoin; + bTopCoord += normalize(endTopJoin * normalWidth) * baClipping; + } + + if (nextReverse) { + //make join rectangular + vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5; + float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.); + bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; + bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; + } + else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) { + //handle miter clipping + aBotCoord -= normalWidth * startBotJoin; + aBotCoord += normalize(startBotJoin * normalWidth) * abClipping; + } + + vec2 aTopPosition = (aTopCoord) * adjustedScale + translate; + vec2 aBotPosition = (aBotCoord) * adjustedScale + translate; + + vec2 bTopPosition = (bTopCoord) * adjustedScale + translate; + vec2 bBotPosition = (bBotCoord) * adjustedScale + translate; + + //position is normalized 0..1 coord on the screen + vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd; + + startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy; + endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy; + + gl_Position = vec4(position * 2.0 - 1.0, depth, 1); + + enableStartMiter = step(dot(currTangent, prevTangent), .5); + enableEndMiter = step(dot(currTangent, nextTangent), .5); + + //bevel miter cutoffs + if (miterMode == 1.) { + if (enableStartMiter == 1.) { + vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5; + startCutoff = vec4(aCoord, aCoord); + startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; + startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + startCutoff += viewport.xyxy; + startCutoff += startMiterWidth.xyxy; + } + + if (enableEndMiter == 1.) { + vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5; + endCutoff = vec4(bCoord, bCoord); + endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; + endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + endCutoff += viewport.xyxy; + endCutoff += endMiterWidth.xyxy; + } + } + + //round miter cutoffs + else if (miterMode == 2.) { + if (enableStartMiter == 1.) { + vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5; + startCutoff = vec4(aCoord, aCoord); + startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; + startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + startCutoff += viewport.xyxy; + startCutoff += startMiterWidth.xyxy; + } + + if (enableEndMiter == 1.) { + vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5; + endCutoff = vec4(bCoord, bCoord); + endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; + endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + endCutoff += viewport.xyxy; + endCutoff += endMiterWidth.xyxy; + } + } +} +`,YNt=` +precision highp float; + +uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; +uniform sampler2D dashTexture; + +varying vec4 fragColor; +varying vec2 tangent; +varying vec4 startCutoff, endCutoff; +varying vec2 startCoord, endCoord; +varying float enableStartMiter, enableEndMiter; + +float distToLine(vec2 p, vec2 a, vec2 b) { + vec2 diff = b - a; + vec2 perp = normalize(vec2(-diff.y, diff.x)); + return dot(p - a, perp); +} + +void main() { + float alpha = 1., distToStart, distToEnd; + float cutoff = thickness * .5; + + //bevel miter + if (miterMode == 1.) { + if (enableStartMiter == 1.) { + distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); + if (distToStart < -1.) { + discard; + return; + } + alpha *= min(max(distToStart + 1., 0.), 1.); + } + + if (enableEndMiter == 1.) { + distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); + if (distToEnd < -1.) { + discard; + return; + } + alpha *= min(max(distToEnd + 1., 0.), 1.); + } + } + + // round miter + else if (miterMode == 2.) { + if (enableStartMiter == 1.) { + distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); + if (distToStart < 0.) { + float radius = length(gl_FragCoord.xy - startCoord); + + if(radius > cutoff + .5) { + discard; + return; + } + + alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); + } + } + + if (enableEndMiter == 1.) { + distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); + if (distToEnd < 0.) { + float radius = length(gl_FragCoord.xy - endCoord); + + if(radius > cutoff + .5) { + discard; + return; + } + + alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); + } + } + } + + float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; + float dash = texture2D(dashTexture, vec2(t, .5)).r; + + gl_FragColor = fragColor; + gl_FragColor.a *= alpha * opacity * dash; +} +`;AOe.exports=Wc;function Wc(e,t){if(!(this instanceof Wc))return new Wc(e,t);if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=Wc.shaders.has(e)?Wc.shaders.get(e):Wc.shaders.set(e,Wc.createShaders(e)).get(e),this.update(t)}Wc.dashMult=2;Wc.maxPatternLength=256;Wc.precisionThreshold=3e6;Wc.maxPoints=1e4;Wc.maxLines=2048;Wc.shaders=new VNt;Wc.createShaders=function(e){let t=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),r={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(o,s)=>s.join==="round"?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(o,s)=>!s.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},n=e(KY({vert:HNt,frag:jNt,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r)),i;try{i=e(KY({cull:{enable:!0,face:"back"},vert:ZNt,frag:YNt,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch(o){i=n}return{fill:e({primitive:"triangle",elements:(o,s)=>s.triangles,offset:0,vert:WNt,frag:XNt,uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:n,miter:i}};Wc.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null};Wc.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};Wc.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((t,r)=>{if(t&&Array.isArray(t))return this.draw(...t);typeof t=="number"&&(t=this.passes[t]),t&&t.count>1&&t.opacity&&(this.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&this.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>Wc.precisionThreshold||t.scale[1]*t.viewport.height>Wc.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=Wc.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};Wc.prototype.update=function(e){if(!e)return;e.length!=null?typeof e[0]=="number"&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:r}=this;if(e.forEach((i,a)=>{let o=this.passes[a];if(i!==void 0){if(i===null){this.passes[a]=null;return}if(typeof i[0]=="number"&&(i={positions:i}),i=ONt(i,{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"}),o||(this.passes[a]=o={id:a,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},i=KY({},Wc.defaults,i)),i.thickness!=null&&(o.thickness=parseFloat(i.thickness)),i.opacity!=null&&(o.opacity=parseFloat(i.opacity)),i.miterLimit!=null&&(o.miterLimit=parseFloat(i.miterLimit)),i.overlay!=null&&(o.overlay=!!i.overlay,aL-x),k=[],M=0,T=o.hole!=null?o.hole[0]:null;if(T!=null){let L=GNt(p,x=>x>=T);p=p.slice(0,L),p.push(T)}for(let L=0;Lg-T+(p[L]-M)),S=wOe(x,C);S=S.map(g=>g+M+(g+M{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var COe=ye((f_r,kOe)=>{"use strict";var KNt=nw(),JNt=sx(),$Nt=yY(),QNt=ty(),SOe=Nh(),MOe=aw(),{float32:eUt,fract32:$Y}=oz();kOe.exports=tUt;var EOe=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function tUt(e,t){if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let r=e._gl,n,i,a,o,s,l,u={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},c=[];return o=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),i=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),a=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),s=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=e.buffer({usage:"static",type:"float",data:EOe}),v(t),n=e({vert:` + precision highp float; + + attribute vec2 position, positionFract; + attribute vec4 error; + attribute vec4 color; + + attribute vec2 direction, lineOffset, capOffset; + + uniform vec4 viewport; + uniform float lineWidth, capSize; + uniform vec2 scale, scaleFract, translate, translateFract; + + varying vec4 fragColor; + + void main() { + fragColor = color / 255.; + + vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset; + + vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw; + + vec2 position = position + dxy; + + vec2 pos = (position + translate) * scale + + (positionFract + translateFract) * scale + + (position + translate) * scaleFract + + (positionFract + translateFract) * scaleFract; + + pos += pixelOffset / viewport.zw; + + gl_Position = vec4(pos * 2. - 1., 0, 1); + } + `,frag:` + precision highp float; + + varying vec4 fragColor; + + uniform float opacity; + + void main() { + gl_FragColor = fragColor; + gl_FragColor.a *= opacity; + } + `,uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:(b,p)=>[p.viewport.x,p.viewport.y,b.viewportWidth,b.viewportHeight]},attributes:{color:{buffer:o,offset:(b,p)=>p.offset*4,divisor:1},position:{buffer:i,offset:(b,p)=>p.offset*8,divisor:1},positionFract:{buffer:a,offset:(b,p)=>p.offset*8,divisor:1},error:{buffer:s,offset:(b,p)=>p.offset*16,divisor:1},direction:{buffer:l,stride:24,offset:0},lineOffset:{buffer:l,stride:24,offset:8},capOffset:{buffer:l,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:EOe.length}),SOe(f,{update:v,draw:h,destroy:m,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(b){b?v(b):b===null&&m(),h()}function h(b){if(typeof b=="number")return d(b);b&&!Array.isArray(b)&&(b=[b]),e._refresh(),c.forEach((p,k)=>{if(p){if(b&&(b[k]?p.draw=!0:p.draw=!1),!p.draw){p.draw=!0;return}d(k)}})}function d(b){typeof b=="number"&&(b=c[b]),b!=null&&b&&b.count&&b.color&&b.opacity&&b.positions&&b.positions.length>1&&(b.scaleRatio=[b.scale[0]*b.viewport.width,b.scale[1]*b.viewport.height],n(b),b.after&&b.after(b))}function v(b){if(!b)return;b.length!=null?typeof b[0]=="number"&&(b=[{positions:b}]):Array.isArray(b)||(b=[b]);let p=0,k=0;if(f.groups=c=b.map((L,x)=>{let C=c[x];if(L)typeof L=="function"?L={after:L}:typeof L[0]=="number"&&(L={positions:L});else return C;return L=QNt(L,{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"}),C||(c[x]=C={id:x,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},L=SOe({},u,L)),$Nt(C,L,[{lineWidth:S=>+S*.5,capSize:S=>+S*.5,opacity:parseFloat,errors:S=>(S=MOe(S),k+=S.length,S),positions:(S,g)=>(S=MOe(S,"float64"),g.count=Math.floor(S.length/2),g.bounds=KNt(S,2),g.offset=p,p+=g.count,S)},{color:(S,g)=>{let P=g.count;if(S||(S="transparent"),!Array.isArray(S)||typeof S[0]=="number"){let z=S;S=Array(P);for(let q=0;q{let E=g.bounds;return S||(S=E),g.scale=[1/(S[2]-S[0]),1/(S[3]-S[1])],g.translate=[-S[0],-S[1]],g.scaleFract=$Y(g.scale),g.translateFract=$Y(g.translate),S},viewport:S=>{let g;return Array.isArray(S)?g={x:S[0],y:S[1],width:S[2]-S[0],height:S[3]-S[1]}:S?(g={x:S.x||S.left||0,y:S.y||S.top||0},S.right?g.width=S.right-g.x:g.width=S.w||S.width||0,S.bottom?g.height=S.bottom-g.y:g.height=S.h||S.height||0):g={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},g}}]),C}),p||k){let L=c.reduce((g,P,E)=>g+(P?P.count:0),0),x=new Float64Array(L*2),C=new Uint8Array(L*4),S=new Float32Array(L*4);c.forEach((g,P)=>{if(!g)return;let{positions:E,count:z,offset:q,color:V,errors:G}=g;z&&(C.set(V,q*4),S.set(G,q*4),x.set(E,q*2))});var M=eUt(x);i(M);var T=$Y(x,M);a(T),o(C),s(S)}}function m(){i.destroy(),a.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var IOe=ye((h_r,POe)=>{var LOe=/[\'\"]/;POe.exports=function(t){return t?(LOe.test(t.charAt(0))&&(t=t.substr(1)),LOe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var QY=ye((d_r,rUt)=>{rUt.exports=["inherit","initial","unset"]});var eK=ye((v_r,iUt)=>{iUt.exports=["caption","icon","menu","message-box","small-caption","status-bar"]});var tK=ye((p_r,nUt)=>{nUt.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]});var rK=ye((g_r,aUt)=>{aUt.exports=["normal","italic","oblique"]});var iK=ye((m_r,oUt)=>{oUt.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]});var zOe=ye((y_r,FOe)=>{"use strict";function ROe(e,t){if(typeof e!="string")return[e];var r=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],i=t.escape||"___",a=!!t.flat;n.forEach(function(l){var u=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),c=[];function f(h,d,v){var m=r.push(h.slice(l[0].length,-l[1].length))-1;return c.push(m),i+m+i}r.forEach(function(h,d){for(var v,m=0;h!=v;)if(v=h,h=h.replace(u,f),m++>1e4)throw Error("References have circular dependency. Please, check them.");r[d]=h}),c=c.reverse(),r=r.map(function(h){return c.forEach(function(d){h=h.replace(new RegExp("(\\"+i+d+"\\"+i+")","g"),l[0]+"$1"+l[1])}),h})});var o=new RegExp("\\"+i+"([0-9]+)\\"+i);function s(l,u,c){for(var f=[],h,d=0;h=o.exec(l);){if(d++>1e4)throw Error("Circular references in parenthesis");f.push(l.slice(0,h.index)),f.push(s(u[h[1]],u)),l=l.slice(h.index+h[0].length)}return f.push(l),f}return a?r:s(r[0],r)}function DOe(e,t){if(t&&t.flat){var r=t&&t.escape||"___",n=e[0],i;if(!n)return"";for(var a=new RegExp("\\"+r+"([0-9]+)\\"+r),o=0;n!=i;){if(o++>1e4)throw Error("Circular references in "+e);i=n,n=n.replace(a,s)}return n}return e.reduce(function l(u,c){return Array.isArray(c)&&(c=c.reduce(l,"")),u+c},"");function s(l,u){if(e[u]==null)throw Error("Reference "+u+"is undefined");return e[u]}}function nK(e,t){return Array.isArray(e)?DOe(e,t):ROe(e,t)}nK.parse=ROe;nK.stringify=DOe;FOe.exports=nK});var BOe=ye((__r,OOe)=>{"use strict";var qOe=zOe();OOe.exports=function(t,r,n){if(t==null)throw Error("First argument should be a string");if(r==null)throw Error("Separator should be a string or a RegExp");n?(typeof n=="string"||Array.isArray(n))&&(n={ignore:n}):n={},n.escape==null&&(n.escape=!0),n.ignore==null?n.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof n.ignore=="string"&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map(function(f){return f.length===1&&(f=f+f),f}));var i=qOe.parse(t,{flat:!0,brackets:n.ignore}),a=i[0],o=a.split(r);if(n.escape){for(var s=[],l=0;l{sUt.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]});var aK=ye((b_r,UOe)=>{"use strict";var lUt=NOe();UOe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||lUt.indexOf(t)!==-1}}});var jOe=ye((w_r,HOe)=>{"use strict";var uUt=IOe(),cUt=QY(),fUt=eK(),hUt=tK(),dUt=rK(),vUt=iK(),oK=BOe(),pUt=aK().isSize;HOe.exports=GOe;var Ik=GOe.cache={};function GOe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(Ik[e])return Ik[e];if(e==="")throw new Error("Cannot parse an empty string.");if(fUt.indexOf(e)!==-1)return Ik[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=oK(e,/\s+/),n;n=r.shift();){if(cUt.indexOf(n)!==-1)return["style","variant","weight","stretch"].forEach(function(a){t[a]=n}),Ik[e]=t;if(dUt.indexOf(n)!==-1){t.style=n;continue}if(n==="normal"||n==="small-caps"){t.variant=n;continue}if(vUt.indexOf(n)!==-1){t.stretch=n;continue}if(hUt.indexOf(n)!==-1){t.weight=n;continue}if(pUt(n)){var i=oK(n,"/");if(t.size=i[0],i[1]!=null?t.lineHeight=VOe(i[1]):r[0]==="/"&&(r.shift(),t.lineHeight=VOe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=oK(r.join(" "),/\s*,\s*/).map(uUt),Ik[e]=t}throw new Error("Unknown or unsupported font token: "+n)}throw new Error("Missing required font-size.")}function VOe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var lK=ye((T_r,WOe)=>{"use strict";var gUt=ty(),mUt=aK().isSize,yUt=Dk(QY()),_Ut=Dk(eK()),xUt=Dk(tK()),bUt=Dk(rK()),wUt=Dk(iK()),TUt={normal:1,"small-caps":1},AUt={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},sK={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};WOe.exports=function(t){if(t=gUt(t,{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"}),t.system)return t.system&&Rk(t.system,_Ut),t.system;if(Rk(t.style,bUt),Rk(t.variant,TUt),Rk(t.weight,xUt),Rk(t.stretch,wUt),t.size==null&&(t.size=sK.size),typeof t.size=="number"&&(t.size+="px"),!mUt)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=sK.family),Array.isArray(t.family)&&(t.family.length||(t.family=[sK.family]),t.family=t.family.map(function(n){return AUt[n]?n:'"'+n+'"'}).join(", "));var r=[];return r.push(t.style),t.variant!==t.style&&r.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&r.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&r.push(t.stretch),r.push(t.size+(t.lineHeight==null||t.lineHeight==="normal"||t.lineHeight+""=="1"?"":"/"+t.lineHeight)),r.push(t.family),r.filter(Boolean).join(" ")};function Rk(e,t){if(e&&!t[e]&&!yUt[e])throw Error("Unknown keyword `"+e+"`");return e}function Dk(e){for(var t={},r=0;r{"use strict";XOe.exports={parse:jOe(),stringify:lK()}});var YOe=ye((uK,cK)=>{(function(e,t){typeof uK=="object"&&typeof cK!="undefined"?cK.exports=t():e.createREGL=t()})(uK,function(){"use strict";var e=function(Me,bt){for(var Ot=Object.keys(bt),Lr=0;Lr1&&bt===Ot&&(bt==='"'||bt==="'"))return['"'+o(Me.substr(1,Me.length-2))+'"'];var Lr=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Me);if(Lr)return s(Me.substr(0,Lr.index)).concat(s(Lr[1])).concat(s(Me.substr(Lr.index+Lr[0].length)));var Vr=Me.split(".");if(Vr.length===1)return['"'+o(Me)+'"'];for(var Or=[],Nr=0;Nr65535)<<4,Me>>>=bt,Ot=(Me>255)<<3,Me>>>=Ot,bt|=Ot,Ot=(Me>15)<<2,Me>>>=Ot,bt|=Ot,Ot=(Me>3)<<1,Me>>>=Ot,bt|=Ot,bt|Me>>1}function N(){var Me=S(8,function(){return[]});function bt(Or){var Nr=Z(Or),vi=Me[j(Nr)>>2];return vi.length>0?vi.pop():new ArrayBuffer(Nr)}function Ot(Or){Me[j(Or.byteLength)>>2].push(Or)}function Lr(Or,Nr){var vi=null;switch(Or){case g:vi=new Int8Array(bt(Nr),0,Nr);break;case P:vi=new Uint8Array(bt(Nr),0,Nr);break;case E:vi=new Int16Array(bt(2*Nr),0,Nr);break;case z:vi=new Uint16Array(bt(2*Nr),0,Nr);break;case q:vi=new Int32Array(bt(4*Nr),0,Nr);break;case V:vi=new Uint32Array(bt(4*Nr),0,Nr);break;case G:vi=new Float32Array(bt(4*Nr),0,Nr);break;default:return null}return vi.length!==Nr?vi.subarray(0,Nr):vi}function Vr(Or){Ot(Or.buffer)}return{alloc:bt,free:Ot,allocType:Lr,freeType:Vr}}var H=N();H.zero=N();var ie=3408,ae=3410,_e=3411,Ee=3412,Ce=3413,ge=3414,re=3415,Se=33901,ke=33902,be=3379,Be=3386,Le=34921,me=36347,Pe=36348,ce=35661,He=35660,lt=34930,mt=36349,Ht=34076,at=34024,ct=7936,ar=7937,Vt=7938,rr=35724,tt=34047,je=36063,Ue=34852,Ae=3553,rt=34067,St=34069,Tt=33984,dt=6408,Et=5126,pt=5121,jt=36160,or=36053,mr=36064,Ar=16384,ei=function(Me,bt){var Ot=1;bt.ext_texture_filter_anisotropic&&(Ot=Me.getParameter(tt));var Lr=1,Vr=1;bt.webgl_draw_buffers&&(Lr=Me.getParameter(Ue),Vr=Me.getParameter(je));var Or=!!bt.oes_texture_float;if(Or){var Nr=Me.createTexture();Me.bindTexture(Ae,Nr),Me.texImage2D(Ae,0,dt,1,1,0,dt,Et,null);var vi=Me.createFramebuffer();if(Me.bindFramebuffer(jt,vi),Me.framebufferTexture2D(jt,mr,Ae,Nr,0),Me.bindTexture(Ae,null),Me.checkFramebufferStatus(jt)!==or)Or=!1;else{Me.viewport(0,0,1,1),Me.clearColor(1,0,0,1),Me.clear(Ar);var Ni=H.allocType(Et,4);Me.readPixels(0,0,1,1,dt,Et,Ni),Me.getError()?Or=!1:(Me.deleteFramebuffer(vi),Me.deleteTexture(Nr),Or=Ni[0]===1),H.freeType(Ni)}}var qi=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Si=!0;if(!qi){var Vn=Me.createTexture(),Qi=H.allocType(pt,36);Me.activeTexture(Tt),Me.bindTexture(rt,Vn),Me.texImage2D(St,0,dt,3,3,0,dt,pt,Qi),H.freeType(Qi),Me.bindTexture(rt,null),Me.deleteTexture(Vn),Si=!Me.getError()}return{colorBits:[Me.getParameter(ae),Me.getParameter(_e),Me.getParameter(Ee),Me.getParameter(Ce)],depthBits:Me.getParameter(ge),stencilBits:Me.getParameter(re),subpixelBits:Me.getParameter(ie),extensions:Object.keys(bt).filter(function(ji){return!!bt[ji]}),maxAnisotropic:Ot,maxDrawbuffers:Lr,maxColorAttachments:Vr,pointSizeDims:Me.getParameter(Se),lineWidthDims:Me.getParameter(ke),maxViewportDims:Me.getParameter(Be),maxCombinedTextureUnits:Me.getParameter(ce),maxCubeMapSize:Me.getParameter(Ht),maxRenderbufferSize:Me.getParameter(at),maxTextureUnits:Me.getParameter(lt),maxTextureSize:Me.getParameter(be),maxAttributes:Me.getParameter(Le),maxVertexUniforms:Me.getParameter(me),maxVertexTextureUnits:Me.getParameter(He),maxVaryingVectors:Me.getParameter(Pe),maxFragmentUniforms:Me.getParameter(mt),glsl:Me.getParameter(rr),renderer:Me.getParameter(ar),vendor:Me.getParameter(ct),version:Me.getParameter(Vt),readFloat:Or,npotTextureCube:Si}},qr=function(Me){return Me instanceof Uint8Array||Me instanceof Uint16Array||Me instanceof Uint32Array||Me instanceof Int8Array||Me instanceof Int16Array||Me instanceof Int32Array||Me instanceof Float32Array||Me instanceof Float64Array||Me instanceof Uint8ClampedArray};function jr(Me){return!!Me&&typeof Me=="object"&&Array.isArray(Me.shape)&&Array.isArray(Me.stride)&&typeof Me.offset=="number"&&Me.shape.length===Me.stride.length&&(Array.isArray(Me.data)||qr(Me.data))}var gt=function(Me){return Object.keys(Me).map(function(bt){return Me[bt]})},Ge={shape:Kt,flatten:At};function Je(Me,bt,Ot){for(var Lr=0;Lr0){var qn;if(Array.isArray(Zr[0])){Xi=Vi(Zr);for(var fi=1,si=1;si0){if(typeof fi[0]=="number"){var Ui=H.allocType(ui.dtype,fi.length);wr(Ui,fi),Xi(Ui,mn),H.freeType(Ui)}else if(Array.isArray(fi[0])||qr(fi[0])){Ji=Vi(fi);var Bi=Qn(fi,Ji,ui.dtype);Xi(Bi,mn),H.freeType(Bi)}}}else if(jr(fi)){Ji=fi.shape;var pn=fi.stride,Nn=0,aa=0,Ki=0,Cn=0;Ji.length===1?(Nn=Ji[0],aa=1,Ki=pn[0],Cn=0):Ji.length===2&&(Nn=Ji[0],aa=Ji[1],Ki=pn[0],Cn=pn[1]);var ia=Array.isArray(fi.data)?ui.dtype:ir(fi.data),sa=H.allocType(ia,Nn*aa);Xr(sa,fi.data,Nn,aa,Ki,Cn,fi.offset),Xi(sa,mn),H.freeType(sa)}return nn}return yi||nn(Tr),nn._reglType="buffer",nn._buffer=ui,nn.subdata=qn,Ot.profile&&(nn.stats=ui.stats),nn.destroy=function(){Qi(ui)},nn}function oi(){gt(Or).forEach(function(Tr){Tr.buffer=Me.createBuffer(),Me.bindBuffer(Tr.type,Tr.buffer),Me.bufferData(Tr.type,Tr.persistentData||Tr.byteLength,Tr.usage)})}return Ot.profile&&(bt.getTotalBufferSize=function(){var Tr=0;return Object.keys(Or).forEach(function(Zr){Tr+=Or[Zr].stats.size}),Tr}),{create:ji,createStream:Ni,destroyStream:qi,clear:function(){gt(Or).forEach(Qi),vi.forEach(Qi)},getBuffer:function(Tr){return Tr&&Tr._buffer instanceof Nr?Tr._buffer:null},restore:oi,_initBuffer:Vn}}var $r=0,Ri=0,Zi=1,en=1,fn=4,yn=4,Mn={points:$r,point:Ri,lines:Zi,line:en,triangles:fn,triangle:yn,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ba=0,ua=1,ma=4,Wa=5120,Fa=5121,Xo=5122,da=5123,jn=5124,Ha=5125,vo=34963,Gn=35040,Ct=35044;function Sr(Me,bt,Ot,Lr){var Vr={},Or=0,Nr={uint8:Fa,uint16:da};bt.oes_element_index_uint&&(Nr.uint32=Ha);function vi(oi){this.id=Or++,Vr[this.id]=this,this.buffer=oi,this.primType=ma,this.vertCount=0,this.type=0}vi.prototype.bind=function(){this.buffer.bind()};var Ni=[];function qi(oi){var Tr=Ni.pop();return Tr||(Tr=new vi(Ot.create(null,vo,!0,!1)._buffer)),Vn(Tr,oi,Gn,-1,-1,0,0),Tr}function Si(oi){Ni.push(oi)}function Vn(oi,Tr,Zr,yi,Ii,ui,nn){oi.buffer.bind();var Xi;if(Tr){var qn=nn;!nn&&(!qr(Tr)||jr(Tr)&&!qr(Tr.data))&&(qn=bt.oes_element_index_uint?Ha:da),Ot._initBuffer(oi.buffer,Tr,Zr,qn,3)}else Me.bufferData(vo,ui,Zr),oi.buffer.dtype=Xi||Fa,oi.buffer.usage=Zr,oi.buffer.dimension=3,oi.buffer.byteLength=ui;if(Xi=nn,!nn){switch(oi.buffer.dtype){case Fa:case Wa:Xi=Fa;break;case da:case Xo:Xi=da;break;case Ha:case jn:Xi=Ha;break;default:}oi.buffer.dtype=Xi}oi.type=Xi;var fi=Ii;fi<0&&(fi=oi.buffer.byteLength,Xi===da?fi>>=1:Xi===Ha&&(fi>>=2)),oi.vertCount=fi;var si=yi;if(yi<0){si=ma;var mn=oi.buffer.dimension;mn===1&&(si=Ba),mn===2&&(si=ua),mn===3&&(si=ma)}oi.primType=si}function Qi(oi){Lr.elementsCount--,delete Vr[oi.id],oi.buffer.destroy(),oi.buffer=null}function ji(oi,Tr){var Zr=Ot.create(null,vo,!0),yi=new vi(Zr._buffer);Lr.elementsCount++;function Ii(ui){if(!ui)Zr(),yi.primType=ma,yi.vertCount=0,yi.type=Fa;else if(typeof ui=="number")Zr(ui),yi.primType=ma,yi.vertCount=ui|0,yi.type=Fa;else{var nn=null,Xi=Ct,qn=-1,fi=-1,si=0,mn=0;Array.isArray(ui)||qr(ui)||jr(ui)?nn=ui:("data"in ui&&(nn=ui.data),"usage"in ui&&(Xi=Hn[ui.usage]),"primitive"in ui&&(qn=Mn[ui.primitive]),"count"in ui&&(fi=ui.count|0),"type"in ui&&(mn=Nr[ui.type]),"length"in ui?si=ui.length|0:(si=fi,mn===da||mn===Xo?si*=2:(mn===Ha||mn===jn)&&(si*=4))),Vn(yi,nn,Xi,qn,fi,si,mn)}return Ii}return Ii(oi),Ii._reglType="elements",Ii._elements=yi,Ii.subdata=function(ui,nn){return Zr.subdata(ui,nn),Ii},Ii.destroy=function(){Qi(yi)},Ii}return{create:ji,createStream:qi,destroyStream:Si,getElements:function(oi){return typeof oi=="function"&&oi._elements instanceof vi?oi._elements:null},clear:function(){gt(Vr).forEach(Qi)}}}var Jr=new Float32Array(1),hi=new Uint32Array(Jr.buffer),hn=5123;function Sn(Me){for(var bt=H.allocType(hn,Me.length),Ot=0;Ot>>31<<15,Or=(Lr<<1>>>24)-127,Nr=Lr>>13&1023;if(Or<-24)bt[Ot]=Vr;else if(Or<-14){var vi=-14-Or;bt[Ot]=Vr+(Nr+1024>>vi)}else Or>15?bt[Ot]=Vr+31744:bt[Ot]=Vr+(Or+15<<10)+Nr}return bt}function En(Me){return Array.isArray(Me)||qr(Me)}var ki=34467,_n=3553,ya=34067,ea=34069,Ma=6408,_o=6406,No=6407,po=6409,Lo=6410,ko=32854,Ds=32855,Fs=36194,ll=32819,ul=32820,zl=33635,us=34042,il=6402,As=34041,cl=35904,Ks=35906,zs=36193,Io=33776,ls=33777,Yl=33778,Su=33779,nc=35986,bs=35987,Rn=34798,_a=35840,Vu=35841,ql=35842,xo=35843,Kl=36196,Ns=5121,Hl=5123,ac=5125,oa=5126,qo=10242,Oo=10243,Ol=10497,Pc=33071,Do=33648,nf=10240,Vf=10241,pl=9728,Zc=9729,Jl=9984,qs=9985,yu=9986,oc=9987,Cf=33170,sc=4352,jh=4353,Lf=4354,cs=34046,af=3317,Gf=37440,$l=37441,fl=37443,lc=37444,Fu=33984,Es=[Jl,yu,qs,oc],Hs=[0,po,Lo,No,Ma],Go={};Go[po]=Go[_o]=Go[il]=1,Go[As]=Go[Lo]=2,Go[No]=Go[cl]=3,Go[Ma]=Go[Ks]=4;function ps(Me){return"[object "+Me+"]"}var uc=ps("HTMLCanvasElement"),xl=ps("OffscreenCanvas"),Gu=ps("CanvasRenderingContext2D"),Os=ps("ImageBitmap"),od=ps("HTMLImageElement"),Po=ps("HTMLVideoElement"),sd=Object.keys(Qt).concat([uc,xl,Gu,Os,od,Po]),Ko=[];Ko[Ns]=1,Ko[oa]=4,Ko[zs]=2,Ko[Hl]=2,Ko[ac]=4;var Pa=[];Pa[ko]=2,Pa[Ds]=2,Pa[Fs]=2,Pa[As]=4,Pa[Io]=.5,Pa[ls]=.5,Pa[Yl]=1,Pa[Su]=1,Pa[nc]=.5,Pa[bs]=1,Pa[Rn]=1,Pa[_a]=.5,Pa[Vu]=.25,Pa[ql]=.5,Pa[xo]=.25,Pa[Kl]=.5;function of(Me){return Array.isArray(Me)&&(Me.length===0||typeof Me[0]=="number")}function Hu(Me){if(!Array.isArray(Me))return!1;var bt=Me.length;return!(bt===0||!En(Me[0]))}function bl(Me){return Object.prototype.toString.call(Me)}function Hf(Me){return bl(Me)===uc}function Ic(Me){return bl(Me)===xl}function yf(Me){return bl(Me)===Gu}function Bl(Me){return bl(Me)===Os}function Ah(Me){return bl(Me)===od}function Qf(Me){return bl(Me)===Po}function _f(Me){if(!Me)return!1;var bt=bl(Me);return sd.indexOf(bt)>=0?!0:of(Me)||Hu(Me)||jr(Me)}function Yc(Me){return Qt[Object.prototype.toString.call(Me)]|0}function eh(Me,bt){var Ot=bt.length;switch(Me.type){case Ns:case Hl:case ac:case oa:var Lr=H.allocType(Me.type,Ot);Lr.set(bt),Me.data=Lr;break;case zs:Me.data=Sn(bt);break;default:}}function th(Me,bt){return H.allocType(Me.type===zs?oa:Me.type,bt)}function ju(Me,bt){Me.type===zs?(Me.data=Sn(bt),H.freeType(bt)):Me.data=bt}function jf(Me,bt,Ot,Lr,Vr,Or){for(var Nr=Me.width,vi=Me.height,Ni=Me.channels,qi=Nr*vi*Ni,Si=th(Me,qi),Vn=0,Qi=0;Qi=1;)vi+=Nr*Ni*Ni,Ni/=2;return vi}else return Nr*Ot*Lr}function sf(Me,bt,Ot,Lr,Vr,Or,Nr){var vi={"don't care":sc,"dont care":sc,nice:Lf,fast:jh},Ni={repeat:Ol,clamp:Pc,mirror:Do},qi={nearest:pl,linear:Zc},Si=e({mipmap:oc,"nearest mipmap nearest":Jl,"linear mipmap nearest":qs,"nearest mipmap linear":yu,"linear mipmap linear":oc},qi),Vn={none:0,browser:lc},Qi={uint8:Ns,rgba4:ll,rgb565:zl,"rgb5 a1":ul},ji={alpha:_o,luminance:po,"luminance alpha":Lo,rgb:No,rgba:Ma,rgba4:ko,"rgb5 a1":Ds,rgb565:Fs},oi={};bt.ext_srgb&&(ji.srgb=cl,ji.srgba=Ks),bt.oes_texture_float&&(Qi.float32=Qi.float=oa),bt.oes_texture_half_float&&(Qi.float16=Qi["half float"]=zs),bt.webgl_depth_texture&&(e(ji,{depth:il,"depth stencil":As}),e(Qi,{uint16:Hl,uint32:ac,"depth stencil":us})),bt.webgl_compressed_texture_s3tc&&e(oi,{"rgb s3tc dxt1":Io,"rgba s3tc dxt1":ls,"rgba s3tc dxt3":Yl,"rgba s3tc dxt5":Su}),bt.webgl_compressed_texture_atc&&e(oi,{"rgb atc":nc,"rgba atc explicit alpha":bs,"rgba atc interpolated alpha":Rn}),bt.webgl_compressed_texture_pvrtc&&e(oi,{"rgb pvrtc 4bppv1":_a,"rgb pvrtc 2bppv1":Vu,"rgba pvrtc 4bppv1":ql,"rgba pvrtc 2bppv1":xo}),bt.webgl_compressed_texture_etc1&&(oi["rgb etc1"]=Kl);var Tr=Array.prototype.slice.call(Me.getParameter(ki));Object.keys(oi).forEach(function(ne){var we=oi[ne];Tr.indexOf(we)>=0&&(ji[ne]=we)});var Zr=Object.keys(ji);Ot.textureFormats=Zr;var yi=[];Object.keys(ji).forEach(function(ne){var we=ji[ne];yi[we]=ne});var Ii=[];Object.keys(Qi).forEach(function(ne){var we=Qi[ne];Ii[we]=ne});var ui=[];Object.keys(qi).forEach(function(ne){var we=qi[ne];ui[we]=ne});var nn=[];Object.keys(Si).forEach(function(ne){var we=Si[ne];nn[we]=ne});var Xi=[];Object.keys(Ni).forEach(function(ne){var we=Ni[ne];Xi[we]=ne});var qn=Zr.reduce(function(ne,we){var Oe=ji[we];return Oe===po||Oe===_o||Oe===po||Oe===Lo||Oe===il||Oe===As||bt.ext_srgb&&(Oe===cl||Oe===Ks)?ne[Oe]=Oe:Oe===Ds||we.indexOf("rgba")>=0?ne[Oe]=Ma:ne[Oe]=No,ne},{});function fi(){this.internalformat=Ma,this.format=Ma,this.type=Ns,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=lc,this.width=0,this.height=0,this.channels=0}function si(ne,we){ne.internalformat=we.internalformat,ne.format=we.format,ne.type=we.type,ne.compressed=we.compressed,ne.premultiplyAlpha=we.premultiplyAlpha,ne.flipY=we.flipY,ne.unpackAlignment=we.unpackAlignment,ne.colorSpace=we.colorSpace,ne.width=we.width,ne.height=we.height,ne.channels=we.channels}function mn(ne,we){if(!(typeof we!="object"||!we)){if("premultiplyAlpha"in we&&(ne.premultiplyAlpha=we.premultiplyAlpha),"flipY"in we&&(ne.flipY=we.flipY),"alignment"in we&&(ne.unpackAlignment=we.alignment),"colorSpace"in we&&(ne.colorSpace=Vn[we.colorSpace]),"type"in we){var Oe=we.type;ne.type=Qi[Oe]}var ht=ne.width,Yt=ne.height,cr=ne.channels,Nt=!1;"shape"in we?(ht=we.shape[0],Yt=we.shape[1],we.shape.length===3&&(cr=we.shape[2],Nt=!0)):("radius"in we&&(ht=Yt=we.radius),"width"in we&&(ht=we.width),"height"in we&&(Yt=we.height),"channels"in we&&(cr=we.channels,Nt=!0)),ne.width=ht|0,ne.height=Yt|0,ne.channels=cr|0;var Ne=!1;if("format"in we){var $e=we.format,st=ne.internalformat=ji[$e];ne.format=qn[st],$e in Qi&&("type"in we||(ne.type=Qi[$e])),$e in oi&&(ne.compressed=!0),Ne=!0}!Nt&&Ne?ne.channels=Go[ne.format]:Nt&&!Ne&&ne.channels!==Hs[ne.format]&&(ne.format=ne.internalformat=Hs[ne.channels])}}function Ji(ne){Me.pixelStorei(Gf,ne.flipY),Me.pixelStorei($l,ne.premultiplyAlpha),Me.pixelStorei(fl,ne.colorSpace),Me.pixelStorei(af,ne.unpackAlignment)}function Ui(){fi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Bi(ne,we){var Oe=null;if(_f(we)?Oe=we:we&&(mn(ne,we),"x"in we&&(ne.xOffset=we.x|0),"y"in we&&(ne.yOffset=we.y|0),_f(we.data)&&(Oe=we.data)),we.copy){var ht=Vr.viewportWidth,Yt=Vr.viewportHeight;ne.width=ne.width||ht-ne.xOffset,ne.height=ne.height||Yt-ne.yOffset,ne.needsCopy=!0}else if(!Oe)ne.width=ne.width||1,ne.height=ne.height||1,ne.channels=ne.channels||4;else if(qr(Oe))ne.channels=ne.channels||4,ne.data=Oe,!("type"in we)&&ne.type===Ns&&(ne.type=Yc(Oe));else if(of(Oe))ne.channels=ne.channels||4,eh(ne,Oe),ne.alignment=1,ne.needsFree=!0;else if(jr(Oe)){var cr=Oe.data;!Array.isArray(cr)&&ne.type===Ns&&(ne.type=Yc(cr));var Nt=Oe.shape,Ne=Oe.stride,$e,st,It,Bt,Ft,Ut;Nt.length===3?(It=Nt[2],Ut=Ne[2]):(It=1,Ut=1),$e=Nt[0],st=Nt[1],Bt=Ne[0],Ft=Ne[1],ne.alignment=1,ne.width=$e,ne.height=st,ne.channels=It,ne.format=ne.internalformat=Hs[It],ne.needsFree=!0,jf(ne,cr,Bt,Ft,Ut,Oe.offset)}else if(Hf(Oe)||Ic(Oe)||yf(Oe))Hf(Oe)||Ic(Oe)?ne.element=Oe:ne.element=Oe.canvas,ne.width=ne.element.width,ne.height=ne.element.height,ne.channels=4;else if(Bl(Oe))ne.element=Oe,ne.width=Oe.width,ne.height=Oe.height,ne.channels=4;else if(Ah(Oe))ne.element=Oe,ne.width=Oe.naturalWidth,ne.height=Oe.naturalHeight,ne.channels=4;else if(Qf(Oe))ne.element=Oe,ne.width=Oe.videoWidth,ne.height=Oe.videoHeight,ne.channels=4;else if(Hu(Oe)){var zt=ne.width||Oe[0].length,_t=ne.height||Oe.length,Dt=ne.channels;En(Oe[0][0])?Dt=Dt||Oe[0][0].length:Dt=Dt||1;for(var vt=Ge.shape(Oe),lr=1,_r=0;_r>=Yt,Oe.height>>=Yt,Bi(Oe,ht[Yt]),ne.mipmask|=1<=0&&!("faces"in we)&&(ne.genMipmaps=!0)}if("mag"in we){var ht=we.mag;ne.magFilter=qi[ht]}var Yt=ne.wrapS,cr=ne.wrapT;if("wrap"in we){var Nt=we.wrap;typeof Nt=="string"?Yt=cr=Ni[Nt]:Array.isArray(Nt)&&(Yt=Ni[Nt[0]],cr=Ni[Nt[1]])}else{if("wrapS"in we){var Ne=we.wrapS;Yt=Ni[Ne]}if("wrapT"in we){var $e=we.wrapT;cr=Ni[$e]}}if(ne.wrapS=Yt,ne.wrapT=cr,"anisotropic"in we){var st=we.anisotropic;ne.anisotropic=we.anisotropic}if("mipmap"in we){var It=!1;switch(typeof we.mipmap){case"string":ne.mipmapHint=vi[we.mipmap],ne.genMipmaps=!0,It=!0;break;case"boolean":It=ne.genMipmaps=we.mipmap;break;case"object":ne.genMipmaps=!1,It=!0;break;default:}It&&!("min"in we)&&(ne.minFilter=Jl)}}function al(ne,we){Me.texParameteri(we,Vf,ne.minFilter),Me.texParameteri(we,nf,ne.magFilter),Me.texParameteri(we,qo,ne.wrapS),Me.texParameteri(we,Oo,ne.wrapT),bt.ext_texture_filter_anisotropic&&Me.texParameteri(we,cs,ne.anisotropic),ne.genMipmaps&&(Me.hint(Cf,ne.mipmapHint),Me.generateMipmap(we))}var Vl=0,ss={},Vs=Ot.maxTextureUnits,Ys=Array(Vs).map(function(){return null});function wa(ne){fi.call(this),this.mipmask=0,this.internalformat=Ma,this.id=Vl++,this.refCount=1,this.target=ne,this.texture=Me.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new zo,Nr.profile&&(this.stats={size:0})}function ol(ne){Me.activeTexture(Fu),Me.bindTexture(ne.target,ne.texture)}function io(){var ne=Ys[0];ne?Me.bindTexture(ne.target,ne.texture):Me.bindTexture(_n,null)}function Y(ne){var we=ne.texture,Oe=ne.unit,ht=ne.target;Oe>=0&&(Me.activeTexture(Fu+Oe),Me.bindTexture(ht,null),Ys[Oe]=null),Me.deleteTexture(we),ne.texture=null,ne.params=null,ne.pixels=null,ne.refCount=0,delete ss[ne.id],Or.textureCount--}e(wa.prototype,{bind:function(){var ne=this;ne.bindCount+=1;var we=ne.unit;if(we<0){for(var Oe=0;Oe0)continue;ht.unit=-1}Ys[Oe]=ne,we=Oe;break}we>=Vs,Nr.profile&&Or.maxTextureUnits>Ft)-It,Ut.height=Ut.height||(Oe.height>>Ft)-Bt,ol(Oe),Nn(Ut,_n,It,Bt,Ft),io(),Cn(Ut),ht}function cr(Nt,Ne){var $e=Nt|0,st=Ne|0||$e;if($e===Oe.width&&st===Oe.height)return ht;ht.width=Oe.width=$e,ht.height=Oe.height=st,ol(Oe);for(var It=0;Oe.mipmask>>It;++It){var Bt=$e>>It,Ft=st>>It;if(!Bt||!Ft)break;Me.texImage2D(_n,It,Oe.format,Bt,Ft,0,Oe.format,Oe.type,null)}return io(),Nr.profile&&(Oe.stats.size=cc(Oe.internalformat,Oe.type,$e,st,!1,!1)),ht}return ht(ne,we),ht.subimage=Yt,ht.resize=cr,ht._reglType="texture2d",ht._texture=Oe,Nr.profile&&(ht.stats=Oe.stats),ht.destroy=function(){Oe.decRef()},ht}function J(ne,we,Oe,ht,Yt,cr){var Nt=new wa(ya);ss[Nt.id]=Nt,Or.cubeCount++;var Ne=new Array(6);function $e(Bt,Ft,Ut,zt,_t,Dt){var vt,lr=Nt.texInfo;for(zo.call(lr),vt=0;vt<6;++vt)Ne[vt]=Ga();if(typeof Bt=="number"||!Bt){var _r=Bt|0||1;for(vt=0;vt<6;++vt)sa(Ne[vt],_r,_r)}else if(typeof Bt=="object")if(Ft)ba(Ne[0],Bt),ba(Ne[1],Ft),ba(Ne[2],Ut),ba(Ne[3],zt),ba(Ne[4],_t),ba(Ne[5],Dt);else if(Qs(lr,Bt),mn(Nt,Bt),"faces"in Bt){var Br=Bt.faces;for(vt=0;vt<6;++vt)si(Ne[vt],Nt),ba(Ne[vt],Br[vt])}else for(vt=0;vt<6;++vt)ba(Ne[vt],Bt);for(si(Nt,Ne[0]),lr.genMipmaps?Nt.mipmask=(Ne[0].width<<1)-1:Nt.mipmask=Ne[0].mipmask,Nt.internalformat=Ne[0].internalformat,$e.width=Ne[0].width,$e.height=Ne[0].height,ol(Nt),vt=0;vt<6;++vt)is(Ne[vt],ea+vt);for(al(lr,ya),io(),Nr.profile&&(Nt.stats.size=cc(Nt.internalformat,Nt.type,$e.width,$e.height,lr.genMipmaps,!0)),$e.format=yi[Nt.internalformat],$e.type=Ii[Nt.type],$e.mag=ui[lr.magFilter],$e.min=nn[lr.minFilter],$e.wrapS=Xi[lr.wrapS],$e.wrapT=Xi[lr.wrapT],vt=0;vt<6;++vt)Ml(Ne[vt]);return $e}function st(Bt,Ft,Ut,zt,_t){var Dt=Ut|0,vt=zt|0,lr=_t|0,_r=Ki();return si(_r,Nt),_r.width=0,_r.height=0,Bi(_r,Ft),_r.width=_r.width||(Nt.width>>lr)-Dt,_r.height=_r.height||(Nt.height>>lr)-vt,ol(Nt),Nn(_r,ea+Bt,Dt,vt,lr),io(),Cn(_r),$e}function It(Bt){var Ft=Bt|0;if(Ft!==Nt.width){$e.width=Nt.width=Ft,$e.height=Nt.height=Ft,ol(Nt);for(var Ut=0;Ut<6;++Ut)for(var zt=0;Nt.mipmask>>zt;++zt)Me.texImage2D(ea+Ut,zt,Nt.format,Ft>>zt,Ft>>zt,0,Nt.format,Nt.type,null);return io(),Nr.profile&&(Nt.stats.size=cc(Nt.internalformat,Nt.type,$e.width,$e.height,!1,!0)),$e}}return $e(ne,we,Oe,ht,Yt,cr),$e.subimage=st,$e.resize=It,$e._reglType="textureCube",$e._texture=Nt,Nr.profile&&($e.stats=Nt.stats),$e.destroy=function(){Nt.decRef()},$e}function O(){for(var ne=0;ne>ht,Oe.height>>ht,0,Oe.internalformat,Oe.type,null);else for(var Yt=0;Yt<6;++Yt)Me.texImage2D(ea+Yt,ht,Oe.internalformat,Oe.width>>ht,Oe.height>>ht,0,Oe.internalformat,Oe.type,null);al(Oe.texInfo,Oe.target)})}function de(){for(var ne=0;ne=0?Ml=!0:Ni.indexOf(zo)>=0&&(Ml=!1))),("depthTexture"in wa||"depthStencilTexture"in wa)&&(Ys=!!(wa.depthTexture||wa.depthStencilTexture)),"depth"in wa&&(typeof wa.depth=="boolean"?is=wa.depth:(Vl=wa.depth,Zs=!1)),"stencil"in wa&&(typeof wa.stencil=="boolean"?Zs=wa.stencil:(ss=wa.stencil,is=!1)),"depthStencil"in wa&&(typeof wa.depthStencil=="boolean"?is=Zs=wa.depthStencil:(Vs=wa.depthStencil,is=!1,Zs=!1))}var io=null,Y=null,D=null,J=null;if(Array.isArray(Ga))io=Ga.map(oi);else if(Ga)io=[oi(Ga)];else for(io=new Array(al),ia=0;ia0&&(Cn.depth=Bi[0].depth,Cn.stencil=Bi[0].stencil,Cn.depthStencil=Bi[0].depthStencil),Bi[Ki]?Bi[Ki](Cn):Bi[Ki]=si(Cn)}return e(pn,{width:ia,height:ia,color:zo})}function Nn(aa){var Ki,Cn=aa|0;if(Cn===pn.width)return pn;var ia=pn.color;for(Ki=0;Ki=ia.byteLength?sa.subdata(ia):(sa.destroy(),si.buffers[aa]=null)),si.buffers[aa]||(sa=si.buffers[aa]=Vr.create(Ki,If,!1,!0)),Cn.buffer=Vr.getBuffer(sa),Cn.size=Cn.buffer.dimension|0,Cn.normalized=!1,Cn.type=Cn.buffer.dtype,Cn.offset=0,Cn.stride=0,Cn.divisor=0,Cn.state=1,pn[aa]=1}else Vr.getBuffer(Ki)?(Cn.buffer=Vr.getBuffer(Ki),Cn.size=Cn.buffer.dimension|0,Cn.normalized=!1,Cn.type=Cn.buffer.dtype,Cn.offset=0,Cn.stride=0,Cn.divisor=0,Cn.state=1):Vr.getBuffer(Ki.buffer)?(Cn.buffer=Vr.getBuffer(Ki.buffer),Cn.size=(+Ki.size||Cn.buffer.dimension)|0,Cn.normalized=!!Ki.normalized||!1,"type"in Ki?Cn.type=un[Ki.type]:Cn.type=Cn.buffer.dtype,Cn.offset=(Ki.offset||0)|0,Cn.stride=(Ki.stride||0)|0,Cn.divisor=(Ki.divisor||0)|0,Cn.state=1):"x"in Ki&&(Cn.x=+Ki.x||0,Cn.y=+Ki.y||0,Cn.z=+Ki.z||0,Cn.w=+Ki.w||0,Cn.state=2)}for(var ba=0;ba1)for(var Ji=0;JiTr&&(Tr=Zr.stats.uniformsCount)}),Tr},Ot.getMaxAttributesCount=function(){var Tr=0;return Si.forEach(function(Zr){Zr.stats.attributesCount>Tr&&(Tr=Zr.stats.attributesCount)}),Tr});function oi(){Vr={},Or={};for(var Tr=0;Tr16&&(Ot=Yi(Ot,Me.length*8));for(var Lr=Array(16),Vr=Array(16),Or=0;Or<16;Or++)Lr[Or]=Ot[Or]^909522486,Vr[Or]=Ot[Or]^1549556828;var Nr=Yi(Lr.concat(Bc(bt)),512+bt.length*8);return kt(Yi(Vr.concat(Nr),768))}function vu(Me){for(var bt=ah?"0123456789ABCDEF":"0123456789abcdef",Ot="",Lr,Vr=0;Vr>>4&15)+bt.charAt(Lr&15);return Ot}function Oc(Me){for(var bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ot="",Lr=Me.length,Vr=0;VrMe.length*8?Ot+=Zu:Ot+=bt.charAt(Or>>>6*(3-Nr)&63);return Ot}function ff(Me,bt){var Ot=bt.length,Lr=Array(),Vr,Or,Nr,vi,Ni=Array(Math.ceil(Me.length/2));for(Vr=0;Vr0;){for(vi=Array(),Nr=0,Vr=0;Vr0||Or>0)&&(vi[vi.length]=Or);Lr[Lr.length]=Nr,Ni=vi}var qi="";for(Vr=Lr.length-1;Vr>=0;Vr--)qi+=bt.charAt(Lr[Vr]);var Si=Math.ceil(Me.length*8/(Math.log(bt.length)/Math.log(2)));for(Vr=qi.length;Vr>>6&31,128|Lr&63):Lr<=65535?bt+=String.fromCharCode(224|Lr>>>12&15,128|Lr>>>6&63,128|Lr&63):Lr<=2097151&&(bt+=String.fromCharCode(240|Lr>>>18&7,128|Lr>>>12&63,128|Lr>>>6&63,128|Lr&63));return bt}function Bc(Me){for(var bt=Array(Me.length>>2),Ot=0;Ot>5]|=(Me.charCodeAt(Ot/8)&255)<<24-Ot%32;return bt}function kt(Me){for(var bt="",Ot=0;Ot>5]>>>24-Ot%32&255);return bt}function Zt(Me,bt){return Me>>>bt|Me<<32-bt}function Er(Me,bt){return Me>>>bt}function xr(Me,bt,Ot){return Me&bt^~Me&Ot}function Kr(Me,bt,Ot){return Me&bt^Me&Ot^bt&Ot}function Mi(Me){return Zt(Me,2)^Zt(Me,13)^Zt(Me,22)}function Wi(Me){return Zt(Me,6)^Zt(Me,11)^Zt(Me,25)}function dn(Me){return Zt(Me,7)^Zt(Me,18)^Er(Me,3)}function wn(Me){return Zt(Me,17)^Zt(Me,19)^Er(Me,10)}var On=new Array(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);function Yi(Me,bt){var Ot=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Lr=new Array(64),Vr,Or,Nr,vi,Ni,qi,Si,Vn,Qi,ji,oi,Tr;for(Me[bt>>5]|=128<<24-bt%32,Me[(bt+64>>9<<4)+15]=bt,Qi=0;Qi>16)+(bt>>16)+(Ot>>16);return Lr<<16|Ot&65535}function an(Me){return Array.prototype.slice.call(Me)}function Fi(Me){return an(Me).join("")}function ta(Me){var bt=Me&&Me.cache,Ot=0,Lr=[],Vr=[],Or=[];function Nr(oi,Tr){var Zr=Tr&&Tr.stable;if(!Zr){for(var yi=0;yi0&&(oi.push(Ii,"="),oi.push.apply(oi,an(arguments)),oi.push(";")),Ii}return e(Tr,{def:yi,toString:function(){return Fi([Zr.length>0?"var "+Zr.join(",")+";":"",Fi(oi)])}})}function Ni(){var oi=vi(),Tr=vi(),Zr=oi.toString,yi=Tr.toString;function Ii(ui,nn){Tr(ui,nn,"=",oi.def(ui,nn),";")}return e(function(){oi.apply(oi,an(arguments))},{def:oi.def,entry:oi,exit:Tr,save:Ii,set:function(ui,nn,Xi){Ii(ui,nn),oi(ui,nn,"=",Xi,";")},toString:function(){return Zr()+yi()}})}function qi(){var oi=Fi(arguments),Tr=Ni(),Zr=Ni(),yi=Tr.toString,Ii=Zr.toString;return e(Tr,{then:function(){return Tr.apply(Tr,an(arguments)),this},else:function(){return Zr.apply(Zr,an(arguments)),this},toString:function(){var ui=Ii();return ui&&(ui="else{"+ui+"}"),Fi(["if(",oi,"){",yi(),"}",ui])}})}var Si=vi(),Vn={};function Qi(oi,Tr){var Zr=[];function yi(){var qn="a"+Zr.length;return Zr.push(qn),qn}Tr=Tr||0;for(var Ii=0;Ii":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ii={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},di={cw:Te,ccw:qe};function Li(Me){return Array.isArray(Me)||qr(Me)||jr(Me)}function Ti(Me){return Me.sort(function(bt,Ot){return bt===ee?-1:Ot===ee?1:bt=1,Lr>=2,bt)}else if(Ot===Zo){var Vr=Me.data;return new Qr(Vr.thisDep,Vr.contextDep,Vr.propDep,bt)}else{if(Ot===Ss)return new Qr(!1,!1,!1,bt);if(Ot===as){for(var Or=!1,Nr=!1,vi=!1,Ni=0;Ni=1&&(Nr=!0),Si>=2&&(vi=!0)}else qi.type===Zo&&(Or=Or||qi.data.thisDep,Nr=Nr||qi.data.contextDep,vi=vi||qi.data.propDep)}return new Qr(Or,Nr,vi,bt)}else return new Qr(Ot===bo,Ot===Ka,Ot===Dn,bt)}}var na=new Qr(!1,!1,!1,function(){});function Ea(Me,bt,Ot,Lr,Vr,Or,Nr,vi,Ni,qi,Si,Vn,Qi,ji,oi,Tr){var Zr=qi.Record,yi={add:32774,subtract:32778,"reverse subtract":32779};Ot.ext_blend_minmax&&(yi.min=Ve,yi.max=Ye);var Ii=Ot.angle_instanced_arrays,ui=Ot.webgl_draw_buffers,nn=Ot.oes_vertex_array_object,Xi={dirty:!0,profile:Tr.profile},qn={},fi=[],si={},mn={};function Ji(Ne){return Ne.replace(".","_")}function Ui(Ne,$e,st){var It=Ji(Ne);fi.push(Ne),qn[It]=Xi[It]=!!st,si[It]=$e}function Bi(Ne,$e,st){var It=Ji(Ne);fi.push(Ne),Array.isArray(st)?(Xi[It]=st.slice(),qn[It]=st.slice()):Xi[It]=qn[It]=st,mn[It]=$e}function pn(Ne){return!!isNaN(Ne)}Ui(ws,Ci),Ui(Ho,ri),Bi(ml,"blendColor",[0,0,0,0]),Bi(Ws,"blendEquationSeparate",[pr,pr]),Bi(Ls,"blendFuncSeparate",[dr,Xt,dr,Xt]),Ui(va,sn,!0),Bi(no,"depthFunc",Ur),Bi(ys,"depthRange",[0,1]),Bi(rs,"depthMask",!0),Bi(Ql,Ql,[!0,!0,!0,!0]),Ui(Cu,Hr),Bi(Yu,"cullFace",se),Bi(Nc,Nc,qe),Bi(pu,pu,1),Ui(Uc,Yn),Bi(xu,"polygonOffset",[0,0]),Ui(Ac,Aa),Ui(Va,fa),Bi(oo,"sampleCoverage",[1,!1]),Ui(Vc,cn),Bi(hc,"stencilMask",-1),Bi(Ku,"stencilFunc",[Pt,0,-1]),Bi(ue,"stencilOpSeparate",[X,ot,ot,ot]),Bi(w,"stencilOpSeparate",[se,ot,ot,ot]),Ui(B,Ln),Bi(Q,"scissor",[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]),Bi(ee,ee,[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]);var Nn={gl:Me,context:Qi,strings:bt,next:qn,current:Xi,draw:Vn,elements:Or,buffer:Vr,shader:Si,attributes:qi.state,vao:qi,uniforms:Ni,framebuffer:vi,extensions:Ot,timer:ji,isBufferArgs:Li},aa={primTypes:Mn,compareFuncs:Wr,blendFuncs:xi,blendEquations:yi,stencilOps:ii,glTypes:un,orientationType:di};ui&&(aa.backBuffer=[se],aa.drawBuffer=S(Lr.maxDrawbuffers,function(Ne){return Ne===0?[0]:S(Ne,function($e){return gi+$e})}));var Ki=0;function Cn(){var Ne=ta({cache:oi}),$e=Ne.link,st=Ne.global;Ne.id=Ki++,Ne.batchId="0";var It=$e(Nn),Bt=Ne.shared={props:"a0"};Object.keys(Nn).forEach(function(Dt){Bt[Dt]=st.def(It,".",Dt)});var Ft=Ne.next={},Ut=Ne.current={};Object.keys(mn).forEach(function(Dt){Array.isArray(Xi[Dt])&&(Ft[Dt]=st.def(Bt.next,".",Dt),Ut[Dt]=st.def(Bt.current,".",Dt))});var zt=Ne.constants={};Object.keys(aa).forEach(function(Dt){zt[Dt]=st.def(JSON.stringify(aa[Dt]))}),Ne.invoke=function(Dt,vt){switch(vt.type){case Zn:var lr=["this",Bt.context,Bt.props,Ne.batchId];return Dt.def($e(vt.data),".call(",lr.slice(0,Math.max(vt.data.length+1,4)),")");case Dn:return Dt.def(Bt.props,vt.data);case Ka:return Dt.def(Bt.context,vt.data);case bo:return Dt.def("this",vt.data);case Zo:return vt.data.append(Ne,Dt),vt.data.ref;case Ss:return vt.data.toString();case as:return vt.data.map(function(_r){return Ne.invoke(Dt,_r)})}},Ne.attribCache={};var _t={};return Ne.scopeAttrib=function(Dt){var vt=bt.id(Dt);if(vt in _t)return _t[vt];var lr=qi.scope[vt];lr||(lr=qi.scope[vt]=new Zr);var _r=_t[vt]=$e(lr);return _r},Ne}function ia(Ne){var $e=Ne.static,st=Ne.dynamic,It;if(le in $e){var Bt=!!$e[le];It=kn(function(Ut,zt){return Bt}),It.enable=Bt}else if(le in st){var Ft=st[le];It=Bn(Ft,function(Ut,zt){return Ut.invoke(zt,Ft)})}return It}function sa(Ne,$e){var st=Ne.static,It=Ne.dynamic;if(Fe in st){var Bt=st[Fe];return Bt?(Bt=vi.getFramebuffer(Bt),kn(function(Ut,zt){var _t=Ut.link(Bt),Dt=Ut.shared;zt.set(Dt.framebuffer,".next",_t);var vt=Dt.context;return zt.set(vt,"."+ze,_t+".width"),zt.set(vt,"."+Qe,_t+".height"),_t})):kn(function(Ut,zt){var _t=Ut.shared;zt.set(_t.framebuffer,".next","null");var Dt=_t.context;return zt.set(Dt,"."+ze,Dt+"."+Wt),zt.set(Dt,"."+Qe,Dt+"."+nr),"null"})}else if(Fe in It){var Ft=It[Fe];return Bn(Ft,function(Ut,zt){var _t=Ut.invoke(zt,Ft),Dt=Ut.shared,vt=Dt.framebuffer,lr=zt.def(vt,".getFramebuffer(",_t,")");zt.set(vt,".next",lr);var _r=Dt.context;return zt.set(_r,"."+ze,lr+"?"+lr+".width:"+_r+"."+Wt),zt.set(_r,"."+Qe,lr+"?"+lr+".height:"+_r+"."+nr),lr})}else return null}function ba(Ne,$e,st){var It=Ne.static,Bt=Ne.dynamic;function Ft(_t){if(_t in It){var Dt=It[_t],vt=!0,lr=Dt.x|0,_r=Dt.y|0,Br,Di;return"width"in Dt?Br=Dt.width|0:vt=!1,"height"in Dt?Di=Dt.height|0:vt=!1,new Qr(!vt&&$e&&$e.thisDep,!vt&&$e&&$e.contextDep,!vt&&$e&&$e.propDep,function(gn,tn){var Ei=gn.shared.context,Oi=Br;"width"in Dt||(Oi=tn.def(Ei,".",ze,"-",lr));var Gi=Di;return"height"in Dt||(Gi=tn.def(Ei,".",Qe,"-",_r)),[lr,_r,Oi,Gi]})}else if(_t in Bt){var ci=Bt[_t],bi=Bn(ci,function(gn,tn){var Ei=gn.invoke(tn,ci),Oi=gn.shared.context,Gi=tn.def(Ei,".x|0"),on=tn.def(Ei,".y|0"),zn=tn.def('"width" in ',Ei,"?",Ei,".width|0:","(",Oi,".",ze,"-",Gi,")"),Ja=tn.def('"height" in ',Ei,"?",Ei,".height|0:","(",Oi,".",Qe,"-",on,")");return[Gi,on,zn,Ja]});return $e&&(bi.thisDep=bi.thisDep||$e.thisDep,bi.contextDep=bi.contextDep||$e.contextDep,bi.propDep=bi.propDep||$e.propDep),bi}else return $e?new Qr($e.thisDep,$e.contextDep,$e.propDep,function(gn,tn){var Ei=gn.shared.context;return[0,0,tn.def(Ei,".",ze),tn.def(Ei,".",Qe)]}):null}var Ut=Ft(ee);if(Ut){var zt=Ut;Ut=new Qr(Ut.thisDep,Ut.contextDep,Ut.propDep,function(_t,Dt){var vt=zt.append(_t,Dt),lr=_t.shared.context;return Dt.set(lr,"."+Xe,vt[2]),Dt.set(lr,"."+nt,vt[3]),vt})}return{viewport:Ut,scissor_box:Ft(Q)}}function is(Ne,$e){var st=Ne.static,It=typeof st[ut]=="string"&&typeof st[Ze]=="string";if(It){if(Object.keys($e.dynamic).length>0)return null;var Bt=$e.static,Ft=Object.keys(Bt);if(Ft.length>0&&typeof Bt[Ft[0]]=="number"){for(var Ut=[],zt=0;zt"+Gi+"?"+vt+".constant["+Gi+"]:0;"}).join(""),"}}else{","if(",Br,"(",vt,".buffer)){",gn,"=",Di,".createStream(",br,",",vt,".buffer);","}else{",gn,"=",Di,".getBuffer(",vt,".buffer);","}",tn,'="type" in ',vt,"?",_r.glTypes,"[",vt,".type]:",gn,".dtype;",ci.normalized,"=!!",vt,".normalized;");function Ei(Oi){Dt(ci[Oi],"=",vt,".",Oi,"|0;")}return Ei("size"),Ei("offset"),Ei("stride"),Ei("divisor"),Dt("}}"),Dt.exit("if(",ci.isStream,"){",Di,".destroyStream(",gn,");","}"),ci}Bt[Ft]=Bn(Ut,zt)}),Bt}function al(Ne){var $e=Ne.static,st=Ne.dynamic,It={};return Object.keys($e).forEach(function(Bt){var Ft=$e[Bt];It[Bt]=kn(function(Ut,zt){return typeof Ft=="number"||typeof Ft=="boolean"?""+Ft:Ut.link(Ft)})}),Object.keys(st).forEach(function(Bt){var Ft=st[Bt];It[Bt]=Bn(Ft,function(Ut,zt){return Ut.invoke(zt,Ft)})}),It}function Vl(Ne,$e,st,It,Bt){var Ft=Ne.static,Ut=Ne.dynamic,zt=is(Ne,$e),_t=sa(Ne,Bt),Dt=ba(Ne,_t,Bt),vt=Ga(Ne,Bt),lr=Ml(Ne,Bt),_r=Zs(Ne,Bt,zt);function Br(Ei){var Oi=Dt[Ei];Oi&&(lr[Ei]=Oi)}Br(ee),Br(Ji(Q));var Di=Object.keys(lr).length>0,ci={framebuffer:_t,draw:vt,shader:_r,state:lr,dirty:Di,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(ci.profile=ia(Ne,Bt),ci.uniforms=zo(st,Bt),ci.drawVAO=ci.scopeVAO=vt.vao,!ci.drawVAO&&_r.program&&!zt&&Ot.angle_instanced_arrays&&vt.static.elements){var bi=!0,gn=_r.program.attributes.map(function(Ei){var Oi=$e.static[Ei];return bi=bi&&!!Oi,Oi});if(bi&&gn.length>0){var tn=qi.getVAO(qi.createVAO({attributes:gn,elements:vt.static.elements}));ci.drawVAO=new Qr(null,null,null,function(Ei,Oi){return Ei.link(tn)}),ci.useVAO=!0}}return zt?ci.useVAO=!0:ci.attributes=Qs($e,Bt),ci.context=al(It,Bt),ci}function ss(Ne,$e,st){var It=Ne.shared,Bt=It.context,Ft=Ne.scope();Object.keys(st).forEach(function(Ut){$e.save(Bt,"."+Ut);var zt=st[Ut],_t=zt.append(Ne,$e);Array.isArray(_t)?Ft(Bt,".",Ut,"=[",_t.join(),"];"):Ft(Bt,".",Ut,"=",_t,";")}),$e(Ft)}function Vs(Ne,$e,st,It){var Bt=Ne.shared,Ft=Bt.gl,Ut=Bt.framebuffer,zt;ui&&(zt=$e.def(Bt.extensions,".webgl_draw_buffers"));var _t=Ne.constants,Dt=_t.drawBuffer,vt=_t.backBuffer,lr;st?lr=st.append(Ne,$e):lr=$e.def(Ut,".next"),It||$e("if(",lr,"!==",Ut,".cur){"),$e("if(",lr,"){",Ft,".bindFramebuffer(",zr,",",lr,".framebuffer);"),ui&&$e(zt,".drawBuffersWEBGL(",Dt,"[",lr,".colorAttachments.length]);"),$e("}else{",Ft,".bindFramebuffer(",zr,",null);"),ui&&$e(zt,".drawBuffersWEBGL(",vt,");"),$e("}",Ut,".cur=",lr,";"),It||$e("}")}function Ys(Ne,$e,st){var It=Ne.shared,Bt=It.gl,Ft=Ne.current,Ut=Ne.next,zt=It.current,_t=It.next,Dt=Ne.cond(zt,".dirty");fi.forEach(function(vt){var lr=Ji(vt);if(!(lr in st.state)){var _r,Br;if(lr in Ut){_r=Ut[lr],Br=Ft[lr];var Di=S(Xi[lr].length,function(bi){return Dt.def(_r,"[",bi,"]")});Dt(Ne.cond(Di.map(function(bi,gn){return bi+"!=="+Br+"["+gn+"]"}).join("||")).then(Bt,".",mn[lr],"(",Di,");",Di.map(function(bi,gn){return Br+"["+gn+"]="+bi}).join(";"),";"))}else{_r=Dt.def(_t,".",lr);var ci=Ne.cond(_r,"!==",zt,".",lr);Dt(ci),lr in si?ci(Ne.cond(_r).then(Bt,".enable(",si[lr],");").else(Bt,".disable(",si[lr],");"),zt,".",lr,"=",_r,";"):ci(Bt,".",mn[lr],"(",_r,");",zt,".",lr,"=",_r,";")}}}),Object.keys(st.state).length===0&&Dt(zt,".dirty=false;"),$e(Dt)}function wa(Ne,$e,st,It){var Bt=Ne.shared,Ft=Ne.current,Ut=Bt.current,zt=Bt.gl,_t;Ti(Object.keys(st)).forEach(function(Dt){var vt=st[Dt];if(!(It&&!It(vt))){var lr=vt.append(Ne,$e);if(si[Dt]){var _r=si[Dt];Pn(vt)?(_t=Ne.link(lr,{stable:!0}),$e(Ne.cond(_t).then(zt,".enable(",_r,");").else(zt,".disable(",_r,");")),$e(Ut,".",Dt,"=",_t,";")):($e(Ne.cond(lr).then(zt,".enable(",_r,");").else(zt,".disable(",_r,");")),$e(Ut,".",Dt,"=",lr,";"))}else if(En(lr)){var Br=Ft[Dt];$e(zt,".",mn[Dt],"(",lr,");",lr.map(function(Di,ci){return Br+"["+ci+"]="+Di}).join(";"),";")}else Pn(vt)?(_t=Ne.link(lr,{stable:!0}),$e(zt,".",mn[Dt],"(",_t,");",Ut,".",Dt,"=",_t,";")):$e(zt,".",mn[Dt],"(",lr,");",Ut,".",Dt,"=",lr,";")}})}function ol(Ne,$e){Ii&&(Ne.instancing=$e.def(Ne.shared.extensions,".angle_instanced_arrays"))}function io(Ne,$e,st,It,Bt){var Ft=Ne.shared,Ut=Ne.stats,zt=Ft.current,_t=Ft.timer,Dt=st.profile;function vt(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var lr,_r;function Br(Ei){lr=$e.def(),Ei(lr,"=",vt(),";"),typeof Bt=="string"?Ei(Ut,".count+=",Bt,";"):Ei(Ut,".count++;"),ji&&(It?(_r=$e.def(),Ei(_r,"=",_t,".getNumPendingQueries();")):Ei(_t,".beginQuery(",Ut,");"))}function Di(Ei){Ei(Ut,".cpuTime+=",vt(),"-",lr,";"),ji&&(It?Ei(_t,".pushScopeStats(",_r,",",_t,".getNumPendingQueries(),",Ut,");"):Ei(_t,".endQuery();"))}function ci(Ei){var Oi=$e.def(zt,".profile");$e(zt,".profile=",Ei,";"),$e.exit(zt,".profile=",Oi,";")}var bi;if(Dt){if(Pn(Dt)){Dt.enable?(Br($e),Di($e.exit),ci("true")):ci("false");return}bi=Dt.append(Ne,$e),ci(bi)}else bi=$e.def(zt,".profile");var gn=Ne.block();Br(gn),$e("if(",bi,"){",gn,"}");var tn=Ne.block();Di(tn),$e.exit("if(",bi,"){",tn,"}")}function Y(Ne,$e,st,It,Bt){var Ft=Ne.shared;function Ut(_t){switch(_t){case Co:case Ps:case hl:return 2;case Qa:case Ts:case Ul:return 3;case mo:case wo:case Lu:return 4;default:return 1}}function zt(_t,Dt,vt){var lr=Ft.gl,_r=$e.def(_t,".location"),Br=$e.def(Ft.attributes,"[",_r,"]"),Di=vt.state,ci=vt.buffer,bi=[vt.x,vt.y,vt.z,vt.w],gn=["buffer","normalized","offset","stride"];function tn(){$e("if(!",Br,".buffer){",lr,".enableVertexAttribArray(",_r,");}");var Oi=vt.type,Gi;if(vt.size?Gi=$e.def(vt.size,"||",Dt):Gi=Dt,$e("if(",Br,".type!==",Oi,"||",Br,".size!==",Gi,"||",gn.map(function(zn){return Br+"."+zn+"!=="+vt[zn]}).join("||"),"){",lr,".bindBuffer(",br,",",ci,".buffer);",lr,".vertexAttribPointer(",[_r,Gi,Oi,vt.normalized,vt.stride,vt.offset],");",Br,".type=",Oi,";",Br,".size=",Gi,";",gn.map(function(zn){return Br+"."+zn+"="+vt[zn]+";"}).join(""),"}"),Ii){var on=vt.divisor;$e("if(",Br,".divisor!==",on,"){",Ne.instancing,".vertexAttribDivisorANGLE(",[_r,on],");",Br,".divisor=",on,";}")}}function Ei(){$e("if(",Br,".buffer){",lr,".disableVertexAttribArray(",_r,");",Br,".buffer=null;","}if(",Ca.map(function(Oi,Gi){return Br+"."+Oi+"!=="+bi[Gi]}).join("||"),"){",lr,".vertexAttrib4f(",_r,",",bi,");",Ca.map(function(Oi,Gi){return Br+"."+Oi+"="+bi[Gi]+";"}).join(""),"}")}Di===La?tn():Di===Ua?Ei():($e("if(",Di,"===",La,"){"),tn(),$e("}else{"),Ei(),$e("}"))}It.forEach(function(_t){var Dt=_t.name,vt=st.attributes[Dt],lr;if(vt){if(!Bt(vt))return;lr=vt.append(Ne,$e)}else{if(!Bt(na))return;var _r=Ne.scopeAttrib(Dt);lr={},Object.keys(new Zr).forEach(function(Br){lr[Br]=$e.def(_r,".",Br)})}zt(Ne.link(_t),Ut(_t.info.type),lr)})}function D(Ne,$e,st,It,Bt,Ft){for(var Ut=Ne.shared,zt=Ut.gl,_t,Dt=0;Dt1){for(var co=[],ts=[],so=0;so>1)",ci],");")}function on(){st(bi,".drawArraysInstancedANGLE(",[_r,Br,Di,ci],");")}vt&&vt!=="null"?tn?Gi():(st("if(",vt,"){"),Gi(),st("}else{"),on(),st("}")):on()}function Oi(){function Gi(){st(Ft+".drawElements("+[_r,Di,gn,Br+"<<(("+gn+"-"+Ra+")>>1)"]+");")}function on(){st(Ft+".drawArrays("+[_r,Br,Di]+");")}vt&&vt!=="null"?tn?Gi():(st("if(",vt,"){"),Gi(),st("}else{"),on(),st("}")):on()}Ii&&(typeof ci!="number"||ci>=0)?typeof ci=="string"?(st("if(",ci,">0){"),Ei(),st("}else if(",ci,"<0){"),Oi(),st("}")):Ei():Oi()}function O(Ne,$e,st,It,Bt){var Ft=Cn(),Ut=Ft.proc("body",Bt);return Ii&&(Ft.instancing=Ut.def(Ft.shared.extensions,".angle_instanced_arrays")),Ne(Ft,Ut,st,It),Ft.compile().body}function K(Ne,$e,st,It){ol(Ne,$e),st.useVAO?st.drawVAO?$e(Ne.shared.vao,".setVAO(",st.drawVAO.append(Ne,$e),");"):$e(Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"):($e(Ne.shared.vao,".setVAO(null);"),Y(Ne,$e,st,It.attributes,function(){return!0})),D(Ne,$e,st,It.uniforms,function(){return!0},!1),J(Ne,$e,$e,st)}function de(Ne,$e){var st=Ne.proc("draw",1);ol(Ne,st),ss(Ne,st,$e.context),Vs(Ne,st,$e.framebuffer),Ys(Ne,st,$e),wa(Ne,st,$e.state),io(Ne,st,$e,!1,!0);var It=$e.shader.progVar.append(Ne,st);if(st(Ne.shared.gl,".useProgram(",It,".program);"),$e.shader.program)K(Ne,st,$e,$e.shader.program);else{st(Ne.shared.vao,".setVAO(null);");var Bt=Ne.global.def("{}"),Ft=st.def(It,".id"),Ut=st.def(Bt,"[",Ft,"]");st(Ne.cond(Ut).then(Ut,".call(this,a0);").else(Ut,"=",Bt,"[",Ft,"]=",Ne.link(function(zt){return O(K,Ne,$e,zt,1)}),"(",It,");",Ut,".call(this,a0);"))}Object.keys($e.state).length>0&&st(Ne.shared.current,".dirty=true;"),Ne.shared.vao&&st(Ne.shared.vao,".setVAO(null);")}function ne(Ne,$e,st,It){Ne.batchId="a1",ol(Ne,$e);function Bt(){return!0}Y(Ne,$e,st,It.attributes,Bt),D(Ne,$e,st,It.uniforms,Bt,!1),J(Ne,$e,$e,st)}function we(Ne,$e,st,It){ol(Ne,$e);var Bt=st.contextDep,Ft=$e.def(),Ut="a0",zt="a1",_t=$e.def();Ne.shared.props=_t,Ne.batchId=Ft;var Dt=Ne.scope(),vt=Ne.scope();$e(Dt.entry,"for(",Ft,"=0;",Ft,"<",zt,";++",Ft,"){",_t,"=",Ut,"[",Ft,"];",vt,"}",Dt.exit);function lr(gn){return gn.contextDep&&Bt||gn.propDep}function _r(gn){return!lr(gn)}if(st.needsContext&&ss(Ne,vt,st.context),st.needsFramebuffer&&Vs(Ne,vt,st.framebuffer),wa(Ne,vt,st.state,lr),st.profile&&lr(st.profile)&&io(Ne,vt,st,!1,!0),It)st.useVAO?st.drawVAO?lr(st.drawVAO)?vt(Ne.shared.vao,".setVAO(",st.drawVAO.append(Ne,vt),");"):Dt(Ne.shared.vao,".setVAO(",st.drawVAO.append(Ne,Dt),");"):Dt(Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"):(Dt(Ne.shared.vao,".setVAO(null);"),Y(Ne,Dt,st,It.attributes,_r),Y(Ne,vt,st,It.attributes,lr)),D(Ne,Dt,st,It.uniforms,_r,!1),D(Ne,vt,st,It.uniforms,lr,!0),J(Ne,Dt,vt,st);else{var Br=Ne.global.def("{}"),Di=st.shader.progVar.append(Ne,vt),ci=vt.def(Di,".id"),bi=vt.def(Br,"[",ci,"]");vt(Ne.shared.gl,".useProgram(",Di,".program);","if(!",bi,"){",bi,"=",Br,"[",ci,"]=",Ne.link(function(gn){return O(ne,Ne,st,gn,2)}),"(",Di,");}",bi,".call(this,a0[",Ft,"],",Ft,");")}}function Oe(Ne,$e){var st=Ne.proc("batch",2);Ne.batchId="0",ol(Ne,st);var It=!1,Bt=!0;Object.keys($e.context).forEach(function(Br){It=It||$e.context[Br].propDep}),It||(ss(Ne,st,$e.context),Bt=!1);var Ft=$e.framebuffer,Ut=!1;Ft?(Ft.propDep?It=Ut=!0:Ft.contextDep&&It&&(Ut=!0),Ut||Vs(Ne,st,Ft)):Vs(Ne,st,null),$e.state.viewport&&$e.state.viewport.propDep&&(It=!0);function zt(Br){return Br.contextDep&&It||Br.propDep}Ys(Ne,st,$e),wa(Ne,st,$e.state,function(Br){return!zt(Br)}),(!$e.profile||!zt($e.profile))&&io(Ne,st,$e,!1,"a1"),$e.contextDep=It,$e.needsContext=Bt,$e.needsFramebuffer=Ut;var _t=$e.shader.progVar;if(_t.contextDep&&It||_t.propDep)we(Ne,st,$e,null);else{var Dt=_t.append(Ne,st);if(st(Ne.shared.gl,".useProgram(",Dt,".program);"),$e.shader.program)we(Ne,st,$e,$e.shader.program);else{st(Ne.shared.vao,".setVAO(null);");var vt=Ne.global.def("{}"),lr=st.def(Dt,".id"),_r=st.def(vt,"[",lr,"]");st(Ne.cond(_r).then(_r,".call(this,a0,a1);").else(_r,"=",vt,"[",lr,"]=",Ne.link(function(Br){return O(we,Ne,$e,Br,2)}),"(",Dt,");",_r,".call(this,a0,a1);"))}}Object.keys($e.state).length>0&&st(Ne.shared.current,".dirty=true;"),Ne.shared.vao&&st(Ne.shared.vao,".setVAO(null);")}function ht(Ne,$e){var st=Ne.proc("scope",3);Ne.batchId="a2";var It=Ne.shared,Bt=It.current;if(ss(Ne,st,$e.context),$e.framebuffer&&$e.framebuffer.append(Ne,st),Ti(Object.keys($e.state)).forEach(function(zt){var _t=$e.state[zt],Dt=_t.append(Ne,st);En(Dt)?Dt.forEach(function(vt,lr){pn(vt)?st.set(Ne.next[zt],"["+lr+"]",vt):st.set(Ne.next[zt],"["+lr+"]",Ne.link(vt,{stable:!0}))}):Pn(_t)?st.set(It.next,"."+zt,Ne.link(Dt,{stable:!0})):st.set(It.next,"."+zt,Dt)}),io(Ne,st,$e,!0,!0),[Mt,yr,$t,Cr,Jt].forEach(function(zt){var _t=$e.draw[zt];if(_t){var Dt=_t.append(Ne,st);pn(Dt)?st.set(It.draw,"."+zt,Dt):st.set(It.draw,"."+zt,Ne.link(Dt),{stable:!0})}}),Object.keys($e.uniforms).forEach(function(zt){var _t=$e.uniforms[zt].append(Ne,st);Array.isArray(_t)&&(_t="["+_t.map(function(Dt){return pn(Dt)?Dt:Ne.link(Dt,{stable:!0})})+"]"),st.set(It.uniforms,"["+Ne.link(bt.id(zt),{stable:!0})+"]",_t)}),Object.keys($e.attributes).forEach(function(zt){var _t=$e.attributes[zt].append(Ne,st),Dt=Ne.scopeAttrib(zt);Object.keys(new Zr).forEach(function(vt){st.set(Dt,"."+vt,_t[vt])})}),$e.scopeVAO){var Ft=$e.scopeVAO.append(Ne,st);pn(Ft)?st.set(It.vao,".targetVAO",Ft):st.set(It.vao,".targetVAO",Ne.link(Ft,{stable:!0}))}function Ut(zt){var _t=$e.shader[zt];if(_t){var Dt=_t.append(Ne,st);pn(Dt)?st.set(It.shader,"."+zt,Dt):st.set(It.shader,"."+zt,Ne.link(Dt,{stable:!0}))}}Ut(Ze),Ut(ut),Object.keys($e.state).length>0&&(st(Bt,".dirty=true;"),st.exit(Bt,".dirty=true;")),st("a1(",Ne.shared.context,",a0,",Ne.batchId,");")}function Yt(Ne){if(!(typeof Ne!="object"||En(Ne))){for(var $e=Object.keys(Ne),st=0;st<$e.length;++st)if(h.isDynamic(Ne[$e[st]]))return!0;return!1}}function cr(Ne,$e,st){var It=$e.static[st];if(!It||!Yt(It))return;var Bt=Ne.global,Ft=Object.keys(It),Ut=!1,zt=!1,_t=!1,Dt=Ne.global.def("{}");Ft.forEach(function(lr){var _r=It[lr];if(h.isDynamic(_r)){typeof _r=="function"&&(_r=It[lr]=h.unbox(_r));var Br=Bn(_r,null);Ut=Ut||Br.thisDep,_t=_t||Br.propDep,zt=zt||Br.contextDep}else{switch(Bt(Dt,".",lr,"="),typeof _r){case"number":Bt(_r);break;case"string":Bt('"',_r,'"');break;case"object":Array.isArray(_r)&&Bt("[",_r.join(),"]");break;default:Bt(Ne.link(_r));break}Bt(";")}});function vt(lr,_r){Ft.forEach(function(Br){var Di=It[Br];if(h.isDynamic(Di)){var ci=lr.invoke(_r,Di);_r(Dt,".",Br,"=",ci,";")}})}$e.dynamic[st]=new h.DynamicVariable(Zo,{thisDep:Ut,contextDep:zt,propDep:_t,ref:Dt,append:vt}),delete $e.static[st]}function Nt(Ne,$e,st,It,Bt){var Ft=Cn();Ft.stats=Ft.link(Bt),Object.keys($e.static).forEach(function(zt){cr(Ft,$e,zt)}),fr.forEach(function(zt){cr(Ft,Ne,zt)});var Ut=Vl(Ne,$e,st,It,Ft);return Ut.shader.program&&(Ut.shader.program.attributes.sort(function(zt,_t){return zt.name<_t.name?-1:1}),Ut.shader.program.uniforms.sort(function(zt,_t){return zt.name<_t.name?-1:1})),de(Ft,Ut),ht(Ft,Ut),Oe(Ft,Ut),e(Ft.compile(),{destroy:function(){Ut.shader.program.destroy()}})}return{next:qn,current:Xi,procs:function(){var Ne=Cn(),$e=Ne.proc("poll"),st=Ne.proc("refresh"),It=Ne.block();$e(It),st(It);var Bt=Ne.shared,Ft=Bt.gl,Ut=Bt.next,zt=Bt.current;It(zt,".dirty=false;"),Vs(Ne,$e),Vs(Ne,st,null,!0);var _t;Ii&&(_t=Ne.link(Ii)),Ot.oes_vertex_array_object&&st(Ne.link(Ot.oes_vertex_array_object),".bindVertexArrayOES(null);");var Dt=st.def(Bt.attributes),vt=st.def(0),lr=Ne.cond(vt,".buffer");lr.then(Ft,".enableVertexAttribArray(i);",Ft,".bindBuffer(",br,",",vt,".buffer.buffer);",Ft,".vertexAttribPointer(i,",vt,".size,",vt,".type,",vt,".normalized,",vt,".stride,",vt,".offset);").else(Ft,".disableVertexAttribArray(i);",Ft,".vertexAttrib4f(i,",vt,".x,",vt,".y,",vt,".z,",vt,".w);",vt,".buffer=null;");var _r=Ne.link(Lr.maxAttributes,{stable:!0});return st("for(var i=0;i<",_r,";++i){",vt,"=",Dt,"[i];",lr,"}"),Ii&&st("for(var i=0;i<",_r,";++i){",_t,".vertexAttribDivisorANGLE(i,",Dt,"[i].divisor);","}"),st(Ne.shared.vao,".currentVAO=null;",Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"),Object.keys(si).forEach(function(Br){var Di=si[Br],ci=It.def(Ut,".",Br),bi=Ne.block();bi("if(",ci,"){",Ft,".enable(",Di,")}else{",Ft,".disable(",Di,")}",zt,".",Br,"=",ci,";"),st(bi),$e("if(",ci,"!==",zt,".",Br,"){",bi,"}")}),Object.keys(mn).forEach(function(Br){var Di=mn[Br],ci=Xi[Br],bi,gn,tn=Ne.block();if(tn(Ft,".",Di,"("),En(ci)){var Ei=ci.length;bi=Ne.global.def(Ut,".",Br),gn=Ne.global.def(zt,".",Br),tn(S(Ei,function(Oi){return bi+"["+Oi+"]"}),");",S(Ei,function(Oi){return gn+"["+Oi+"]="+bi+"["+Oi+"];"}).join("")),$e("if(",S(Ei,function(Oi){return bi+"["+Oi+"]!=="+gn+"["+Oi+"]"}).join("||"),"){",tn,"}")}else bi=It.def(Ut,".",Br),gn=It.def(zt,".",Br),tn(bi,");",zt,".",Br,"=",bi,";"),$e("if(",bi,"!==",gn,"){",tn,"}");st(tn)}),Ne.compile()}(),compile:Nt}}function Ia(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var yo=34918,Da=34919,go=35007,Is=function(Me,bt){if(!bt.ext_disjoint_timer_query)return null;var Ot=[];function Lr(){return Ot.pop()||bt.ext_disjoint_timer_query.createQueryEXT()}function Vr(yi){Ot.push(yi)}var Or=[];function Nr(yi){var Ii=Lr();bt.ext_disjoint_timer_query.beginQueryEXT(go,Ii),Or.push(Ii),ji(Or.length-1,Or.length,yi)}function vi(){bt.ext_disjoint_timer_query.endQueryEXT(go)}function Ni(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var qi=[];function Si(){return qi.pop()||new Ni}function Vn(yi){qi.push(yi)}var Qi=[];function ji(yi,Ii,ui){var nn=Si();nn.startQueryIndex=yi,nn.endQueryIndex=Ii,nn.sum=0,nn.stats=ui,Qi.push(nn)}var oi=[],Tr=[];function Zr(){var yi,Ii,ui=Or.length;if(ui!==0){Tr.length=Math.max(Tr.length,ui+1),oi.length=Math.max(oi.length,ui+1),oi[0]=0,Tr[0]=0;var nn=0;for(yi=0,Ii=0;Ii=0;--O){var K=Nn[O];K&&K(oi,null,0)}Ot.flush(),Si&&Si.update()}function ba(){!ia&&Nn.length>0&&(ia=d.next(sa))}function is(){ia&&(d.cancel(sa),ia=null)}function Zs(O){O.preventDefault(),Vr=!0,is(),aa.forEach(function(K){K()})}function Ga(O){Ot.getError(),Vr=!1,Or.restore(),qn.restore(),Ii.restore(),fi.restore(),si.restore(),mn.restore(),nn.restore(),Si&&Si.restore(),Ji.procs.refresh(),ba(),Ki.forEach(function(K){K()})}pn&&(pn.addEventListener(Fo,Zs,!1),pn.addEventListener(Uo,Ga,!1));function Ml(){Nn.length=0,is(),pn&&(pn.removeEventListener(Fo,Zs),pn.removeEventListener(Uo,Ga)),qn.clear(),mn.clear(),si.clear(),nn.clear(),fi.clear(),ui.clear(),Ii.clear(),Si&&Si.clear(),Cn.forEach(function(O){O()})}function zo(O){function K(Ft){var Ut=e({},Ft);delete Ut.uniforms,delete Ut.attributes,delete Ut.context,delete Ut.vao,"stencil"in Ut&&Ut.stencil.op&&(Ut.stencil.opBack=Ut.stencil.opFront=Ut.stencil.op,delete Ut.stencil.op);function zt(_t){if(_t in Ut){var Dt=Ut[_t];delete Ut[_t],Object.keys(Dt).forEach(function(vt){Ut[_t+"."+vt]=Dt[vt]})}}return zt("blend"),zt("depth"),zt("cull"),zt("stencil"),zt("polygonOffset"),zt("scissor"),zt("sample"),"vao"in Ft&&(Ut.vao=Ft.vao),Ut}function de(Ft,Ut){var zt={},_t={};return Object.keys(Ft).forEach(function(Dt){var vt=Ft[Dt];if(h.isDynamic(vt)){_t[Dt]=h.unbox(vt,Dt);return}else if(Ut&&Array.isArray(vt)){for(var lr=0;lr0)return Ne.call(this,It(Ft|0),Ft|0)}else if(Array.isArray(Ft)){if(Ft.length)return Ne.call(this,Ft,Ft.length)}else return Nt.call(this,Ft)}return e(Bt,{stats:Yt,destroy:function(){cr.destroy()}})}var Qs=mn.setFBO=zo({framebuffer:h.define.call(null,$s,"framebuffer")});function al(O,K){var de=0;Ji.procs.poll();var ne=K.color;ne&&(Ot.clearColor(+ne[0]||0,+ne[1]||0,+ne[2]||0,+ne[3]||0),de|=Ms),"depth"in K&&(Ot.clearDepth(+K.depth),de|=Xs),"stencil"in K&&(Ot.clearStencil(K.stencil|0),de|=Un),Ot.clear(de)}function Vl(O){if("framebuffer"in O)if(O.framebuffer&&O.framebuffer_reglType==="framebufferCube")for(var K=0;K<6;++K)Qs(e({framebuffer:O.framebuffer.faces[K]},O),al);else Qs(O,al);else al(null,O)}function ss(O){Nn.push(O);function K(){var de=dl(Nn,O);function ne(){var we=dl(Nn,ne);Nn[we]=Nn[Nn.length-1],Nn.length-=1,Nn.length<=0&&is()}Nn[de]=ne}return ba(),{cancel:K}}function Vs(){var O=Bi.viewport,K=Bi.scissor_box;O[0]=O[1]=K[0]=K[1]=0,oi.viewportWidth=oi.framebufferWidth=oi.drawingBufferWidth=O[2]=K[2]=Ot.drawingBufferWidth,oi.viewportHeight=oi.framebufferHeight=oi.drawingBufferHeight=O[3]=K[3]=Ot.drawingBufferHeight}function Ys(){oi.tick+=1,oi.time=ol(),Vs(),Ji.procs.poll()}function wa(){fi.refresh(),Vs(),Ji.procs.refresh(),Si&&Si.update()}function ol(){return(v()-Vn)/1e3}wa();function io(O,K){var de;switch(O){case"frame":return ss(K);case"lost":de=aa;break;case"restore":de=Ki;break;case"destroy":de=Cn;break;default:}return de.push(K),{cancel:function(){for(var ne=0;ne=0},read:Ui,destroy:Ml,_gl:Ot,_refresh:wa,poll:function(){Ys(),Si&&Si.update()},now:ol,stats:vi,getCachedCode:Y,preloadCachedCode:D});return bt.onDone(null,J),J}return Sc})});var eBe=ye((S_r,QOe)=>{"use strict";var SUt=ty();QOe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},JOe(t)?t={container:t}:MUt(t)?t={container:t}:EUt(t)?t={gl:t}:t=SUt(t,{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),t.pixelRatio||(t.pixelRatio=window.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(typeof t.container=="string"){var r=document.querySelector(t.container);if(!r)throw Error("Element "+t.container+" is not found");t.container=r}JOe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=$Oe(),t.container.appendChild(t.canvas),KOe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=$Oe(),t.container.appendChild(t.canvas),KOe(t);else throw Error("Not DOM environment. Use headless-gl.");return t.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{t.gl=t.canvas.getContext(n,t.attrs)}catch(i){}return t.gl}),t.gl};function KOe(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function JOe(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function MUt(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function EUt(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function $Oe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var rBe=ye((M_r,tBe)=>{"use strict";var kUt=lK(),CUt=[32,126];tBe.exports=LUt;function LUt(e){e=e||{};var t=e.shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],r=e.canvas||document.createElement("canvas"),n=e.font,i=typeof e.step=="number"?[e.step,e.step]:e.step||[32,32],a=e.chars||CUt;if(n&&typeof n!="string"&&(n=kUt(n)),!Array.isArray(a))a=String(a).split("");else if(a.length===2&&typeof a[0]=="number"&&typeof a[1]=="number"){for(var o=[],s=a[0],l=0;s<=a[1];s++)o[l++]=String.fromCharCode(s);a=o}t=t.slice(),r.width=t[0],r.height=t[1];var u=r.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,r.width,r.height),u.font=n,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";for(var c=i[0]/2,f=i[1]/2,s=0;st[0]-i[0]/2&&(c=i[0]/2,f+=i[1]);return r}});var hK=ye(Vh=>{"use strict";"use restrict";var fK=32;Vh.INT_BITS=fK;Vh.INT_MAX=2147483647;Vh.INT_MIN=-1<0)-(e<0)};Vh.abs=function(e){var t=e>>fK-1;return(e^t)-t};Vh.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1};Vh.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0};Vh.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function iBe(e){var t=32;return e&=-e,e&&t--,e&65535&&(t-=16),e&16711935&&(t-=8),e&252645135&&(t-=4),e&858993459&&(t-=2),e&1431655765&&(t-=1),t}Vh.countTrailingZeros=iBe;Vh.nextPow2=function(e){return e+=e===0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1};Vh.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};Vh.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var Fk=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=r&1,--i;e[t]=n<>>8&255]<<16|Fk[e>>>16&255]<<8|Fk[e>>>24&255]};Vh.interleave2=function(e,t){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t&=65535,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1};Vh.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};Vh.interleave3=function(e,t,r){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|=t<<1,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|r<<2};Vh.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};Vh.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>iBe(e)+1}});var oBe=ye((k_r,aBe)=>{"use strict";function nBe(e,t,r){var n=e[r]|0;if(n<=0)return[];var i=new Array(n),a;if(r===e.length-1)for(a=0;a0)return PUt(e|0,t);break;case"object":if(typeof e.length=="number")return nBe(e,t,0);break}return[]}aBe.exports=IUt});var bBe=ye(mu=>{"use strict";var bx=hK(),Ev=oBe(),sBe=b2().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Ev([32,0]),UINT16:Ev([32,0]),UINT32:Ev([32,0]),BIGUINT64:Ev([32,0]),INT8:Ev([32,0]),INT16:Ev([32,0]),INT32:Ev([32,0]),BIGINT64:Ev([32,0]),FLOAT:Ev([32,0]),DOUBLE:Ev([32,0]),DATA:Ev([32,0]),UINT8C:Ev([32,0]),BUFFER:Ev([32,0])});var RUt=typeof Uint8ClampedArray!="undefined",DUt=typeof BigUint64Array!="undefined",FUt=typeof BigInt64Array!="undefined",ad=window.__TYPEDARRAY_POOL;ad.UINT8C||(ad.UINT8C=Ev([32,0]));ad.BIGUINT64||(ad.BIGUINT64=Ev([32,0]));ad.BIGINT64||(ad.BIGINT64=Ev([32,0]));ad.BUFFER||(ad.BUFFER=Ev([32,0]));var Sz=ad.DATA,Mz=ad.BUFFER;mu.free=function(t){if(sBe.isBuffer(t))Mz[bx.log2(t.length)].push(t);else{if(Object.prototype.toString.call(t)!=="[object ArrayBuffer]"&&(t=t.buffer),!t)return;var r=t.length||t.byteLength,n=bx.log2(r)|0;Sz[n].push(t)}};function lBe(e){if(e){var t=e.length||e.byteLength,r=bx.log2(t);Sz[r].push(e)}}function zUt(e){lBe(e.buffer)}mu.freeUint8=mu.freeUint16=mu.freeUint32=mu.freeBigUint64=mu.freeInt8=mu.freeInt16=mu.freeInt32=mu.freeBigInt64=mu.freeFloat32=mu.freeFloat=mu.freeFloat64=mu.freeDouble=mu.freeUint8Clamped=mu.freeDataView=zUt;mu.freeArrayBuffer=lBe;mu.freeBuffer=function(t){Mz[bx.log2(t.length)].push(t)};mu.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return Bp(t);switch(r){case"uint8":return dK(t);case"uint16":return uBe(t);case"uint32":return cBe(t);case"int8":return fBe(t);case"int16":return hBe(t);case"int32":return dBe(t);case"float":case"float32":return vBe(t);case"double":case"float64":return pBe(t);case"uint8_clamped":return gBe(t);case"bigint64":return yBe(t);case"biguint64":return mBe(t);case"buffer":return xBe(t);case"data":case"dataview":return _Be(t);default:return null}return null};function Bp(t){var t=bx.nextPow2(t),r=bx.log2(t),n=Sz[r];return n.length>0?n.pop():new ArrayBuffer(t)}mu.mallocArrayBuffer=Bp;function dK(e){return new Uint8Array(Bp(e),0,e)}mu.mallocUint8=dK;function uBe(e){return new Uint16Array(Bp(2*e),0,e)}mu.mallocUint16=uBe;function cBe(e){return new Uint32Array(Bp(4*e),0,e)}mu.mallocUint32=cBe;function fBe(e){return new Int8Array(Bp(e),0,e)}mu.mallocInt8=fBe;function hBe(e){return new Int16Array(Bp(2*e),0,e)}mu.mallocInt16=hBe;function dBe(e){return new Int32Array(Bp(4*e),0,e)}mu.mallocInt32=dBe;function vBe(e){return new Float32Array(Bp(4*e),0,e)}mu.mallocFloat32=mu.mallocFloat=vBe;function pBe(e){return new Float64Array(Bp(8*e),0,e)}mu.mallocFloat64=mu.mallocDouble=pBe;function gBe(e){return RUt?new Uint8ClampedArray(Bp(e),0,e):dK(e)}mu.mallocUint8Clamped=gBe;function mBe(e){return DUt?new BigUint64Array(Bp(8*e),0,e):null}mu.mallocBigUint64=mBe;function yBe(e){return FUt?new BigInt64Array(Bp(8*e),0,e):null}mu.mallocBigInt64=yBe;function _Be(e){return new DataView(Bp(e),0,e)}mu.mallocDataView=_Be;function xBe(e){e=bx.nextPow2(e);var t=bx.log2(e),r=Mz[t];return r.length>0?r.pop():new sBe(e)}mu.mallocBuffer=xBe;mu.clearCache=function(){for(var t=0;t<32;++t)ad.UINT8[t].length=0,ad.UINT16[t].length=0,ad.UINT32[t].length=0,ad.INT8[t].length=0,ad.INT16[t].length=0,ad.INT32[t].length=0,ad.FLOAT[t].length=0,ad.DOUBLE[t].length=0,ad.BIGUINT64[t].length=0,ad.BIGINT64[t].length=0,ad.UINT8C[t].length=0,Sz[t].length=0,Mz[t].length=0}});var TBe=ye((L_r,wBe)=>{"use strict";var qUt=Object.prototype.toString;wBe.exports=function(e){var t;return qUt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var vK=ye((P_r,ABe)=>{ABe.exports=function(t,r){r||(r=[0,""]),t=String(t);var n=parseFloat(t,10);return r[0]=n,r[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}});var EBe=ye((I_r,MBe)=>{"use strict";var OUt=vK();MBe.exports=SBe;var zk=96;function pK(e,t){var r=OUt(getComputedStyle(e).getPropertyValue(t));return r[0]*SBe(r[1],e)}function BUt(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=pK(r,"font-size")/128;return t.removeChild(r),n}function SBe(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return BUt(e,t);case"em":return pK(t,"font-size");case"rem":return pK(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return zk;case"cm":return zk/2.54;case"mm":return zk/25.4;case"pt":return zk/72;case"pc":return zk/6}return 1}});var LBe=ye((R_r,CBe)=>{"use strict";CBe.exports=Cz;var NUt=Cz.canvas=document.createElement("canvas"),Ez=NUt.getContext("2d"),kBe=kz([32,126]);Cz.createPairs=kz;Cz.ascii=kBe;function Cz(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},n,i=16,a=.05;t&&(t.length===2&&typeof t[0]=="number"?n=kz(t):Array.isArray(t)?n=t:(t.o?n=kz(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(i=t.fontSize),t.threshold!=null&&(a=t.threshold))),n||(n=kBe),Ez.font=i+"px "+e;for(var o=0;oi*a){var c=(u-l)/i;r[s]=c*1e3}}return r}function kz(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i{"use strict";RBe.exports=wx;wx.canvas=document.createElement("canvas");wx.cache={};function wx(o,t){t||(t={}),(typeof o=="string"||Array.isArray(o))&&(t.family=o);var r=Array.isArray(t.family)?t.family.join(", "):t.family;if(!r)throw Error("`family` must be defined");var n=t.size||t.fontSize||t.em||48,i=t.weight||t.fontWeight||"",a=t.style||t.fontStyle||"",o=[a,i,n].join(" ")+"px "+r,s=t.origin||"top";if(wx.cache[r]&&n<=wx.cache[r].em)return PBe(wx.cache[r],s);var l=t.canvas||wx.canvas,u=l.getContext("2d"),c={upper:t.upper!==void 0?t.upper:"H",lower:t.lower!==void 0?t.lower:"x",descent:t.descent!==void 0?t.descent:"p",ascent:t.ascent!==void 0?t.ascent:"h",tittle:t.tittle!==void 0?t.tittle:"i",overshoot:t.overshoot!==void 0?t.overshoot:"O"},f=Math.ceil(n*1.5);l.height=f,l.width=f*.5,u.font=o;var h="H",d={top:0};u.clearRect(0,0,f,f),u.textBaseline="top",u.fillStyle="black",u.fillText(h,0,0);var v=iy(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline="bottom",u.fillText(h,0,f);var m=iy(u.getImageData(0,0,f,f));d.lineHeight=d.bottom=f-m+v,u.clearRect(0,0,f,f),u.textBaseline="alphabetic",u.fillText(h,0,f);var b=iy(u.getImageData(0,0,f,f)),p=f-b-1+v;d.baseline=d.alphabetic=p,u.clearRect(0,0,f,f),u.textBaseline="middle",u.fillText(h,0,f*.5);var k=iy(u.getImageData(0,0,f,f));d.median=d.middle=f-k-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline="hanging",u.fillText(h,0,f*.5);var M=iy(u.getImageData(0,0,f,f));d.hanging=f-M-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline="ideographic",u.fillText(h,0,f);var T=iy(u.getImageData(0,0,f,f));if(d.ideographic=f-T-1+v,c.upper&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.upper,0,0),d.upper=iy(u.getImageData(0,0,f,f)),d.capHeight=d.baseline-d.upper),c.lower&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.lower,0,0),d.lower=iy(u.getImageData(0,0,f,f)),d.xHeight=d.baseline-d.lower),c.tittle&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.tittle,0,0),d.tittle=iy(u.getImageData(0,0,f,f))),c.ascent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.ascent,0,0),d.ascent=iy(u.getImageData(0,0,f,f))),c.descent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.descent,0,0),d.descent=IBe(u.getImageData(0,0,f,f))),c.overshoot){u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.overshoot,0,0);var L=IBe(u.getImageData(0,0,f,f));d.overshoot=L-p}for(var x in d)d[x]/=n;return d.em=n,wx.cache[r]=d,PBe(d,s)}function PBe(e,t){var r={};typeof t=="string"&&(t=e[t]);for(var n in e)n!=="em"&&(r[n]=e[n]-t);return r}function iy(e){for(var t=e.height,r=e.data,n=3;n0;n-=4)if(r[n]!==0)return Math.floor((n-3)*.25/t)}});var OBe=ye((F_r,qBe)=>{"use strict";var x5=ZOe(),UUt=ty(),VUt=YOe(),GUt=eBe(),HUt=ZY(),gK=sx(),jUt=rBe(),Tx=bBe(),WUt=l5(),XUt=TBe(),ZUt=vK(),YUt=EBe(),KUt=LBe(),JUt=Nh(),$Ut=DBe(),QUt=aw(),eVt=hK(),FBe=eVt.nextPow2,zBe=new HUt,Pz=!1;document.body&&(Lz=document.body.appendChild(document.createElement("div")),Lz.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(Lz).fontStretch&&(Pz=!0),document.body.removeChild(Lz));var Lz,xc=function(t){tVt(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=GUt(t),this.shader=zBe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||VUt({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(),zBe.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(XUt(t)?t:{})};xc.prototype.createShader=function(){var t=this.regl,r=t({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:t.prop("count"),offset:t.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this("sizeBuffer")},width:{offset:0,stride:8,buffer:t.this("sizeBuffer")},char:t.this("charBuffer"),position:t.this("position")},uniforms:{atlasSize:function(i,a){return[a.atlas.width,a.atlas.height]},atlasDim:function(i,a){return[a.atlas.cols,a.atlas.rows]},atlas:function(i,a){return a.atlas.texture},charStep:function(i,a){return a.atlas.step},em:function(i,a){return a.atlas.em},color:t.prop("color"),opacity:t.prop("opacity"),viewport:t.this("viewportArray"),scale:t.this("scale"),align:t.prop("align"),baseline:t.prop("baseline"),translate:t.this("translate"),positionOffset:t.prop("positionOffset")},primitive:"points",viewport:t.this("viewport"),vert:` + precision highp float; + attribute float width, charOffset, char; + attribute vec2 position; + uniform float fontSize, charStep, em, align, baseline; + uniform vec4 viewport; + uniform vec4 color; + uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset; + varying vec2 charCoord, charId; + varying float charWidth; + varying vec4 fontColor; + void main () { + vec2 offset = floor(em * (vec2(align + charOffset, baseline) + + vec2(positionOffset.x, -positionOffset.y))) + / (viewport.zw * scale.xy); + + vec2 position = (position + translate) * scale; + position += offset * scale; + + charCoord = position * viewport.zw + viewport.xy; + + gl_Position = vec4(position * 2. - 1., 0, 1); + + gl_PointSize = charStep; + + charId.x = mod(char, atlasDim.x); + charId.y = floor(char / atlasDim.x); + + charWidth = width * em; + + fontColor = color / 255.; + }`,frag:` + precision highp float; + uniform float fontSize, charStep, opacity; + uniform vec2 atlasSize; + uniform vec4 viewport; + uniform sampler2D atlas; + varying vec4 fontColor; + varying vec2 charCoord, charId; + varying float charWidth; + + float lightness(vec4 color) { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + void main () { + vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5; + float halfCharStep = floor(charStep * .5 + .5); + + // invert y and shift by 1px (FF expecially needs that) + uv.y = charStep - uv.y; + + // ignore points outside of character bounding box + float halfCharWidth = ceil(charWidth * .5); + if (floor(uv.x) > halfCharStep + halfCharWidth || + floor(uv.x) < halfCharStep - halfCharWidth) return; + + uv += charId * charStep; + uv = uv / atlasSize; + + vec4 color = fontColor; + vec4 mask = texture2D(atlas, uv); + + float maskY = lightness(mask); + // float colorY = lightness(color); + color.a *= maskY; + color.a *= opacity; + + // color.a += .1; + + // antialiasing, see yiq color space y-channel formula + // color.rgb += (1. - color.rgb) * (1. - mask.rgb); + + gl_FragColor = color; + }`}),n={};return{regl:t,draw:r,atlas:n}};xc.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=UUt(t,{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),t.opacity!=null&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(Ce){return parseFloat(Ce)}):this.opacity=parseFloat(t.opacity)),t.viewport!=null&&(this.viewport=WUt(t.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]),t.kerning!=null&&(this.kerning=t.kerning),t.offset!=null&&(typeof t.offset=="number"&&(t.offset=[t.offset,0]),this.positionOffset=QUt(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!t.font&&(t.font=xc.baseFontSize+"px sans-serif");var n=!1,i=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(Ce,ge){if(typeof Ce=="string")try{Ce=x5.parse(Ce)}catch(He){Ce=x5.parse(xc.baseFontSize+"px "+Ce)}else{var re=Ce.style,Se=Ce.weight,ke=Ce.stretch,be=Ce.variant;Ce=x5.parse(x5.stringify(Ce)),re&&(Ce.style=re),Se&&(Ce.weight=Se),ke&&(Ce.stretch=ke),be&&(Ce.variant=be)}var Be=x5.stringify({size:xc.baseFontSize,family:Ce.family,stretch:Pz?Ce.stretch:void 0,variant:Ce.variant,weight:Ce.weight,style:Ce.style}),Le=ZUt(Ce.size),me=Math.round(Le[0]*YUt(Le[1]));if(me!==r.fontSize[ge]&&(i=!0,r.fontSize[ge]=me),(!r.font[ge]||Be!=r.font[ge].baseString)&&(n=!0,r.font[ge]=xc.fonts[Be],!r.font[ge])){var Pe=Ce.family.join(", "),ce=[Ce.style];Ce.style!=Ce.variant&&ce.push(Ce.variant),Ce.variant!=Ce.weight&&ce.push(Ce.weight),Pz&&Ce.weight!=Ce.stretch&&ce.push(Ce.stretch),r.font[ge]={baseString:Be,family:Pe,weight:Ce.weight,stretch:Ce.stretch,style:Ce.style,variant:Ce.variant,width:{},kerning:{},metrics:$Ut(Pe,{origin:"top",fontSize:xc.baseFontSize,fontStyle:ce.join(" ")})},xc.fonts[Be]=r.font[ge]}}),(n||i)&&this.font.forEach(function(Ce,ge){var re=x5.stringify({size:r.fontSize[ge],family:Ce.family,stretch:Pz?Ce.stretch:void 0,variant:Ce.variant,weight:Ce.weight,style:Ce.style});if(r.fontAtlas[ge]=r.shader.atlas[re],!r.fontAtlas[ge]){var Se=Ce.metrics;r.shader.atlas[re]=r.fontAtlas[ge]={fontString:re,step:Math.ceil(r.fontSize[ge]*Se.bottom*.5)*2,em:r.fontSize[ge],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:r.regl.texture()}}t.text==null&&(t.text=r.text)}),typeof t.text=="string"&&t.position&&t.position.length>2){for(var a=Array(t.position.length*.5),o=0;o2){for(var u=!t.position[0].length,c=Tx.mallocFloat(this.count*2),f=0,h=0;f1?r.align[ge]:r.align[0]:r.align;if(typeof re=="number")return re;switch(re){case"right":case"end":return-Ce;case"center":case"centre":case"middle":return-Ce*.5}return 0})),this.baseline==null&&t.baseline==null&&(t.baseline=0),t.baseline!=null&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(Ce,ge){var re=(r.font[ge]||r.font[0]).metrics,Se=0;return Se+=re.bottom*.5,typeof Ce=="number"?Se+=Ce-re.baseline:Se+=-re[Ce],Se*=-1,Se})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=gK(t.color,"uint8");else{var G;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var Z=t.color.length;G=Tx.mallocUint8(Z);for(var j=(t.color.subarray||t.color.slice).bind(t.color),N=0;N4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(ae){var _e=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(_e);for(var Ee=0;Ee1?this.counts[Ee]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Ee]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Ee*4,Ee*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Ee]:this.opacity,baseline:this.baselineOffset[Ee]!=null?this.baselineOffset[Ee]:this.baselineOffset[0],align:this.align?this.alignOffset[Ee]!=null?this.alignOffset[Ee]:this.alignOffset[0]:0,atlas:this.fontAtlas[Ee]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Ee*2,Ee*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=[]}};xc.prototype.destroy=function(){};xc.prototype.kerning=!0;xc.prototype.position={constant:new Float32Array(2)};xc.prototype.translate=null;xc.prototype.scale=null;xc.prototype.font=null;xc.prototype.text="";xc.prototype.positionOffset=[0,0];xc.prototype.opacity=1;xc.prototype.color=new Uint8Array([0,0,0,255]);xc.prototype.alignOffset=[0,0];xc.maxAtlasSize=1024;xc.atlasCanvas=document.createElement("canvas");xc.atlasContext=xc.atlasCanvas.getContext("2d",{alpha:!1});xc.baseFontSize=64;xc.fonts={};function tVt(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}qBe.exports=xc});var BBe=ye((mK,yK)=>{(function(e,t){typeof mK=="object"&&typeof yK!="undefined"?yK.exports=t():e.createREGL=t()})(mK,function(){"use strict";var e=function(Me,bt){for(var Ot=Object.keys(bt),Lr=0;Lr1&&bt===Ot&&(bt==='"'||bt==="'"))return['"'+o(Me.substr(1,Me.length-2))+'"'];var Lr=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Me);if(Lr)return s(Me.substr(0,Lr.index)).concat(s(Lr[1])).concat(s(Me.substr(Lr.index+Lr[0].length)));var Vr=Me.split(".");if(Vr.length===1)return['"'+o(Me)+'"'];for(var Or=[],Nr=0;Nr65535)<<4,Me>>>=bt,Ot=(Me>255)<<3,Me>>>=Ot,bt|=Ot,Ot=(Me>15)<<2,Me>>>=Ot,bt|=Ot,Ot=(Me>3)<<1,Me>>>=Ot,bt|=Ot,bt|Me>>1}function N(){var Me=S(8,function(){return[]});function bt(Or){var Nr=Z(Or),vi=Me[j(Nr)>>2];return vi.length>0?vi.pop():new ArrayBuffer(Nr)}function Ot(Or){Me[j(Or.byteLength)>>2].push(Or)}function Lr(Or,Nr){var vi=null;switch(Or){case g:vi=new Int8Array(bt(Nr),0,Nr);break;case P:vi=new Uint8Array(bt(Nr),0,Nr);break;case E:vi=new Int16Array(bt(2*Nr),0,Nr);break;case z:vi=new Uint16Array(bt(2*Nr),0,Nr);break;case q:vi=new Int32Array(bt(4*Nr),0,Nr);break;case V:vi=new Uint32Array(bt(4*Nr),0,Nr);break;case G:vi=new Float32Array(bt(4*Nr),0,Nr);break;default:return null}return vi.length!==Nr?vi.subarray(0,Nr):vi}function Vr(Or){Ot(Or.buffer)}return{alloc:bt,free:Ot,allocType:Lr,freeType:Vr}}var H=N();H.zero=N();var ie=3408,ae=3410,_e=3411,Ee=3412,Ce=3413,ge=3414,re=3415,Se=33901,ke=33902,be=3379,Be=3386,Le=34921,me=36347,Pe=36348,ce=35661,He=35660,lt=34930,mt=36349,Ht=34076,at=34024,ct=7936,ar=7937,Vt=7938,rr=35724,tt=34047,je=36063,Ue=34852,Ae=3553,rt=34067,St=34069,Tt=33984,dt=6408,Et=5126,pt=5121,jt=36160,or=36053,mr=36064,Ar=16384,ei=function(Me,bt){var Ot=1;bt.ext_texture_filter_anisotropic&&(Ot=Me.getParameter(tt));var Lr=1,Vr=1;bt.webgl_draw_buffers&&(Lr=Me.getParameter(Ue),Vr=Me.getParameter(je));var Or=!!bt.oes_texture_float;if(Or){var Nr=Me.createTexture();Me.bindTexture(Ae,Nr),Me.texImage2D(Ae,0,dt,1,1,0,dt,Et,null);var vi=Me.createFramebuffer();if(Me.bindFramebuffer(jt,vi),Me.framebufferTexture2D(jt,mr,Ae,Nr,0),Me.bindTexture(Ae,null),Me.checkFramebufferStatus(jt)!==or)Or=!1;else{Me.viewport(0,0,1,1),Me.clearColor(1,0,0,1),Me.clear(Ar);var Ni=H.allocType(Et,4);Me.readPixels(0,0,1,1,dt,Et,Ni),Me.getError()?Or=!1:(Me.deleteFramebuffer(vi),Me.deleteTexture(Nr),Or=Ni[0]===1),H.freeType(Ni)}}var qi=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Si=!0;if(!qi){var Vn=Me.createTexture(),Qi=H.allocType(pt,36);Me.activeTexture(Tt),Me.bindTexture(rt,Vn),Me.texImage2D(St,0,dt,3,3,0,dt,pt,Qi),H.freeType(Qi),Me.bindTexture(rt,null),Me.deleteTexture(Vn),Si=!Me.getError()}return{colorBits:[Me.getParameter(ae),Me.getParameter(_e),Me.getParameter(Ee),Me.getParameter(Ce)],depthBits:Me.getParameter(ge),stencilBits:Me.getParameter(re),subpixelBits:Me.getParameter(ie),extensions:Object.keys(bt).filter(function(ji){return!!bt[ji]}),maxAnisotropic:Ot,maxDrawbuffers:Lr,maxColorAttachments:Vr,pointSizeDims:Me.getParameter(Se),lineWidthDims:Me.getParameter(ke),maxViewportDims:Me.getParameter(Be),maxCombinedTextureUnits:Me.getParameter(ce),maxCubeMapSize:Me.getParameter(Ht),maxRenderbufferSize:Me.getParameter(at),maxTextureUnits:Me.getParameter(lt),maxTextureSize:Me.getParameter(be),maxAttributes:Me.getParameter(Le),maxVertexUniforms:Me.getParameter(me),maxVertexTextureUnits:Me.getParameter(He),maxVaryingVectors:Me.getParameter(Pe),maxFragmentUniforms:Me.getParameter(mt),glsl:Me.getParameter(rr),renderer:Me.getParameter(ar),vendor:Me.getParameter(ct),version:Me.getParameter(Vt),readFloat:Or,npotTextureCube:Si}},qr=function(Me){return Me instanceof Uint8Array||Me instanceof Uint16Array||Me instanceof Uint32Array||Me instanceof Int8Array||Me instanceof Int16Array||Me instanceof Int32Array||Me instanceof Float32Array||Me instanceof Float64Array||Me instanceof Uint8ClampedArray};function jr(Me){return!!Me&&typeof Me=="object"&&Array.isArray(Me.shape)&&Array.isArray(Me.stride)&&typeof Me.offset=="number"&&Me.shape.length===Me.stride.length&&(Array.isArray(Me.data)||qr(Me.data))}var gt=function(Me){return Object.keys(Me).map(function(bt){return Me[bt]})},Ge={shape:Kt,flatten:At};function Je(Me,bt,Ot){for(var Lr=0;Lr0){var qn;if(Array.isArray(Zr[0])){Xi=Vi(Zr);for(var fi=1,si=1;si0){if(typeof fi[0]=="number"){var Ui=H.allocType(ui.dtype,fi.length);wr(Ui,fi),Xi(Ui,mn),H.freeType(Ui)}else if(Array.isArray(fi[0])||qr(fi[0])){Ji=Vi(fi);var Bi=Qn(fi,Ji,ui.dtype);Xi(Bi,mn),H.freeType(Bi)}}}else if(jr(fi)){Ji=fi.shape;var pn=fi.stride,Nn=0,aa=0,Ki=0,Cn=0;Ji.length===1?(Nn=Ji[0],aa=1,Ki=pn[0],Cn=0):Ji.length===2&&(Nn=Ji[0],aa=Ji[1],Ki=pn[0],Cn=pn[1]);var ia=Array.isArray(fi.data)?ui.dtype:ir(fi.data),sa=H.allocType(ia,Nn*aa);Xr(sa,fi.data,Nn,aa,Ki,Cn,fi.offset),Xi(sa,mn),H.freeType(sa)}return nn}return yi||nn(Tr),nn._reglType="buffer",nn._buffer=ui,nn.subdata=qn,Ot.profile&&(nn.stats=ui.stats),nn.destroy=function(){Qi(ui)},nn}function oi(){gt(Or).forEach(function(Tr){Tr.buffer=Me.createBuffer(),Me.bindBuffer(Tr.type,Tr.buffer),Me.bufferData(Tr.type,Tr.persistentData||Tr.byteLength,Tr.usage)})}return Ot.profile&&(bt.getTotalBufferSize=function(){var Tr=0;return Object.keys(Or).forEach(function(Zr){Tr+=Or[Zr].stats.size}),Tr}),{create:ji,createStream:Ni,destroyStream:qi,clear:function(){gt(Or).forEach(Qi),vi.forEach(Qi)},getBuffer:function(Tr){return Tr&&Tr._buffer instanceof Nr?Tr._buffer:null},restore:oi,_initBuffer:Vn}}var $r=0,Ri=0,Zi=1,en=1,fn=4,yn=4,Mn={points:$r,point:Ri,lines:Zi,line:en,triangles:fn,triangle:yn,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ba=0,ua=1,ma=4,Wa=5120,Fa=5121,Xo=5122,da=5123,jn=5124,Ha=5125,vo=34963,Gn=35040,Ct=35044;function Sr(Me,bt,Ot,Lr){var Vr={},Or=0,Nr={uint8:Fa,uint16:da};bt.oes_element_index_uint&&(Nr.uint32=Ha);function vi(oi){this.id=Or++,Vr[this.id]=this,this.buffer=oi,this.primType=ma,this.vertCount=0,this.type=0}vi.prototype.bind=function(){this.buffer.bind()};var Ni=[];function qi(oi){var Tr=Ni.pop();return Tr||(Tr=new vi(Ot.create(null,vo,!0,!1)._buffer)),Vn(Tr,oi,Gn,-1,-1,0,0),Tr}function Si(oi){Ni.push(oi)}function Vn(oi,Tr,Zr,yi,Ii,ui,nn){oi.buffer.bind();var Xi;if(Tr){var qn=nn;!nn&&(!qr(Tr)||jr(Tr)&&!qr(Tr.data))&&(qn=bt.oes_element_index_uint?Ha:da),Ot._initBuffer(oi.buffer,Tr,Zr,qn,3)}else Me.bufferData(vo,ui,Zr),oi.buffer.dtype=Xi||Fa,oi.buffer.usage=Zr,oi.buffer.dimension=3,oi.buffer.byteLength=ui;if(Xi=nn,!nn){switch(oi.buffer.dtype){case Fa:case Wa:Xi=Fa;break;case da:case Xo:Xi=da;break;case Ha:case jn:Xi=Ha;break;default:}oi.buffer.dtype=Xi}oi.type=Xi;var fi=Ii;fi<0&&(fi=oi.buffer.byteLength,Xi===da?fi>>=1:Xi===Ha&&(fi>>=2)),oi.vertCount=fi;var si=yi;if(yi<0){si=ma;var mn=oi.buffer.dimension;mn===1&&(si=Ba),mn===2&&(si=ua),mn===3&&(si=ma)}oi.primType=si}function Qi(oi){Lr.elementsCount--,delete Vr[oi.id],oi.buffer.destroy(),oi.buffer=null}function ji(oi,Tr){var Zr=Ot.create(null,vo,!0),yi=new vi(Zr._buffer);Lr.elementsCount++;function Ii(ui){if(!ui)Zr(),yi.primType=ma,yi.vertCount=0,yi.type=Fa;else if(typeof ui=="number")Zr(ui),yi.primType=ma,yi.vertCount=ui|0,yi.type=Fa;else{var nn=null,Xi=Ct,qn=-1,fi=-1,si=0,mn=0;Array.isArray(ui)||qr(ui)||jr(ui)?nn=ui:("data"in ui&&(nn=ui.data),"usage"in ui&&(Xi=Hn[ui.usage]),"primitive"in ui&&(qn=Mn[ui.primitive]),"count"in ui&&(fi=ui.count|0),"type"in ui&&(mn=Nr[ui.type]),"length"in ui?si=ui.length|0:(si=fi,mn===da||mn===Xo?si*=2:(mn===Ha||mn===jn)&&(si*=4))),Vn(yi,nn,Xi,qn,fi,si,mn)}return Ii}return Ii(oi),Ii._reglType="elements",Ii._elements=yi,Ii.subdata=function(ui,nn){return Zr.subdata(ui,nn),Ii},Ii.destroy=function(){Qi(yi)},Ii}return{create:ji,createStream:qi,destroyStream:Si,getElements:function(oi){return typeof oi=="function"&&oi._elements instanceof vi?oi._elements:null},clear:function(){gt(Vr).forEach(Qi)}}}var Jr=new Float32Array(1),hi=new Uint32Array(Jr.buffer),hn=5123;function Sn(Me){for(var bt=H.allocType(hn,Me.length),Ot=0;Ot>>31<<15,Or=(Lr<<1>>>24)-127,Nr=Lr>>13&1023;if(Or<-24)bt[Ot]=Vr;else if(Or<-14){var vi=-14-Or;bt[Ot]=Vr+(Nr+1024>>vi)}else Or>15?bt[Ot]=Vr+31744:bt[Ot]=Vr+(Or+15<<10)+Nr}return bt}function En(Me){return Array.isArray(Me)||qr(Me)}var ki=34467,_n=3553,ya=34067,ea=34069,Ma=6408,_o=6406,No=6407,po=6409,Lo=6410,ko=32854,Ds=32855,Fs=36194,ll=32819,ul=32820,zl=33635,us=34042,il=6402,As=34041,cl=35904,Ks=35906,zs=36193,Io=33776,ls=33777,Yl=33778,Su=33779,nc=35986,bs=35987,Rn=34798,_a=35840,Vu=35841,ql=35842,xo=35843,Kl=36196,Ns=5121,Hl=5123,ac=5125,oa=5126,qo=10242,Oo=10243,Ol=10497,Pc=33071,Do=33648,nf=10240,Vf=10241,pl=9728,Zc=9729,Jl=9984,qs=9985,yu=9986,oc=9987,Cf=33170,sc=4352,jh=4353,Lf=4354,cs=34046,af=3317,Gf=37440,$l=37441,fl=37443,lc=37444,Fu=33984,Es=[Jl,yu,qs,oc],Hs=[0,po,Lo,No,Ma],Go={};Go[po]=Go[_o]=Go[il]=1,Go[As]=Go[Lo]=2,Go[No]=Go[cl]=3,Go[Ma]=Go[Ks]=4;function ps(Me){return"[object "+Me+"]"}var uc=ps("HTMLCanvasElement"),xl=ps("OffscreenCanvas"),Gu=ps("CanvasRenderingContext2D"),Os=ps("ImageBitmap"),od=ps("HTMLImageElement"),Po=ps("HTMLVideoElement"),sd=Object.keys(Qt).concat([uc,xl,Gu,Os,od,Po]),Ko=[];Ko[Ns]=1,Ko[oa]=4,Ko[zs]=2,Ko[Hl]=2,Ko[ac]=4;var Pa=[];Pa[ko]=2,Pa[Ds]=2,Pa[Fs]=2,Pa[As]=4,Pa[Io]=.5,Pa[ls]=.5,Pa[Yl]=1,Pa[Su]=1,Pa[nc]=.5,Pa[bs]=1,Pa[Rn]=1,Pa[_a]=.5,Pa[Vu]=.25,Pa[ql]=.5,Pa[xo]=.25,Pa[Kl]=.5;function of(Me){return Array.isArray(Me)&&(Me.length===0||typeof Me[0]=="number")}function Hu(Me){if(!Array.isArray(Me))return!1;var bt=Me.length;return!(bt===0||!En(Me[0]))}function bl(Me){return Object.prototype.toString.call(Me)}function Hf(Me){return bl(Me)===uc}function Ic(Me){return bl(Me)===xl}function yf(Me){return bl(Me)===Gu}function Bl(Me){return bl(Me)===Os}function Ah(Me){return bl(Me)===od}function Qf(Me){return bl(Me)===Po}function _f(Me){if(!Me)return!1;var bt=bl(Me);return sd.indexOf(bt)>=0?!0:of(Me)||Hu(Me)||jr(Me)}function Yc(Me){return Qt[Object.prototype.toString.call(Me)]|0}function eh(Me,bt){var Ot=bt.length;switch(Me.type){case Ns:case Hl:case ac:case oa:var Lr=H.allocType(Me.type,Ot);Lr.set(bt),Me.data=Lr;break;case zs:Me.data=Sn(bt);break;default:}}function th(Me,bt){return H.allocType(Me.type===zs?oa:Me.type,bt)}function ju(Me,bt){Me.type===zs?(Me.data=Sn(bt),H.freeType(bt)):Me.data=bt}function jf(Me,bt,Ot,Lr,Vr,Or){for(var Nr=Me.width,vi=Me.height,Ni=Me.channels,qi=Nr*vi*Ni,Si=th(Me,qi),Vn=0,Qi=0;Qi=1;)vi+=Nr*Ni*Ni,Ni/=2;return vi}else return Nr*Ot*Lr}function sf(Me,bt,Ot,Lr,Vr,Or,Nr){var vi={"don't care":sc,"dont care":sc,nice:Lf,fast:jh},Ni={repeat:Ol,clamp:Pc,mirror:Do},qi={nearest:pl,linear:Zc},Si=e({mipmap:oc,"nearest mipmap nearest":Jl,"linear mipmap nearest":qs,"nearest mipmap linear":yu,"linear mipmap linear":oc},qi),Vn={none:0,browser:lc},Qi={uint8:Ns,rgba4:ll,rgb565:zl,"rgb5 a1":ul},ji={alpha:_o,luminance:po,"luminance alpha":Lo,rgb:No,rgba:Ma,rgba4:ko,"rgb5 a1":Ds,rgb565:Fs},oi={};bt.ext_srgb&&(ji.srgb=cl,ji.srgba=Ks),bt.oes_texture_float&&(Qi.float32=Qi.float=oa),bt.oes_texture_half_float&&(Qi.float16=Qi["half float"]=zs),bt.webgl_depth_texture&&(e(ji,{depth:il,"depth stencil":As}),e(Qi,{uint16:Hl,uint32:ac,"depth stencil":us})),bt.webgl_compressed_texture_s3tc&&e(oi,{"rgb s3tc dxt1":Io,"rgba s3tc dxt1":ls,"rgba s3tc dxt3":Yl,"rgba s3tc dxt5":Su}),bt.webgl_compressed_texture_atc&&e(oi,{"rgb atc":nc,"rgba atc explicit alpha":bs,"rgba atc interpolated alpha":Rn}),bt.webgl_compressed_texture_pvrtc&&e(oi,{"rgb pvrtc 4bppv1":_a,"rgb pvrtc 2bppv1":Vu,"rgba pvrtc 4bppv1":ql,"rgba pvrtc 2bppv1":xo}),bt.webgl_compressed_texture_etc1&&(oi["rgb etc1"]=Kl);var Tr=Array.prototype.slice.call(Me.getParameter(ki));Object.keys(oi).forEach(function(ne){var we=oi[ne];Tr.indexOf(we)>=0&&(ji[ne]=we)});var Zr=Object.keys(ji);Ot.textureFormats=Zr;var yi=[];Object.keys(ji).forEach(function(ne){var we=ji[ne];yi[we]=ne});var Ii=[];Object.keys(Qi).forEach(function(ne){var we=Qi[ne];Ii[we]=ne});var ui=[];Object.keys(qi).forEach(function(ne){var we=qi[ne];ui[we]=ne});var nn=[];Object.keys(Si).forEach(function(ne){var we=Si[ne];nn[we]=ne});var Xi=[];Object.keys(Ni).forEach(function(ne){var we=Ni[ne];Xi[we]=ne});var qn=Zr.reduce(function(ne,we){var Oe=ji[we];return Oe===po||Oe===_o||Oe===po||Oe===Lo||Oe===il||Oe===As||bt.ext_srgb&&(Oe===cl||Oe===Ks)?ne[Oe]=Oe:Oe===Ds||we.indexOf("rgba")>=0?ne[Oe]=Ma:ne[Oe]=No,ne},{});function fi(){this.internalformat=Ma,this.format=Ma,this.type=Ns,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=lc,this.width=0,this.height=0,this.channels=0}function si(ne,we){ne.internalformat=we.internalformat,ne.format=we.format,ne.type=we.type,ne.compressed=we.compressed,ne.premultiplyAlpha=we.premultiplyAlpha,ne.flipY=we.flipY,ne.unpackAlignment=we.unpackAlignment,ne.colorSpace=we.colorSpace,ne.width=we.width,ne.height=we.height,ne.channels=we.channels}function mn(ne,we){if(!(typeof we!="object"||!we)){if("premultiplyAlpha"in we&&(ne.premultiplyAlpha=we.premultiplyAlpha),"flipY"in we&&(ne.flipY=we.flipY),"alignment"in we&&(ne.unpackAlignment=we.alignment),"colorSpace"in we&&(ne.colorSpace=Vn[we.colorSpace]),"type"in we){var Oe=we.type;ne.type=Qi[Oe]}var ht=ne.width,Yt=ne.height,cr=ne.channels,Nt=!1;"shape"in we?(ht=we.shape[0],Yt=we.shape[1],we.shape.length===3&&(cr=we.shape[2],Nt=!0)):("radius"in we&&(ht=Yt=we.radius),"width"in we&&(ht=we.width),"height"in we&&(Yt=we.height),"channels"in we&&(cr=we.channels,Nt=!0)),ne.width=ht|0,ne.height=Yt|0,ne.channels=cr|0;var Ne=!1;if("format"in we){var $e=we.format,st=ne.internalformat=ji[$e];ne.format=qn[st],$e in Qi&&("type"in we||(ne.type=Qi[$e])),$e in oi&&(ne.compressed=!0),Ne=!0}!Nt&&Ne?ne.channels=Go[ne.format]:Nt&&!Ne&&ne.channels!==Hs[ne.format]&&(ne.format=ne.internalformat=Hs[ne.channels])}}function Ji(ne){Me.pixelStorei(Gf,ne.flipY),Me.pixelStorei($l,ne.premultiplyAlpha),Me.pixelStorei(fl,ne.colorSpace),Me.pixelStorei(af,ne.unpackAlignment)}function Ui(){fi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Bi(ne,we){var Oe=null;if(_f(we)?Oe=we:we&&(mn(ne,we),"x"in we&&(ne.xOffset=we.x|0),"y"in we&&(ne.yOffset=we.y|0),_f(we.data)&&(Oe=we.data)),we.copy){var ht=Vr.viewportWidth,Yt=Vr.viewportHeight;ne.width=ne.width||ht-ne.xOffset,ne.height=ne.height||Yt-ne.yOffset,ne.needsCopy=!0}else if(!Oe)ne.width=ne.width||1,ne.height=ne.height||1,ne.channels=ne.channels||4;else if(qr(Oe))ne.channels=ne.channels||4,ne.data=Oe,!("type"in we)&&ne.type===Ns&&(ne.type=Yc(Oe));else if(of(Oe))ne.channels=ne.channels||4,eh(ne,Oe),ne.alignment=1,ne.needsFree=!0;else if(jr(Oe)){var cr=Oe.data;!Array.isArray(cr)&&ne.type===Ns&&(ne.type=Yc(cr));var Nt=Oe.shape,Ne=Oe.stride,$e,st,It,Bt,Ft,Ut;Nt.length===3?(It=Nt[2],Ut=Ne[2]):(It=1,Ut=1),$e=Nt[0],st=Nt[1],Bt=Ne[0],Ft=Ne[1],ne.alignment=1,ne.width=$e,ne.height=st,ne.channels=It,ne.format=ne.internalformat=Hs[It],ne.needsFree=!0,jf(ne,cr,Bt,Ft,Ut,Oe.offset)}else if(Hf(Oe)||Ic(Oe)||yf(Oe))Hf(Oe)||Ic(Oe)?ne.element=Oe:ne.element=Oe.canvas,ne.width=ne.element.width,ne.height=ne.element.height,ne.channels=4;else if(Bl(Oe))ne.element=Oe,ne.width=Oe.width,ne.height=Oe.height,ne.channels=4;else if(Ah(Oe))ne.element=Oe,ne.width=Oe.naturalWidth,ne.height=Oe.naturalHeight,ne.channels=4;else if(Qf(Oe))ne.element=Oe,ne.width=Oe.videoWidth,ne.height=Oe.videoHeight,ne.channels=4;else if(Hu(Oe)){var zt=ne.width||Oe[0].length,_t=ne.height||Oe.length,Dt=ne.channels;En(Oe[0][0])?Dt=Dt||Oe[0][0].length:Dt=Dt||1;for(var vt=Ge.shape(Oe),lr=1,_r=0;_r>=Yt,Oe.height>>=Yt,Bi(Oe,ht[Yt]),ne.mipmask|=1<=0&&!("faces"in we)&&(ne.genMipmaps=!0)}if("mag"in we){var ht=we.mag;ne.magFilter=qi[ht]}var Yt=ne.wrapS,cr=ne.wrapT;if("wrap"in we){var Nt=we.wrap;typeof Nt=="string"?Yt=cr=Ni[Nt]:Array.isArray(Nt)&&(Yt=Ni[Nt[0]],cr=Ni[Nt[1]])}else{if("wrapS"in we){var Ne=we.wrapS;Yt=Ni[Ne]}if("wrapT"in we){var $e=we.wrapT;cr=Ni[$e]}}if(ne.wrapS=Yt,ne.wrapT=cr,"anisotropic"in we){var st=we.anisotropic;ne.anisotropic=we.anisotropic}if("mipmap"in we){var It=!1;switch(typeof we.mipmap){case"string":ne.mipmapHint=vi[we.mipmap],ne.genMipmaps=!0,It=!0;break;case"boolean":It=ne.genMipmaps=we.mipmap;break;case"object":ne.genMipmaps=!1,It=!0;break;default:}It&&!("min"in we)&&(ne.minFilter=Jl)}}function al(ne,we){Me.texParameteri(we,Vf,ne.minFilter),Me.texParameteri(we,nf,ne.magFilter),Me.texParameteri(we,qo,ne.wrapS),Me.texParameteri(we,Oo,ne.wrapT),bt.ext_texture_filter_anisotropic&&Me.texParameteri(we,cs,ne.anisotropic),ne.genMipmaps&&(Me.hint(Cf,ne.mipmapHint),Me.generateMipmap(we))}var Vl=0,ss={},Vs=Ot.maxTextureUnits,Ys=Array(Vs).map(function(){return null});function wa(ne){fi.call(this),this.mipmask=0,this.internalformat=Ma,this.id=Vl++,this.refCount=1,this.target=ne,this.texture=Me.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new zo,Nr.profile&&(this.stats={size:0})}function ol(ne){Me.activeTexture(Fu),Me.bindTexture(ne.target,ne.texture)}function io(){var ne=Ys[0];ne?Me.bindTexture(ne.target,ne.texture):Me.bindTexture(_n,null)}function Y(ne){var we=ne.texture,Oe=ne.unit,ht=ne.target;Oe>=0&&(Me.activeTexture(Fu+Oe),Me.bindTexture(ht,null),Ys[Oe]=null),Me.deleteTexture(we),ne.texture=null,ne.params=null,ne.pixels=null,ne.refCount=0,delete ss[ne.id],Or.textureCount--}e(wa.prototype,{bind:function(){var ne=this;ne.bindCount+=1;var we=ne.unit;if(we<0){for(var Oe=0;Oe0)continue;ht.unit=-1}Ys[Oe]=ne,we=Oe;break}we>=Vs,Nr.profile&&Or.maxTextureUnits>Ft)-It,Ut.height=Ut.height||(Oe.height>>Ft)-Bt,ol(Oe),Nn(Ut,_n,It,Bt,Ft),io(),Cn(Ut),ht}function cr(Nt,Ne){var $e=Nt|0,st=Ne|0||$e;if($e===Oe.width&&st===Oe.height)return ht;ht.width=Oe.width=$e,ht.height=Oe.height=st,ol(Oe);for(var It=0;Oe.mipmask>>It;++It){var Bt=$e>>It,Ft=st>>It;if(!Bt||!Ft)break;Me.texImage2D(_n,It,Oe.format,Bt,Ft,0,Oe.format,Oe.type,null)}return io(),Nr.profile&&(Oe.stats.size=cc(Oe.internalformat,Oe.type,$e,st,!1,!1)),ht}return ht(ne,we),ht.subimage=Yt,ht.resize=cr,ht._reglType="texture2d",ht._texture=Oe,Nr.profile&&(ht.stats=Oe.stats),ht.destroy=function(){Oe.decRef()},ht}function J(ne,we,Oe,ht,Yt,cr){var Nt=new wa(ya);ss[Nt.id]=Nt,Or.cubeCount++;var Ne=new Array(6);function $e(Bt,Ft,Ut,zt,_t,Dt){var vt,lr=Nt.texInfo;for(zo.call(lr),vt=0;vt<6;++vt)Ne[vt]=Ga();if(typeof Bt=="number"||!Bt){var _r=Bt|0||1;for(vt=0;vt<6;++vt)sa(Ne[vt],_r,_r)}else if(typeof Bt=="object")if(Ft)ba(Ne[0],Bt),ba(Ne[1],Ft),ba(Ne[2],Ut),ba(Ne[3],zt),ba(Ne[4],_t),ba(Ne[5],Dt);else if(Qs(lr,Bt),mn(Nt,Bt),"faces"in Bt){var Br=Bt.faces;for(vt=0;vt<6;++vt)si(Ne[vt],Nt),ba(Ne[vt],Br[vt])}else for(vt=0;vt<6;++vt)ba(Ne[vt],Bt);for(si(Nt,Ne[0]),lr.genMipmaps?Nt.mipmask=(Ne[0].width<<1)-1:Nt.mipmask=Ne[0].mipmask,Nt.internalformat=Ne[0].internalformat,$e.width=Ne[0].width,$e.height=Ne[0].height,ol(Nt),vt=0;vt<6;++vt)is(Ne[vt],ea+vt);for(al(lr,ya),io(),Nr.profile&&(Nt.stats.size=cc(Nt.internalformat,Nt.type,$e.width,$e.height,lr.genMipmaps,!0)),$e.format=yi[Nt.internalformat],$e.type=Ii[Nt.type],$e.mag=ui[lr.magFilter],$e.min=nn[lr.minFilter],$e.wrapS=Xi[lr.wrapS],$e.wrapT=Xi[lr.wrapT],vt=0;vt<6;++vt)Ml(Ne[vt]);return $e}function st(Bt,Ft,Ut,zt,_t){var Dt=Ut|0,vt=zt|0,lr=_t|0,_r=Ki();return si(_r,Nt),_r.width=0,_r.height=0,Bi(_r,Ft),_r.width=_r.width||(Nt.width>>lr)-Dt,_r.height=_r.height||(Nt.height>>lr)-vt,ol(Nt),Nn(_r,ea+Bt,Dt,vt,lr),io(),Cn(_r),$e}function It(Bt){var Ft=Bt|0;if(Ft!==Nt.width){$e.width=Nt.width=Ft,$e.height=Nt.height=Ft,ol(Nt);for(var Ut=0;Ut<6;++Ut)for(var zt=0;Nt.mipmask>>zt;++zt)Me.texImage2D(ea+Ut,zt,Nt.format,Ft>>zt,Ft>>zt,0,Nt.format,Nt.type,null);return io(),Nr.profile&&(Nt.stats.size=cc(Nt.internalformat,Nt.type,$e.width,$e.height,!1,!0)),$e}}return $e(ne,we,Oe,ht,Yt,cr),$e.subimage=st,$e.resize=It,$e._reglType="textureCube",$e._texture=Nt,Nr.profile&&($e.stats=Nt.stats),$e.destroy=function(){Nt.decRef()},$e}function O(){for(var ne=0;ne>ht,Oe.height>>ht,0,Oe.internalformat,Oe.type,null);else for(var Yt=0;Yt<6;++Yt)Me.texImage2D(ea+Yt,ht,Oe.internalformat,Oe.width>>ht,Oe.height>>ht,0,Oe.internalformat,Oe.type,null);al(Oe.texInfo,Oe.target)})}function de(){for(var ne=0;ne=0?Ml=!0:Ni.indexOf(zo)>=0&&(Ml=!1))),("depthTexture"in wa||"depthStencilTexture"in wa)&&(Ys=!!(wa.depthTexture||wa.depthStencilTexture)),"depth"in wa&&(typeof wa.depth=="boolean"?is=wa.depth:(Vl=wa.depth,Zs=!1)),"stencil"in wa&&(typeof wa.stencil=="boolean"?Zs=wa.stencil:(ss=wa.stencil,is=!1)),"depthStencil"in wa&&(typeof wa.depthStencil=="boolean"?is=Zs=wa.depthStencil:(Vs=wa.depthStencil,is=!1,Zs=!1))}var io=null,Y=null,D=null,J=null;if(Array.isArray(Ga))io=Ga.map(oi);else if(Ga)io=[oi(Ga)];else for(io=new Array(al),ia=0;ia0&&(Cn.depth=Bi[0].depth,Cn.stencil=Bi[0].stencil,Cn.depthStencil=Bi[0].depthStencil),Bi[Ki]?Bi[Ki](Cn):Bi[Ki]=si(Cn)}return e(pn,{width:ia,height:ia,color:zo})}function Nn(aa){var Ki,Cn=aa|0;if(Cn===pn.width)return pn;var ia=pn.color;for(Ki=0;Ki=ia.byteLength?sa.subdata(ia):(sa.destroy(),si.buffers[aa]=null)),si.buffers[aa]||(sa=si.buffers[aa]=Vr.create(Ki,If,!1,!0)),Cn.buffer=Vr.getBuffer(sa),Cn.size=Cn.buffer.dimension|0,Cn.normalized=!1,Cn.type=Cn.buffer.dtype,Cn.offset=0,Cn.stride=0,Cn.divisor=0,Cn.state=1,pn[aa]=1}else Vr.getBuffer(Ki)?(Cn.buffer=Vr.getBuffer(Ki),Cn.size=Cn.buffer.dimension|0,Cn.normalized=!1,Cn.type=Cn.buffer.dtype,Cn.offset=0,Cn.stride=0,Cn.divisor=0,Cn.state=1):Vr.getBuffer(Ki.buffer)?(Cn.buffer=Vr.getBuffer(Ki.buffer),Cn.size=(+Ki.size||Cn.buffer.dimension)|0,Cn.normalized=!!Ki.normalized||!1,"type"in Ki?Cn.type=un[Ki.type]:Cn.type=Cn.buffer.dtype,Cn.offset=(Ki.offset||0)|0,Cn.stride=(Ki.stride||0)|0,Cn.divisor=(Ki.divisor||0)|0,Cn.state=1):"x"in Ki&&(Cn.x=+Ki.x||0,Cn.y=+Ki.y||0,Cn.z=+Ki.z||0,Cn.w=+Ki.w||0,Cn.state=2)}for(var ba=0;ba1)for(var Ji=0;JiTr&&(Tr=Zr.stats.uniformsCount)}),Tr},Ot.getMaxAttributesCount=function(){var Tr=0;return Si.forEach(function(Zr){Zr.stats.attributesCount>Tr&&(Tr=Zr.stats.attributesCount)}),Tr});function oi(){Vr={},Or={};for(var Tr=0;Tr16&&(Ot=Yi(Ot,Me.length*8));for(var Lr=Array(16),Vr=Array(16),Or=0;Or<16;Or++)Lr[Or]=Ot[Or]^909522486,Vr[Or]=Ot[Or]^1549556828;var Nr=Yi(Lr.concat(Bc(bt)),512+bt.length*8);return kt(Yi(Vr.concat(Nr),768))}function vu(Me){for(var bt=ah?"0123456789ABCDEF":"0123456789abcdef",Ot="",Lr,Vr=0;Vr>>4&15)+bt.charAt(Lr&15);return Ot}function Oc(Me){for(var bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ot="",Lr=Me.length,Vr=0;VrMe.length*8?Ot+=Zu:Ot+=bt.charAt(Or>>>6*(3-Nr)&63);return Ot}function ff(Me,bt){var Ot=bt.length,Lr=Array(),Vr,Or,Nr,vi,Ni=Array(Math.ceil(Me.length/2));for(Vr=0;Vr0;){for(vi=Array(),Nr=0,Vr=0;Vr0||Or>0)&&(vi[vi.length]=Or);Lr[Lr.length]=Nr,Ni=vi}var qi="";for(Vr=Lr.length-1;Vr>=0;Vr--)qi+=bt.charAt(Lr[Vr]);var Si=Math.ceil(Me.length*8/(Math.log(bt.length)/Math.log(2)));for(Vr=qi.length;Vr>>6&31,128|Lr&63):Lr<=65535?bt+=String.fromCharCode(224|Lr>>>12&15,128|Lr>>>6&63,128|Lr&63):Lr<=2097151&&(bt+=String.fromCharCode(240|Lr>>>18&7,128|Lr>>>12&63,128|Lr>>>6&63,128|Lr&63));return bt}function Bc(Me){for(var bt=Array(Me.length>>2),Ot=0;Ot>5]|=(Me.charCodeAt(Ot/8)&255)<<24-Ot%32;return bt}function kt(Me){for(var bt="",Ot=0;Ot>5]>>>24-Ot%32&255);return bt}function Zt(Me,bt){return Me>>>bt|Me<<32-bt}function Er(Me,bt){return Me>>>bt}function xr(Me,bt,Ot){return Me&bt^~Me&Ot}function Kr(Me,bt,Ot){return Me&bt^Me&Ot^bt&Ot}function Mi(Me){return Zt(Me,2)^Zt(Me,13)^Zt(Me,22)}function Wi(Me){return Zt(Me,6)^Zt(Me,11)^Zt(Me,25)}function dn(Me){return Zt(Me,7)^Zt(Me,18)^Er(Me,3)}function wn(Me){return Zt(Me,17)^Zt(Me,19)^Er(Me,10)}var On=new Array(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);function Yi(Me,bt){var Ot=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Lr=new Array(64),Vr,Or,Nr,vi,Ni,qi,Si,Vn,Qi,ji,oi,Tr;for(Me[bt>>5]|=128<<24-bt%32,Me[(bt+64>>9<<4)+15]=bt,Qi=0;Qi>16)+(bt>>16)+(Ot>>16);return Lr<<16|Ot&65535}function an(Me){return Array.prototype.slice.call(Me)}function Fi(Me){return an(Me).join("")}function ta(Me){var bt=Me&&Me.cache,Ot=0,Lr=[],Vr=[],Or=[];function Nr(oi,Tr){var Zr=Tr&&Tr.stable;if(!Zr){for(var yi=0;yi0&&(oi.push(Ii,"="),oi.push.apply(oi,an(arguments)),oi.push(";")),Ii}return e(Tr,{def:yi,toString:function(){return Fi([Zr.length>0?"var "+Zr.join(",")+";":"",Fi(oi)])}})}function Ni(){var oi=vi(),Tr=vi(),Zr=oi.toString,yi=Tr.toString;function Ii(ui,nn){Tr(ui,nn,"=",oi.def(ui,nn),";")}return e(function(){oi.apply(oi,an(arguments))},{def:oi.def,entry:oi,exit:Tr,save:Ii,set:function(ui,nn,Xi){Ii(ui,nn),oi(ui,nn,"=",Xi,";")},toString:function(){return Zr()+yi()}})}function qi(){var oi=Fi(arguments),Tr=Ni(),Zr=Ni(),yi=Tr.toString,Ii=Zr.toString;return e(Tr,{then:function(){return Tr.apply(Tr,an(arguments)),this},else:function(){return Zr.apply(Zr,an(arguments)),this},toString:function(){var ui=Ii();return ui&&(ui="else{"+ui+"}"),Fi(["if(",oi,"){",yi(),"}",ui])}})}var Si=vi(),Vn={};function Qi(oi,Tr){var Zr=[];function yi(){var qn="a"+Zr.length;return Zr.push(qn),qn}Tr=Tr||0;for(var Ii=0;Ii":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ii={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},di={cw:Te,ccw:qe};function Li(Me){return Array.isArray(Me)||qr(Me)||jr(Me)}function Ti(Me){return Me.sort(function(bt,Ot){return bt===ee?-1:Ot===ee?1:bt=1,Lr>=2,bt)}else if(Ot===Zo){var Vr=Me.data;return new Qr(Vr.thisDep,Vr.contextDep,Vr.propDep,bt)}else{if(Ot===Ss)return new Qr(!1,!1,!1,bt);if(Ot===as){for(var Or=!1,Nr=!1,vi=!1,Ni=0;Ni=1&&(Nr=!0),Si>=2&&(vi=!0)}else qi.type===Zo&&(Or=Or||qi.data.thisDep,Nr=Nr||qi.data.contextDep,vi=vi||qi.data.propDep)}return new Qr(Or,Nr,vi,bt)}else return new Qr(Ot===bo,Ot===Ka,Ot===Dn,bt)}}var na=new Qr(!1,!1,!1,function(){});function Ea(Me,bt,Ot,Lr,Vr,Or,Nr,vi,Ni,qi,Si,Vn,Qi,ji,oi,Tr){var Zr=qi.Record,yi={add:32774,subtract:32778,"reverse subtract":32779};Ot.ext_blend_minmax&&(yi.min=Ve,yi.max=Ye);var Ii=Ot.angle_instanced_arrays,ui=Ot.webgl_draw_buffers,nn=Ot.oes_vertex_array_object,Xi={dirty:!0,profile:Tr.profile},qn={},fi=[],si={},mn={};function Ji(Ne){return Ne.replace(".","_")}function Ui(Ne,$e,st){var It=Ji(Ne);fi.push(Ne),qn[It]=Xi[It]=!!st,si[It]=$e}function Bi(Ne,$e,st){var It=Ji(Ne);fi.push(Ne),Array.isArray(st)?(Xi[It]=st.slice(),qn[It]=st.slice()):Xi[It]=qn[It]=st,mn[It]=$e}function pn(Ne){return!!isNaN(Ne)}Ui(ws,Ci),Ui(Ho,ri),Bi(ml,"blendColor",[0,0,0,0]),Bi(Ws,"blendEquationSeparate",[pr,pr]),Bi(Ls,"blendFuncSeparate",[dr,Xt,dr,Xt]),Ui(va,sn,!0),Bi(no,"depthFunc",Ur),Bi(ys,"depthRange",[0,1]),Bi(rs,"depthMask",!0),Bi(Ql,Ql,[!0,!0,!0,!0]),Ui(Cu,Hr),Bi(Yu,"cullFace",se),Bi(Nc,Nc,qe),Bi(pu,pu,1),Ui(Uc,Yn),Bi(xu,"polygonOffset",[0,0]),Ui(Ac,Aa),Ui(Va,fa),Bi(oo,"sampleCoverage",[1,!1]),Ui(Vc,cn),Bi(hc,"stencilMask",-1),Bi(Ku,"stencilFunc",[Pt,0,-1]),Bi(ue,"stencilOpSeparate",[X,ot,ot,ot]),Bi(w,"stencilOpSeparate",[se,ot,ot,ot]),Ui(B,Ln),Bi(Q,"scissor",[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]),Bi(ee,ee,[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]);var Nn={gl:Me,context:Qi,strings:bt,next:qn,current:Xi,draw:Vn,elements:Or,buffer:Vr,shader:Si,attributes:qi.state,vao:qi,uniforms:Ni,framebuffer:vi,extensions:Ot,timer:ji,isBufferArgs:Li},aa={primTypes:Mn,compareFuncs:Wr,blendFuncs:xi,blendEquations:yi,stencilOps:ii,glTypes:un,orientationType:di};ui&&(aa.backBuffer=[se],aa.drawBuffer=S(Lr.maxDrawbuffers,function(Ne){return Ne===0?[0]:S(Ne,function($e){return gi+$e})}));var Ki=0;function Cn(){var Ne=ta({cache:oi}),$e=Ne.link,st=Ne.global;Ne.id=Ki++,Ne.batchId="0";var It=$e(Nn),Bt=Ne.shared={props:"a0"};Object.keys(Nn).forEach(function(Dt){Bt[Dt]=st.def(It,".",Dt)});var Ft=Ne.next={},Ut=Ne.current={};Object.keys(mn).forEach(function(Dt){Array.isArray(Xi[Dt])&&(Ft[Dt]=st.def(Bt.next,".",Dt),Ut[Dt]=st.def(Bt.current,".",Dt))});var zt=Ne.constants={};Object.keys(aa).forEach(function(Dt){zt[Dt]=st.def(JSON.stringify(aa[Dt]))}),Ne.invoke=function(Dt,vt){switch(vt.type){case Zn:var lr=["this",Bt.context,Bt.props,Ne.batchId];return Dt.def($e(vt.data),".call(",lr.slice(0,Math.max(vt.data.length+1,4)),")");case Dn:return Dt.def(Bt.props,vt.data);case Ka:return Dt.def(Bt.context,vt.data);case bo:return Dt.def("this",vt.data);case Zo:return vt.data.append(Ne,Dt),vt.data.ref;case Ss:return vt.data.toString();case as:return vt.data.map(function(_r){return Ne.invoke(Dt,_r)})}},Ne.attribCache={};var _t={};return Ne.scopeAttrib=function(Dt){var vt=bt.id(Dt);if(vt in _t)return _t[vt];var lr=qi.scope[vt];lr||(lr=qi.scope[vt]=new Zr);var _r=_t[vt]=$e(lr);return _r},Ne}function ia(Ne){var $e=Ne.static,st=Ne.dynamic,It;if(le in $e){var Bt=!!$e[le];It=kn(function(Ut,zt){return Bt}),It.enable=Bt}else if(le in st){var Ft=st[le];It=Bn(Ft,function(Ut,zt){return Ut.invoke(zt,Ft)})}return It}function sa(Ne,$e){var st=Ne.static,It=Ne.dynamic;if(Fe in st){var Bt=st[Fe];return Bt?(Bt=vi.getFramebuffer(Bt),kn(function(Ut,zt){var _t=Ut.link(Bt),Dt=Ut.shared;zt.set(Dt.framebuffer,".next",_t);var vt=Dt.context;return zt.set(vt,"."+ze,_t+".width"),zt.set(vt,"."+Qe,_t+".height"),_t})):kn(function(Ut,zt){var _t=Ut.shared;zt.set(_t.framebuffer,".next","null");var Dt=_t.context;return zt.set(Dt,"."+ze,Dt+"."+Wt),zt.set(Dt,"."+Qe,Dt+"."+nr),"null"})}else if(Fe in It){var Ft=It[Fe];return Bn(Ft,function(Ut,zt){var _t=Ut.invoke(zt,Ft),Dt=Ut.shared,vt=Dt.framebuffer,lr=zt.def(vt,".getFramebuffer(",_t,")");zt.set(vt,".next",lr);var _r=Dt.context;return zt.set(_r,"."+ze,lr+"?"+lr+".width:"+_r+"."+Wt),zt.set(_r,"."+Qe,lr+"?"+lr+".height:"+_r+"."+nr),lr})}else return null}function ba(Ne,$e,st){var It=Ne.static,Bt=Ne.dynamic;function Ft(_t){if(_t in It){var Dt=It[_t],vt=!0,lr=Dt.x|0,_r=Dt.y|0,Br,Di;return"width"in Dt?Br=Dt.width|0:vt=!1,"height"in Dt?Di=Dt.height|0:vt=!1,new Qr(!vt&&$e&&$e.thisDep,!vt&&$e&&$e.contextDep,!vt&&$e&&$e.propDep,function(gn,tn){var Ei=gn.shared.context,Oi=Br;"width"in Dt||(Oi=tn.def(Ei,".",ze,"-",lr));var Gi=Di;return"height"in Dt||(Gi=tn.def(Ei,".",Qe,"-",_r)),[lr,_r,Oi,Gi]})}else if(_t in Bt){var ci=Bt[_t],bi=Bn(ci,function(gn,tn){var Ei=gn.invoke(tn,ci),Oi=gn.shared.context,Gi=tn.def(Ei,".x|0"),on=tn.def(Ei,".y|0"),zn=tn.def('"width" in ',Ei,"?",Ei,".width|0:","(",Oi,".",ze,"-",Gi,")"),Ja=tn.def('"height" in ',Ei,"?",Ei,".height|0:","(",Oi,".",Qe,"-",on,")");return[Gi,on,zn,Ja]});return $e&&(bi.thisDep=bi.thisDep||$e.thisDep,bi.contextDep=bi.contextDep||$e.contextDep,bi.propDep=bi.propDep||$e.propDep),bi}else return $e?new Qr($e.thisDep,$e.contextDep,$e.propDep,function(gn,tn){var Ei=gn.shared.context;return[0,0,tn.def(Ei,".",ze),tn.def(Ei,".",Qe)]}):null}var Ut=Ft(ee);if(Ut){var zt=Ut;Ut=new Qr(Ut.thisDep,Ut.contextDep,Ut.propDep,function(_t,Dt){var vt=zt.append(_t,Dt),lr=_t.shared.context;return Dt.set(lr,"."+Xe,vt[2]),Dt.set(lr,"."+nt,vt[3]),vt})}return{viewport:Ut,scissor_box:Ft(Q)}}function is(Ne,$e){var st=Ne.static,It=typeof st[ut]=="string"&&typeof st[Ze]=="string";if(It){if(Object.keys($e.dynamic).length>0)return null;var Bt=$e.static,Ft=Object.keys(Bt);if(Ft.length>0&&typeof Bt[Ft[0]]=="number"){for(var Ut=[],zt=0;zt"+Gi+"?"+vt+".constant["+Gi+"]:0;"}).join(""),"}}else{","if(",Br,"(",vt,".buffer)){",gn,"=",Di,".createStream(",br,",",vt,".buffer);","}else{",gn,"=",Di,".getBuffer(",vt,".buffer);","}",tn,'="type" in ',vt,"?",_r.glTypes,"[",vt,".type]:",gn,".dtype;",ci.normalized,"=!!",vt,".normalized;");function Ei(Oi){Dt(ci[Oi],"=",vt,".",Oi,"|0;")}return Ei("size"),Ei("offset"),Ei("stride"),Ei("divisor"),Dt("}}"),Dt.exit("if(",ci.isStream,"){",Di,".destroyStream(",gn,");","}"),ci}Bt[Ft]=Bn(Ut,zt)}),Bt}function al(Ne){var $e=Ne.static,st=Ne.dynamic,It={};return Object.keys($e).forEach(function(Bt){var Ft=$e[Bt];It[Bt]=kn(function(Ut,zt){return typeof Ft=="number"||typeof Ft=="boolean"?""+Ft:Ut.link(Ft)})}),Object.keys(st).forEach(function(Bt){var Ft=st[Bt];It[Bt]=Bn(Ft,function(Ut,zt){return Ut.invoke(zt,Ft)})}),It}function Vl(Ne,$e,st,It,Bt){var Ft=Ne.static,Ut=Ne.dynamic,zt=is(Ne,$e),_t=sa(Ne,Bt),Dt=ba(Ne,_t,Bt),vt=Ga(Ne,Bt),lr=Ml(Ne,Bt),_r=Zs(Ne,Bt,zt);function Br(Ei){var Oi=Dt[Ei];Oi&&(lr[Ei]=Oi)}Br(ee),Br(Ji(Q));var Di=Object.keys(lr).length>0,ci={framebuffer:_t,draw:vt,shader:_r,state:lr,dirty:Di,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(ci.profile=ia(Ne,Bt),ci.uniforms=zo(st,Bt),ci.drawVAO=ci.scopeVAO=vt.vao,!ci.drawVAO&&_r.program&&!zt&&Ot.angle_instanced_arrays&&vt.static.elements){var bi=!0,gn=_r.program.attributes.map(function(Ei){var Oi=$e.static[Ei];return bi=bi&&!!Oi,Oi});if(bi&&gn.length>0){var tn=qi.getVAO(qi.createVAO({attributes:gn,elements:vt.static.elements}));ci.drawVAO=new Qr(null,null,null,function(Ei,Oi){return Ei.link(tn)}),ci.useVAO=!0}}return zt?ci.useVAO=!0:ci.attributes=Qs($e,Bt),ci.context=al(It,Bt),ci}function ss(Ne,$e,st){var It=Ne.shared,Bt=It.context,Ft=Ne.scope();Object.keys(st).forEach(function(Ut){$e.save(Bt,"."+Ut);var zt=st[Ut],_t=zt.append(Ne,$e);Array.isArray(_t)?Ft(Bt,".",Ut,"=[",_t.join(),"];"):Ft(Bt,".",Ut,"=",_t,";")}),$e(Ft)}function Vs(Ne,$e,st,It){var Bt=Ne.shared,Ft=Bt.gl,Ut=Bt.framebuffer,zt;ui&&(zt=$e.def(Bt.extensions,".webgl_draw_buffers"));var _t=Ne.constants,Dt=_t.drawBuffer,vt=_t.backBuffer,lr;st?lr=st.append(Ne,$e):lr=$e.def(Ut,".next"),It||$e("if(",lr,"!==",Ut,".cur){"),$e("if(",lr,"){",Ft,".bindFramebuffer(",zr,",",lr,".framebuffer);"),ui&&$e(zt,".drawBuffersWEBGL(",Dt,"[",lr,".colorAttachments.length]);"),$e("}else{",Ft,".bindFramebuffer(",zr,",null);"),ui&&$e(zt,".drawBuffersWEBGL(",vt,");"),$e("}",Ut,".cur=",lr,";"),It||$e("}")}function Ys(Ne,$e,st){var It=Ne.shared,Bt=It.gl,Ft=Ne.current,Ut=Ne.next,zt=It.current,_t=It.next,Dt=Ne.cond(zt,".dirty");fi.forEach(function(vt){var lr=Ji(vt);if(!(lr in st.state)){var _r,Br;if(lr in Ut){_r=Ut[lr],Br=Ft[lr];var Di=S(Xi[lr].length,function(bi){return Dt.def(_r,"[",bi,"]")});Dt(Ne.cond(Di.map(function(bi,gn){return bi+"!=="+Br+"["+gn+"]"}).join("||")).then(Bt,".",mn[lr],"(",Di,");",Di.map(function(bi,gn){return Br+"["+gn+"]="+bi}).join(";"),";"))}else{_r=Dt.def(_t,".",lr);var ci=Ne.cond(_r,"!==",zt,".",lr);Dt(ci),lr in si?ci(Ne.cond(_r).then(Bt,".enable(",si[lr],");").else(Bt,".disable(",si[lr],");"),zt,".",lr,"=",_r,";"):ci(Bt,".",mn[lr],"(",_r,");",zt,".",lr,"=",_r,";")}}}),Object.keys(st.state).length===0&&Dt(zt,".dirty=false;"),$e(Dt)}function wa(Ne,$e,st,It){var Bt=Ne.shared,Ft=Ne.current,Ut=Bt.current,zt=Bt.gl,_t;Ti(Object.keys(st)).forEach(function(Dt){var vt=st[Dt];if(!(It&&!It(vt))){var lr=vt.append(Ne,$e);if(si[Dt]){var _r=si[Dt];Pn(vt)?(_t=Ne.link(lr,{stable:!0}),$e(Ne.cond(_t).then(zt,".enable(",_r,");").else(zt,".disable(",_r,");")),$e(Ut,".",Dt,"=",_t,";")):($e(Ne.cond(lr).then(zt,".enable(",_r,");").else(zt,".disable(",_r,");")),$e(Ut,".",Dt,"=",lr,";"))}else if(En(lr)){var Br=Ft[Dt];$e(zt,".",mn[Dt],"(",lr,");",lr.map(function(Di,ci){return Br+"["+ci+"]="+Di}).join(";"),";")}else Pn(vt)?(_t=Ne.link(lr,{stable:!0}),$e(zt,".",mn[Dt],"(",_t,");",Ut,".",Dt,"=",_t,";")):$e(zt,".",mn[Dt],"(",lr,");",Ut,".",Dt,"=",lr,";")}})}function ol(Ne,$e){Ii&&(Ne.instancing=$e.def(Ne.shared.extensions,".angle_instanced_arrays"))}function io(Ne,$e,st,It,Bt){var Ft=Ne.shared,Ut=Ne.stats,zt=Ft.current,_t=Ft.timer,Dt=st.profile;function vt(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var lr,_r;function Br(Ei){lr=$e.def(),Ei(lr,"=",vt(),";"),typeof Bt=="string"?Ei(Ut,".count+=",Bt,";"):Ei(Ut,".count++;"),ji&&(It?(_r=$e.def(),Ei(_r,"=",_t,".getNumPendingQueries();")):Ei(_t,".beginQuery(",Ut,");"))}function Di(Ei){Ei(Ut,".cpuTime+=",vt(),"-",lr,";"),ji&&(It?Ei(_t,".pushScopeStats(",_r,",",_t,".getNumPendingQueries(),",Ut,");"):Ei(_t,".endQuery();"))}function ci(Ei){var Oi=$e.def(zt,".profile");$e(zt,".profile=",Ei,";"),$e.exit(zt,".profile=",Oi,";")}var bi;if(Dt){if(Pn(Dt)){Dt.enable?(Br($e),Di($e.exit),ci("true")):ci("false");return}bi=Dt.append(Ne,$e),ci(bi)}else bi=$e.def(zt,".profile");var gn=Ne.block();Br(gn),$e("if(",bi,"){",gn,"}");var tn=Ne.block();Di(tn),$e.exit("if(",bi,"){",tn,"}")}function Y(Ne,$e,st,It,Bt){var Ft=Ne.shared;function Ut(_t){switch(_t){case Co:case Ps:case hl:return 2;case Qa:case Ts:case Ul:return 3;case mo:case wo:case Lu:return 4;default:return 1}}function zt(_t,Dt,vt){var lr=Ft.gl,_r=$e.def(_t,".location"),Br=$e.def(Ft.attributes,"[",_r,"]"),Di=vt.state,ci=vt.buffer,bi=[vt.x,vt.y,vt.z,vt.w],gn=["buffer","normalized","offset","stride"];function tn(){$e("if(!",Br,".buffer){",lr,".enableVertexAttribArray(",_r,");}");var Oi=vt.type,Gi;if(vt.size?Gi=$e.def(vt.size,"||",Dt):Gi=Dt,$e("if(",Br,".type!==",Oi,"||",Br,".size!==",Gi,"||",gn.map(function(zn){return Br+"."+zn+"!=="+vt[zn]}).join("||"),"){",lr,".bindBuffer(",br,",",ci,".buffer);",lr,".vertexAttribPointer(",[_r,Gi,Oi,vt.normalized,vt.stride,vt.offset],");",Br,".type=",Oi,";",Br,".size=",Gi,";",gn.map(function(zn){return Br+"."+zn+"="+vt[zn]+";"}).join(""),"}"),Ii){var on=vt.divisor;$e("if(",Br,".divisor!==",on,"){",Ne.instancing,".vertexAttribDivisorANGLE(",[_r,on],");",Br,".divisor=",on,";}")}}function Ei(){$e("if(",Br,".buffer){",lr,".disableVertexAttribArray(",_r,");",Br,".buffer=null;","}if(",Ca.map(function(Oi,Gi){return Br+"."+Oi+"!=="+bi[Gi]}).join("||"),"){",lr,".vertexAttrib4f(",_r,",",bi,");",Ca.map(function(Oi,Gi){return Br+"."+Oi+"="+bi[Gi]+";"}).join(""),"}")}Di===La?tn():Di===Ua?Ei():($e("if(",Di,"===",La,"){"),tn(),$e("}else{"),Ei(),$e("}"))}It.forEach(function(_t){var Dt=_t.name,vt=st.attributes[Dt],lr;if(vt){if(!Bt(vt))return;lr=vt.append(Ne,$e)}else{if(!Bt(na))return;var _r=Ne.scopeAttrib(Dt);lr={},Object.keys(new Zr).forEach(function(Br){lr[Br]=$e.def(_r,".",Br)})}zt(Ne.link(_t),Ut(_t.info.type),lr)})}function D(Ne,$e,st,It,Bt,Ft){for(var Ut=Ne.shared,zt=Ut.gl,_t,Dt=0;Dt1){for(var co=[],ts=[],so=0;so>1)",ci],");")}function on(){st(bi,".drawArraysInstancedANGLE(",[_r,Br,Di,ci],");")}vt&&vt!=="null"?tn?Gi():(st("if(",vt,"){"),Gi(),st("}else{"),on(),st("}")):on()}function Oi(){function Gi(){st(Ft+".drawElements("+[_r,Di,gn,Br+"<<(("+gn+"-"+Ra+")>>1)"]+");")}function on(){st(Ft+".drawArrays("+[_r,Br,Di]+");")}vt&&vt!=="null"?tn?Gi():(st("if(",vt,"){"),Gi(),st("}else{"),on(),st("}")):on()}Ii&&(typeof ci!="number"||ci>=0)?typeof ci=="string"?(st("if(",ci,">0){"),Ei(),st("}else if(",ci,"<0){"),Oi(),st("}")):Ei():Oi()}function O(Ne,$e,st,It,Bt){var Ft=Cn(),Ut=Ft.proc("body",Bt);return Ii&&(Ft.instancing=Ut.def(Ft.shared.extensions,".angle_instanced_arrays")),Ne(Ft,Ut,st,It),Ft.compile().body}function K(Ne,$e,st,It){ol(Ne,$e),st.useVAO?st.drawVAO?$e(Ne.shared.vao,".setVAO(",st.drawVAO.append(Ne,$e),");"):$e(Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"):($e(Ne.shared.vao,".setVAO(null);"),Y(Ne,$e,st,It.attributes,function(){return!0})),D(Ne,$e,st,It.uniforms,function(){return!0},!1),J(Ne,$e,$e,st)}function de(Ne,$e){var st=Ne.proc("draw",1);ol(Ne,st),ss(Ne,st,$e.context),Vs(Ne,st,$e.framebuffer),Ys(Ne,st,$e),wa(Ne,st,$e.state),io(Ne,st,$e,!1,!0);var It=$e.shader.progVar.append(Ne,st);if(st(Ne.shared.gl,".useProgram(",It,".program);"),$e.shader.program)K(Ne,st,$e,$e.shader.program);else{st(Ne.shared.vao,".setVAO(null);");var Bt=Ne.global.def("{}"),Ft=st.def(It,".id"),Ut=st.def(Bt,"[",Ft,"]");st(Ne.cond(Ut).then(Ut,".call(this,a0);").else(Ut,"=",Bt,"[",Ft,"]=",Ne.link(function(zt){return O(K,Ne,$e,zt,1)}),"(",It,");",Ut,".call(this,a0);"))}Object.keys($e.state).length>0&&st(Ne.shared.current,".dirty=true;"),Ne.shared.vao&&st(Ne.shared.vao,".setVAO(null);")}function ne(Ne,$e,st,It){Ne.batchId="a1",ol(Ne,$e);function Bt(){return!0}Y(Ne,$e,st,It.attributes,Bt),D(Ne,$e,st,It.uniforms,Bt,!1),J(Ne,$e,$e,st)}function we(Ne,$e,st,It){ol(Ne,$e);var Bt=st.contextDep,Ft=$e.def(),Ut="a0",zt="a1",_t=$e.def();Ne.shared.props=_t,Ne.batchId=Ft;var Dt=Ne.scope(),vt=Ne.scope();$e(Dt.entry,"for(",Ft,"=0;",Ft,"<",zt,";++",Ft,"){",_t,"=",Ut,"[",Ft,"];",vt,"}",Dt.exit);function lr(gn){return gn.contextDep&&Bt||gn.propDep}function _r(gn){return!lr(gn)}if(st.needsContext&&ss(Ne,vt,st.context),st.needsFramebuffer&&Vs(Ne,vt,st.framebuffer),wa(Ne,vt,st.state,lr),st.profile&&lr(st.profile)&&io(Ne,vt,st,!1,!0),It)st.useVAO?st.drawVAO?lr(st.drawVAO)?vt(Ne.shared.vao,".setVAO(",st.drawVAO.append(Ne,vt),");"):Dt(Ne.shared.vao,".setVAO(",st.drawVAO.append(Ne,Dt),");"):Dt(Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"):(Dt(Ne.shared.vao,".setVAO(null);"),Y(Ne,Dt,st,It.attributes,_r),Y(Ne,vt,st,It.attributes,lr)),D(Ne,Dt,st,It.uniforms,_r,!1),D(Ne,vt,st,It.uniforms,lr,!0),J(Ne,Dt,vt,st);else{var Br=Ne.global.def("{}"),Di=st.shader.progVar.append(Ne,vt),ci=vt.def(Di,".id"),bi=vt.def(Br,"[",ci,"]");vt(Ne.shared.gl,".useProgram(",Di,".program);","if(!",bi,"){",bi,"=",Br,"[",ci,"]=",Ne.link(function(gn){return O(ne,Ne,st,gn,2)}),"(",Di,");}",bi,".call(this,a0[",Ft,"],",Ft,");")}}function Oe(Ne,$e){var st=Ne.proc("batch",2);Ne.batchId="0",ol(Ne,st);var It=!1,Bt=!0;Object.keys($e.context).forEach(function(Br){It=It||$e.context[Br].propDep}),It||(ss(Ne,st,$e.context),Bt=!1);var Ft=$e.framebuffer,Ut=!1;Ft?(Ft.propDep?It=Ut=!0:Ft.contextDep&&It&&(Ut=!0),Ut||Vs(Ne,st,Ft)):Vs(Ne,st,null),$e.state.viewport&&$e.state.viewport.propDep&&(It=!0);function zt(Br){return Br.contextDep&&It||Br.propDep}Ys(Ne,st,$e),wa(Ne,st,$e.state,function(Br){return!zt(Br)}),(!$e.profile||!zt($e.profile))&&io(Ne,st,$e,!1,"a1"),$e.contextDep=It,$e.needsContext=Bt,$e.needsFramebuffer=Ut;var _t=$e.shader.progVar;if(_t.contextDep&&It||_t.propDep)we(Ne,st,$e,null);else{var Dt=_t.append(Ne,st);if(st(Ne.shared.gl,".useProgram(",Dt,".program);"),$e.shader.program)we(Ne,st,$e,$e.shader.program);else{st(Ne.shared.vao,".setVAO(null);");var vt=Ne.global.def("{}"),lr=st.def(Dt,".id"),_r=st.def(vt,"[",lr,"]");st(Ne.cond(_r).then(_r,".call(this,a0,a1);").else(_r,"=",vt,"[",lr,"]=",Ne.link(function(Br){return O(we,Ne,$e,Br,2)}),"(",Dt,");",_r,".call(this,a0,a1);"))}}Object.keys($e.state).length>0&&st(Ne.shared.current,".dirty=true;"),Ne.shared.vao&&st(Ne.shared.vao,".setVAO(null);")}function ht(Ne,$e){var st=Ne.proc("scope",3);Ne.batchId="a2";var It=Ne.shared,Bt=It.current;if(ss(Ne,st,$e.context),$e.framebuffer&&$e.framebuffer.append(Ne,st),Ti(Object.keys($e.state)).forEach(function(zt){var _t=$e.state[zt],Dt=_t.append(Ne,st);En(Dt)?Dt.forEach(function(vt,lr){pn(vt)?st.set(Ne.next[zt],"["+lr+"]",vt):st.set(Ne.next[zt],"["+lr+"]",Ne.link(vt,{stable:!0}))}):Pn(_t)?st.set(It.next,"."+zt,Ne.link(Dt,{stable:!0})):st.set(It.next,"."+zt,Dt)}),io(Ne,st,$e,!0,!0),[Mt,yr,$t,Cr,Jt].forEach(function(zt){var _t=$e.draw[zt];if(_t){var Dt=_t.append(Ne,st);pn(Dt)?st.set(It.draw,"."+zt,Dt):st.set(It.draw,"."+zt,Ne.link(Dt),{stable:!0})}}),Object.keys($e.uniforms).forEach(function(zt){var _t=$e.uniforms[zt].append(Ne,st);Array.isArray(_t)&&(_t="["+_t.map(function(Dt){return pn(Dt)?Dt:Ne.link(Dt,{stable:!0})})+"]"),st.set(It.uniforms,"["+Ne.link(bt.id(zt),{stable:!0})+"]",_t)}),Object.keys($e.attributes).forEach(function(zt){var _t=$e.attributes[zt].append(Ne,st),Dt=Ne.scopeAttrib(zt);Object.keys(new Zr).forEach(function(vt){st.set(Dt,"."+vt,_t[vt])})}),$e.scopeVAO){var Ft=$e.scopeVAO.append(Ne,st);pn(Ft)?st.set(It.vao,".targetVAO",Ft):st.set(It.vao,".targetVAO",Ne.link(Ft,{stable:!0}))}function Ut(zt){var _t=$e.shader[zt];if(_t){var Dt=_t.append(Ne,st);pn(Dt)?st.set(It.shader,"."+zt,Dt):st.set(It.shader,"."+zt,Ne.link(Dt,{stable:!0}))}}Ut(Ze),Ut(ut),Object.keys($e.state).length>0&&(st(Bt,".dirty=true;"),st.exit(Bt,".dirty=true;")),st("a1(",Ne.shared.context,",a0,",Ne.batchId,");")}function Yt(Ne){if(!(typeof Ne!="object"||En(Ne))){for(var $e=Object.keys(Ne),st=0;st<$e.length;++st)if(h.isDynamic(Ne[$e[st]]))return!0;return!1}}function cr(Ne,$e,st){var It=$e.static[st];if(!It||!Yt(It))return;var Bt=Ne.global,Ft=Object.keys(It),Ut=!1,zt=!1,_t=!1,Dt=Ne.global.def("{}");Ft.forEach(function(lr){var _r=It[lr];if(h.isDynamic(_r)){typeof _r=="function"&&(_r=It[lr]=h.unbox(_r));var Br=Bn(_r,null);Ut=Ut||Br.thisDep,_t=_t||Br.propDep,zt=zt||Br.contextDep}else{switch(Bt(Dt,".",lr,"="),typeof _r){case"number":Bt(_r);break;case"string":Bt('"',_r,'"');break;case"object":Array.isArray(_r)&&Bt("[",_r.join(),"]");break;default:Bt(Ne.link(_r));break}Bt(";")}});function vt(lr,_r){Ft.forEach(function(Br){var Di=It[Br];if(h.isDynamic(Di)){var ci=lr.invoke(_r,Di);_r(Dt,".",Br,"=",ci,";")}})}$e.dynamic[st]=new h.DynamicVariable(Zo,{thisDep:Ut,contextDep:zt,propDep:_t,ref:Dt,append:vt}),delete $e.static[st]}function Nt(Ne,$e,st,It,Bt){var Ft=Cn();Ft.stats=Ft.link(Bt),Object.keys($e.static).forEach(function(zt){cr(Ft,$e,zt)}),fr.forEach(function(zt){cr(Ft,Ne,zt)});var Ut=Vl(Ne,$e,st,It,Ft);return Ut.shader.program&&(Ut.shader.program.attributes.sort(function(zt,_t){return zt.name<_t.name?-1:1}),Ut.shader.program.uniforms.sort(function(zt,_t){return zt.name<_t.name?-1:1})),de(Ft,Ut),ht(Ft,Ut),Oe(Ft,Ut),e(Ft.compile(),{destroy:function(){Ut.shader.program.destroy()}})}return{next:qn,current:Xi,procs:function(){var Ne=Cn(),$e=Ne.proc("poll"),st=Ne.proc("refresh"),It=Ne.block();$e(It),st(It);var Bt=Ne.shared,Ft=Bt.gl,Ut=Bt.next,zt=Bt.current;It(zt,".dirty=false;"),Vs(Ne,$e),Vs(Ne,st,null,!0);var _t;Ii&&(_t=Ne.link(Ii)),Ot.oes_vertex_array_object&&st(Ne.link(Ot.oes_vertex_array_object),".bindVertexArrayOES(null);");var Dt=st.def(Bt.attributes),vt=st.def(0),lr=Ne.cond(vt,".buffer");lr.then(Ft,".enableVertexAttribArray(i);",Ft,".bindBuffer(",br,",",vt,".buffer.buffer);",Ft,".vertexAttribPointer(i,",vt,".size,",vt,".type,",vt,".normalized,",vt,".stride,",vt,".offset);").else(Ft,".disableVertexAttribArray(i);",Ft,".vertexAttrib4f(i,",vt,".x,",vt,".y,",vt,".z,",vt,".w);",vt,".buffer=null;");var _r=Ne.link(Lr.maxAttributes,{stable:!0});return st("for(var i=0;i<",_r,";++i){",vt,"=",Dt,"[i];",lr,"}"),Ii&&st("for(var i=0;i<",_r,";++i){",_t,".vertexAttribDivisorANGLE(i,",Dt,"[i].divisor);","}"),st(Ne.shared.vao,".currentVAO=null;",Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"),Object.keys(si).forEach(function(Br){var Di=si[Br],ci=It.def(Ut,".",Br),bi=Ne.block();bi("if(",ci,"){",Ft,".enable(",Di,")}else{",Ft,".disable(",Di,")}",zt,".",Br,"=",ci,";"),st(bi),$e("if(",ci,"!==",zt,".",Br,"){",bi,"}")}),Object.keys(mn).forEach(function(Br){var Di=mn[Br],ci=Xi[Br],bi,gn,tn=Ne.block();if(tn(Ft,".",Di,"("),En(ci)){var Ei=ci.length;bi=Ne.global.def(Ut,".",Br),gn=Ne.global.def(zt,".",Br),tn(S(Ei,function(Oi){return bi+"["+Oi+"]"}),");",S(Ei,function(Oi){return gn+"["+Oi+"]="+bi+"["+Oi+"];"}).join("")),$e("if(",S(Ei,function(Oi){return bi+"["+Oi+"]!=="+gn+"["+Oi+"]"}).join("||"),"){",tn,"}")}else bi=It.def(Ut,".",Br),gn=It.def(zt,".",Br),tn(bi,");",zt,".",Br,"=",bi,";"),$e("if(",bi,"!==",gn,"){",tn,"}");st(tn)}),Ne.compile()}(),compile:Nt}}function Ia(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var yo=34918,Da=34919,go=35007,Is=function(Me,bt){if(!bt.ext_disjoint_timer_query)return null;var Ot=[];function Lr(){return Ot.pop()||bt.ext_disjoint_timer_query.createQueryEXT()}function Vr(yi){Ot.push(yi)}var Or=[];function Nr(yi){var Ii=Lr();bt.ext_disjoint_timer_query.beginQueryEXT(go,Ii),Or.push(Ii),ji(Or.length-1,Or.length,yi)}function vi(){bt.ext_disjoint_timer_query.endQueryEXT(go)}function Ni(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var qi=[];function Si(){return qi.pop()||new Ni}function Vn(yi){qi.push(yi)}var Qi=[];function ji(yi,Ii,ui){var nn=Si();nn.startQueryIndex=yi,nn.endQueryIndex=Ii,nn.sum=0,nn.stats=ui,Qi.push(nn)}var oi=[],Tr=[];function Zr(){var yi,Ii,ui=Or.length;if(ui!==0){Tr.length=Math.max(Tr.length,ui+1),oi.length=Math.max(oi.length,ui+1),oi[0]=0,Tr[0]=0;var nn=0;for(yi=0,Ii=0;Ii=0;--O){var K=Nn[O];K&&K(oi,null,0)}Ot.flush(),Si&&Si.update()}function ba(){!ia&&Nn.length>0&&(ia=d.next(sa))}function is(){ia&&(d.cancel(sa),ia=null)}function Zs(O){O.preventDefault(),Vr=!0,is(),aa.forEach(function(K){K()})}function Ga(O){Ot.getError(),Vr=!1,Or.restore(),qn.restore(),Ii.restore(),fi.restore(),si.restore(),mn.restore(),nn.restore(),Si&&Si.restore(),Ji.procs.refresh(),ba(),Ki.forEach(function(K){K()})}pn&&(pn.addEventListener(Fo,Zs,!1),pn.addEventListener(Uo,Ga,!1));function Ml(){Nn.length=0,is(),pn&&(pn.removeEventListener(Fo,Zs),pn.removeEventListener(Uo,Ga)),qn.clear(),mn.clear(),si.clear(),nn.clear(),fi.clear(),ui.clear(),Ii.clear(),Si&&Si.clear(),Cn.forEach(function(O){O()})}function zo(O){function K(Ft){var Ut=e({},Ft);delete Ut.uniforms,delete Ut.attributes,delete Ut.context,delete Ut.vao,"stencil"in Ut&&Ut.stencil.op&&(Ut.stencil.opBack=Ut.stencil.opFront=Ut.stencil.op,delete Ut.stencil.op);function zt(_t){if(_t in Ut){var Dt=Ut[_t];delete Ut[_t],Object.keys(Dt).forEach(function(vt){Ut[_t+"."+vt]=Dt[vt]})}}return zt("blend"),zt("depth"),zt("cull"),zt("stencil"),zt("polygonOffset"),zt("scissor"),zt("sample"),"vao"in Ft&&(Ut.vao=Ft.vao),Ut}function de(Ft,Ut){var zt={},_t={};return Object.keys(Ft).forEach(function(Dt){var vt=Ft[Dt];if(h.isDynamic(vt)){_t[Dt]=h.unbox(vt,Dt);return}else if(Ut&&Array.isArray(vt)){for(var lr=0;lr0)return Ne.call(this,It(Ft|0),Ft|0)}else if(Array.isArray(Ft)){if(Ft.length)return Ne.call(this,Ft,Ft.length)}else return Nt.call(this,Ft)}return e(Bt,{stats:Yt,destroy:function(){cr.destroy()}})}var Qs=mn.setFBO=zo({framebuffer:h.define.call(null,$s,"framebuffer")});function al(O,K){var de=0;Ji.procs.poll();var ne=K.color;ne&&(Ot.clearColor(+ne[0]||0,+ne[1]||0,+ne[2]||0,+ne[3]||0),de|=Ms),"depth"in K&&(Ot.clearDepth(+K.depth),de|=Xs),"stencil"in K&&(Ot.clearStencil(K.stencil|0),de|=Un),Ot.clear(de)}function Vl(O){if("framebuffer"in O)if(O.framebuffer&&O.framebuffer_reglType==="framebufferCube")for(var K=0;K<6;++K)Qs(e({framebuffer:O.framebuffer.faces[K]},O),al);else Qs(O,al);else al(null,O)}function ss(O){Nn.push(O);function K(){var de=dl(Nn,O);function ne(){var we=dl(Nn,ne);Nn[we]=Nn[Nn.length-1],Nn.length-=1,Nn.length<=0&&is()}Nn[de]=ne}return ba(),{cancel:K}}function Vs(){var O=Bi.viewport,K=Bi.scissor_box;O[0]=O[1]=K[0]=K[1]=0,oi.viewportWidth=oi.framebufferWidth=oi.drawingBufferWidth=O[2]=K[2]=Ot.drawingBufferWidth,oi.viewportHeight=oi.framebufferHeight=oi.drawingBufferHeight=O[3]=K[3]=Ot.drawingBufferHeight}function Ys(){oi.tick+=1,oi.time=ol(),Vs(),Ji.procs.poll()}function wa(){fi.refresh(),Vs(),Ji.procs.refresh(),Si&&Si.update()}function ol(){return(v()-Vn)/1e3}wa();function io(O,K){var de;switch(O){case"frame":return ss(K);case"lost":de=aa;break;case"restore":de=Ki;break;case"destroy":de=Cn;break;default:}return de.push(K),{cancel:function(){for(var ne=0;ne=0},read:Ui,destroy:Ml,_gl:Ot,_refresh:wa,poll:function(){Ys(),Si&&Si.update()},now:ol,stats:vi,getCachedCode:Y,preloadCachedCode:D});return bt.onDone(null,J),J}return Sc})});var Iz=ye((z_r,NBe)=>{"use strict";var rVt=qX(),iVt=BBe();NBe.exports=function(t,r,n){var i=t._fullLayout,a=!0;return i._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(n);return}if(!(o.pick&&!i._has("parcoords"))){try{o.regl=iVt({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||window.devicePixelRatio,extensions:r||[],cachedCode:n||{}})}catch(s){a=!1}o.regl||(a=!1),a&&this.addEventListener("webglcontextlost",function(s){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:s,layer:o.key})},!1)}}),a||rVt({container:i._glcontainer.node()}),a}});var bK=ye((xK,jBe)=>{"use strict";var UBe=xY(),VBe=JY(),nVt=COe(),GBe=OBe(),_K=Pr(),aVt=Cg().selectMode,oVt=Iz(),sVt=Ru(),lVt=EU(),uVt=gY().styleTextSelection,HBe={};function cVt(e,t,r,n){var i=e._size,a=e.width*n,o=e.height*n,s=i.l*n,l=i.b*n,u=i.r*n,c=i.t*n,f=i.w*n,h=i.h*n;return[s+t.domain[0]*f,l+r.domain[0]*h,a-u-(1-t.domain[1])*f,o-c-(1-r.domain[1])*h]}var xK=jBe.exports=function(t,r,n){if(n.length){var i=t._fullLayout,a=r._scene,o=r.xaxis,s=r.yaxis,l,u;if(a){var c=oVt(t,["ANGLE_instanced_arrays","OES_element_index_uint"],HBe);if(!c){a.init();return}var f=a.count,h=i._glcanvas.data()[0].regl;if(lVt(t,r,n),a.dirty){if((a.line2d||a.error2d)&&!(a.scatter2d||a.fill2d||a.glText)&&h.clear({color:!0,depth:!0}),a.error2d===!0&&(a.error2d=nVt(h)),a.line2d===!0&&(a.line2d=VBe(h)),a.scatter2d===!0&&(a.scatter2d=UBe(h)),a.fill2d===!0&&(a.fill2d=VBe(h)),a.glText===!0)for(a.glText=new Array(f),l=0;la.glText.length){var d=f-a.glText.length;for(l=0;lie&&(isNaN(H[ae])||isNaN(H[ae+1]));)ae-=2;N.positions=H.slice(ie,ae+2)}return N}),a.line2d.update(a.lineOptions)),a.error2d){var b=(a.errorXOptions||[]).concat(a.errorYOptions||[]);a.error2d.update(b)}a.scatter2d&&a.scatter2d.update(a.markerOptions),a.fillOrder=_K.repeat(null,f),a.fill2d&&(a.fillOptions=a.fillOptions.map(function(N,H){var ie=n[H];if(!(!N||!ie||!ie[0]||!ie[0].trace)){var ae=ie[0],_e=ae.trace,Ee=ae.t,Ce=a.lineOptions[H],ge,re,Se=[];_e._ownfill&&Se.push(H),_e._nexttrace&&Se.push(H+1),Se.length&&(a.fillOrder[H]=Se);var ke=[],be=Ce&&Ce.positions||Ee.positions,Be,Le;if(_e.fill==="tozeroy"){for(Be=0;BeBe&&isNaN(be[Le+1]);)Le-=2;be[Be+1]!==0&&(ke=[be[Be],0]),ke=ke.concat(be.slice(Be,Le+2)),be[Le+1]!==0&&(ke=ke.concat([be[Le],0]))}else if(_e.fill==="tozerox"){for(Be=0;BeBe&&isNaN(be[Le]);)Le-=2;be[Be]!==0&&(ke=[0,be[Be+1]]),ke=ke.concat(be.slice(Be,Le+2)),be[Le]!==0&&(ke=ke.concat([0,be[Le+1]]))}else if(_e.fill==="toself"||_e.fill==="tonext"){for(ke=[],ge=0,N.splitNull=!0,re=0;re-1;for(let[N]of n)if(N){var T=N.trace,L=N.t,x=L.index,C=T._length,S=L.x,g=L.y;if(T.selectedpoints||k||M){if(k||(k=!0),T.selectedpoints){var P=a.selectBatch[x]=_K.selIndices2selPoints(T),E={};for(u=0;u{"use strict";var WBe=c7e();WBe.plot=bK();XBe.exports=WBe});var KBe=ye((O_r,YBe)=>{"use strict";YBe.exports=ZBe()});var wK=ye((B_r,eNe)=>{"use strict";var fVt=pf(),QBe=Tu(),JBe=vf().axisHoverFormat,{hovertemplateAttrs:hVt,templatefallbackAttrs:dVt}=Ll(),qk=mk(),vVt=Rh().idRegex,pVt=vl().templatedArray,b5=Ao().extendFlat,d1=fVt.marker,gVt=d1.line,mVt=b5(QBe("marker.line",{editTypeOverride:"calc"}),{width:b5({},gVt.width,{editType:"calc"}),editType:"calc"}),Rz=b5(QBe("marker"),{symbol:d1.symbol,angle:d1.angle,size:b5({},d1.size,{editType:"markerSize"}),sizeref:d1.sizeref,sizemin:d1.sizemin,sizemode:d1.sizemode,opacity:d1.opacity,colorbar:d1.colorbar,line:mVt,editType:"calc"});Rz.color.editType=Rz.cmin.editType=Rz.cmax.editType="style";function $Be(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:vVt[e],editType:"plot"}}}eNe.exports={dimensions:pVt("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:b5({},qk.text,{}),hovertext:b5({},qk.hovertext,{}),hovertemplate:hVt(),hovertemplatefallback:dVt(),xhoverformat:JBe("x"),yhoverformat:JBe("y"),marker:Rz,xaxes:$Be("x"),yaxes:$Be("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:qk.selected.marker,editType:"calc"},unselected:{marker:qk.unselected.marker,editType:"calc"},opacity:qk.opacity}});var Dz=ye((N_r,tNe)=>{"use strict";tNe.exports=function(e,t,r,n){n||(n=1/0);var i,a;for(i=0;i{"use strict";var TK=Pr(),yVt=Kd(),rNe=wK(),_Vt=Ru(),xVt=$p(),bVt=Dz(),wVt=ZF().isOpenSymbol;iNe.exports=function(t,r,n,i){function a(d,v){return TK.coerce(t,r,rNe,d,v)}var o=yVt(t,r,{name:"dimensions",handleItemDefaults:TVt}),s=a("diagonal.visible"),l=a("showupperhalf"),u=a("showlowerhalf"),c=bVt(r,o,"values");if(!c||!s&&!l&&!u){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),xVt(t,r,n,i,a,{noAngleRef:!0,noLineDash:!0,noStandOff:!0});var f=wVt(r.marker.symbol),h=_Vt.isBubble(r);a("marker.line.width",f||h?1:0),AVt(t,r,i,a),TK.coerceSelectionMarkerOpacity(r,a)};function TVt(e,t){function r(i,a){return TK.coerce(e,t,rNe.dimensions,i,a)}r("label");var n=r("values");n&&n.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function AVt(e,t,r,n){var i=t.dimensions,a=i.length,o=t.showupperhalf,s=t.showlowerhalf,l=t.diagonal.visible,u,c,f=new Array(a),h=new Array(a);for(u=0;uc&&o||u{"use strict";var aNe=Pr();oNe.exports=function(t,r){var n=t._fullLayout,i=r.uid,a=n._splomScenes;a||(a=n._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s={matrix:!1,selectBatch:[],unselectBatch:[]},l=a[r.uid];return l||(l=a[i]=aNe.extendFlat({},o,s),l.draw=function(){l.matrix&&l.matrix.draw&&(l.selectBatch.length||l.unselectBatch.length?l.matrix.draw(l.unselectBatch,l.selectBatch):l.matrix.draw()),l.dirty=!1},l.destroy=function(){l.matrix&&l.matrix.destroy&&l.matrix.destroy(),l.matrixOptions=null,l.selectBatch=null,l.unselectBatch=null,l=null}),l.dirty||aNe.extendFlat(l,o),l}});var cNe=ye((G_r,uNe)=>{"use strict";var AK=Pr(),Fz=df(),SVt=O0().calcMarkerSize,MVt=O0().calcAxisExpansion,EVt=z0(),lNe=lw().markerSelection,kVt=lw().markerStyle,CVt=sNe(),LVt=fs().BADNUM,PVt=gx().TOO_MANY_POINTS;uNe.exports=function(t,r){var n=r.dimensions,i=r._length,a={},o=a.cdata=[],s=a.data=[],l=r._visibleDims=[],u,c,f,h,d;function v(M,T){for(var L=M.makeCalcdata({v:T.values,vcalendar:r.calendar},"v"),x=0;xPVt,p;for(b?p=a.sizeAvg||Math.max(a.size,3):p=SVt(r,i),c=0;c{(function(){var e,t,r,n,i,a;typeof performance!="undefined"&&performance!==null&&performance.now?Ok.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(Ok.exports=function(){return(e()-i)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},n=e(),a=process.uptime()*1e9,i=n-a):Date.now?(Ok.exports=function(){return Date.now()-r},r=Date.now()):(Ok.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(fNe)});var vNe=ye((H_r,Oz)=>{var IVt=hNe(),v1=window,zz=["moz","webkit"],T5="AnimationFrame",A5=v1["request"+T5],Bk=v1["cancel"+T5]||v1["cancelRequest"+T5];for(w5=0;!A5&&w5{pNe.exports=function(t,r){var n=typeof t=="number",i=typeof r=="number";n&&!i?(r=t,t=0):!n&&!i&&(t=0,r=0),t=t|0,r=r|0;var a=r-t;if(a<0)throw new Error("array length must be positive");for(var o=new Array(a),s=0,l=t;s{"use strict";var RVt=xY(),DVt=ty(),FVt=nw(),mNe=vNe(),zVt=gNe(),MK=l5(),qVt=aw();_Ne.exports=Sx;function Sx(e,t){if(!(this instanceof Sx))return new Sx(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=RVt(e),this.canvas=this.scatter.canvas}Sx.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=mNe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,mNe(()=>{this.dirty=!1})),this)};Sx.prototype.update=function(...e){if(!e.length)return;for(let n=0;nb||!i.lower&&m{t[a+s]=n})}this.scatter.draw(...t)}return this};Sx.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function OVt(e,t,r){let n=e.id!=null?e.id:e,i=t,a=r;return n<<16|(i&255)<<8|a&255}function Bz(e,t,r){let n,i,a,o,s,l,u,c,f=e[t],h=e[r];return f.length>2?(n=f[0],a=f[2],i=f[1],o=f[3]):f.length?(n=i=f[0],a=o=f[1]):(n=f.x,i=f.y,a=f.x+f.width,o=f.y+f.height),h.length>2?(s=h[0],u=h[2],l=h[1],c=h[3]):h.length?(s=l=h[0],u=c=h[1]):(s=h.x,l=h.y,u=h.x+h.width,c=h.y+h.height),[s,i,u,o]}function yNe(e){if(typeof e=="number")return[e,e,e,e];if(e.length===2)return[e[0],e[1],e[0],e[1]];{let t=MK(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var wNe=ye((X_r,bNe)=>{"use strict";var BVt=xNe(),EK=Pr(),Nz=df(),NVt=Cg().selectMode;bNe.exports=function(t,r,n){if(n.length)for(var i=0;i-1,E=NVt(c)||!!i.selectedpoints||P,z=!0;if(E){var q=i._length;if(i.selectedpoints){o.selectBatch=i.selectedpoints;var V=i.selectedpoints,G={};for(d=0;d{"use strict";TNe.getDimIndex=function(t,r){for(var n=r._id,i=n.charAt(0),a={x:0,y:1}[i],o=t._visibleDims,s=0;s{"use strict";var ANe=kK(),VVt=XF().calcHover,SNe=ho().getFromId,GVt=Ao().extendFlat;function HVt(e,t,r,n,i){i||(i={});var a=(n||"").charAt(0)==="x",o=(n||"").charAt(0)==="y",s=MNe(e,t,r);if((a||o)&&i.hoversubplots==="axis"&&s[0])for(var l=(a?e.xa:e.ya)._subplotsWith,u=i.gd,c=GVt({},e),f=0;f{"use strict";var INe=Pr(),CNe=INe.pushUnique,LNe=Ru(),PNe=kK();RNe.exports=function(t,r){var n=t.cd,i=n[0].trace,a=n[0].t,o=t.scene,s=o.matrixOptions.cdata,l=t.xaxis,u=t.yaxis,c=[];if(!o)return c;var f=!LNe.hasMarkers(i)&&!LNe.hasText(i);if(i.visible!==!0||f)return c;var h=PNe.getDimIndex(i,l),d=PNe.getDimIndex(i,u);if(h===!1||d===!1)return c;var v=a.xpx[h],m=a.ypx[d],b=s[h],p=s[d],k=(t.scene.selectBatch||[]).slice(),M=[];if(r!==!1&&!r.degenerate)for(var T=0;T{"use strict";var FNe=Pr(),jVt=z0(),WVt=lw().markerStyle;zNe.exports=function(t,r){var n=r.trace,i=t._fullLayout._splomScenes[n.uid];if(i){jVt(t,n),FNe.extendFlat(i.matrixOptions,WVt(t,n));var a=FNe.extendFlat({},i.matrixOptions,i.viewOpts);i.matrix.update(a,null)}}});var BNe=ye(($_r,ONe)=>{"use strict";var XVt=Oa(),ZVt=xV();ONe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:wK(),supplyDefaults:nNe(),colorbar:Qd(),calc:cNe(),plot:wNe(),hoverPoints:kNe().hoverPoints,selectPoints:DNe(),editStyle:qNe(),meta:{}};XVt.register(ZVt)});var jNe=ye((Q_r,HNe)=>{"use strict";var YVt=JY(),KVt=Oa(),JVt=Iz(),$Vt=Id().getModuleCalcData,Mx=mh(),NNe=df().getFromId,UNe=ho().shouldShowZeroLine,VNe="splom",GNe={};function QVt(e){var t=e._fullLayout,r=KVt.getModule(VNe),n=$Vt(e.calcdata,r)[0],i=JVt(e,["ANGLE_instanced_arrays","OES_element_index_uint"],GNe);i&&(t._hasOnlyLargeSploms&&CK(e),r.plot(e,{},n))}function eGt(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&CK(e);for(var n=0;n{"use strict";var WNe=BNe();WNe.basePlotModule=jNe(),XNe.exports=WNe});var KNe=ye((txr,YNe)=>{"use strict";YNe.exports=ZNe()});var IK=ye((rxr,JNe)=>{"use strict";var nGt=Tu(),LK=Rd(),PK=ec(),aGt=Cc().attributes,Uz=Ao().extendFlat,oGt=vl().templatedArray;JNe.exports={domain:aGt({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:PK({editType:"plot"}),tickfont:PK({autoShadowDflt:!0,editType:"plot"}),rangefont:PK({editType:"plot"}),dimensions:oGt("dimension",{label:{valType:"string",editType:"plot"},tickvals:Uz({},LK.tickvals,{editType:"plot"}),ticktext:Uz({},LK.ticktext,{editType:"plot"}),tickformat:Uz({},LK.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:Uz({editType:"calc"},nGt("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"}}});var Nk=ye((ixr,$Ne)=>{"use strict";$Ne.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}});var ny=ye((nxr,eUe)=>{"use strict";var sGt=YS();function QNe(e){return[e]}eUe.exports={keyFun:function(e){return e.key},repeat:QNe,descend:sGt,wrap:QNe,unwrap:function(e){return e[0]}}});var FK=ye((axr,fUe)=>{"use strict";var Th=Nk(),im=qa(),lGt=ny().keyFun,Vz=ny().repeat,S5=Pr().sorterAsc,uGt=Pr().strTranslate,tUe=Th.bar.snapRatio;function rUe(e,t){return e*(1-tUe)+t*tUe}var iUe=Th.bar.snapClose;function cGt(e,t){return e*(1-iUe)+t*iUe}function Hz(e,t,r,n){if(fGt(r,n))return r;var i=e?-1:1,a=0,o=t.length-1;if(i<0){var s=a;a=o,o=s}for(var l=t[a],u=l,c=a;i*c=t[r][0]&&e<=t[r][1])return!0;return!1}function hGt(e){e.attr("x",-Th.bar.captureWidth/2).attr("width",Th.bar.captureWidth)}function dGt(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function vGt(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=nUe(e.brush.filter.getConsolidated(),e.height),r=[0],n,i,a,o=t.length?t[0][0]:null,s=0;se[1]+r||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}function aUe(){im.select(document.body).style("cursor",null)}function DK(e){e.attr("stroke-dasharray",vGt)}function Gz(e,t){var r=im.select(e).selectAll(".highlight, .highlight-shadow"),n=t?r.transition().duration(Th.bar.snapDuration).each("end",t):r;DK(n)}function oUe(e,t){var r=e.brush,n=r.filterSpecified,i=NaN,a={},o;if(n){var s=e.height,l=r.filter.getConsolidated(),u=nUe(l,s),c=NaN,f=NaN,h=NaN;for(o=0;o<=u.length;o++){var d=u[o];if(d&&d[0]<=t&&t<=d[1]){c=o;break}else if(f=o?o-1:NaN,d&&d[0]>t){h=o;break}}if(i=c,isNaN(i)&&(isNaN(f)||isNaN(h)?i=isNaN(f)?h:f:i=t-u[f][1]=k[0]&&p<=k[1]){a.clickableOrdinalRange=k;break}}}return a}function gGt(e,t){im.event.sourceEvent.stopPropagation();var r=t.height-im.mouse(e)[1]-2*Th.verticalPadding,n=t.unitToPaddedPx.invert(r),i=t.brush,a=oUe(t,r),o=a.interval,s=i.svgBrush;if(s.wasDragged=!1,s.grabbingBar=a.region==="ns",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-Th.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=a.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&i.filterSpecified?i.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=a.region?o[a.region==="s"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function sUe(e,t){im.event.sourceEvent.stopPropagation();var r=t.height-im.mouse(e)[1]-2*Th.verticalPadding,n=t.brush.svgBrush;n.wasDragged=!0,n._dragging=!0,n.grabbingBar?n.newExtent=[r-n.grabPoint,r+n.barLength-n.grabPoint].map(t.unitToPaddedPx.invert):n.newExtent=[n.startExtent,t.unitToPaddedPx.invert(r)].sort(S5),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),Gz(e.parentNode)}function mGt(e,t){var r=t.brush,n=r.filter,i=r.svgBrush;i._dragging||(lUe(e,t),sUe(e,t),t.brush.svgBrush.wasDragged=!1),i._dragging=!1;var a=im.event;a.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,t.parent.inBrushDrag=!1,aUe(),!i.wasDragged){i.wasDragged=void 0,i.clickableOrdinalRange?r.filterSpecified&&t.multiselect?i.extent.push(i.clickableOrdinalRange):(i.extent=[i.clickableOrdinalRange],r.filterSpecified=!0):o?(i.extent=i.stayingIntervals,i.extent.length===0&&RK(r)):RK(r),i.brushCallback(t),Gz(e.parentNode),i.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]i.newExtent[0];i.extent=i.stayingIntervals.concat(u?[i.newExtent]:[]),i.extent.length||RK(r),i.brushCallback(t),u?Gz(e.parentNode,s):(s(),Gz(e.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function lUe(e,t){var r=t.height-im.mouse(e)[1]-2*Th.verticalPadding,n=oUe(t,r),i="crosshair";n.clickableOrdinalRange?i="pointer":n.region&&(i=n.region+"-resize"),im.select(document.body).style("cursor",i)}function yGt(e){e.on("mousemove",function(t){im.event.preventDefault(),t.parent.inBrushDrag||lUe(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||aUe()}).call(im.behavior.drag().on("dragstart",function(t){gGt(this,t)}).on("drag",function(t){sUe(this,t)}).on("dragend",function(t){mGt(this,t)}))}function uUe(e,t){return e[0]-t[0]}function _Gt(e,t,r){var n=r._context.staticPlot,i=e.selectAll(".background").data(Vz);i.enter().append("rect").classed("background",!0).call(hGt).call(dGt).style("pointer-events",n?"none":"auto").attr("transform",uGt(0,Th.verticalPadding)),i.call(yGt).attr("height",function(s){return s.height-Th.verticalPadding});var a=e.selectAll(".highlight-shadow").data(Vz);a.enter().append("line").classed("highlight-shadow",!0).attr("x",-Th.bar.width/2).attr("stroke-width",Th.bar.width+Th.bar.strokeWidth).attr("stroke",t).attr("opacity",Th.bar.strokeOpacity).attr("stroke-linecap","butt"),a.attr("y1",function(s){return s.height}).call(DK);var o=e.selectAll(".highlight").data(Vz);o.enter().append("line").classed("highlight",!0).attr("x",-Th.bar.width/2).attr("stroke-width",Th.bar.width-Th.bar.strokeWidth).attr("stroke",Th.bar.fillColor).attr("opacity",Th.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(DK)}function xGt(e,t,r){var n=e.selectAll("."+Th.cn.axisBrush).data(Vz,lGt);n.enter().append("g").classed(Th.cn.axisBrush,!0),_Gt(n,t,r)}function bGt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function RK(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function wGt(e){return function(r){var n=r.brush,i=bGt(n),a=i.slice();n.filter.set(a),e()}}function cUe(e){for(var t=e.slice(),r=[],n,i=t.shift();i;){for(n=i.slice();(i=t.shift())&&i[0]<=n[1];)n[1]=Math.max(n[1],i[1]);r.push(n)}return r.length===1&&r[0][0]>r[0][1]&&(r=[]),r}function TGt(){var e=[],t,r;return{set:function(n){e=n.map(function(i){return i.slice().sort(S5)}).sort(uUe),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=cUe(e),r=e.reduce(function(i,a){return[Math.min(i[0],a[0]),Math.max(i[1],a[1])]},[1/0,-1/0])},get:function(){return e.slice()},getConsolidated:function(){return t},getBounds:function(){return r}}}function AGt(e,t,r,n,i,a){var o=TGt();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:wGt(i),brushEndCallback:a}}}function SGt(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(S5)}),t.multiselect?e=cUe(e.sort(uUe)):e=[e[0]]):e=[e.sort(S5)],t.tickvals){var r=t.tickvals.slice().sort(S5);if(e=e.map(function(n){var i=[Hz(0,r,n[0],[]),Hz(1,r,n[1],[])];if(i[1]>i[0])return i}).filter(function(n){return n}),!e.length)return}return e.length>1?e:e[0]}fUe.exports={makeBrush:AGt,ensureAxisBrush:xGt,cleanRanges:SGt}});var vUe=ye((oxr,dUe)=>{"use strict";var Ex=Pr(),MGt=pv().hasColorscale,EGt=td(),kGt=Cc().defaults,CGt=Kd(),LGt=ho(),hUe=IK(),PGt=FK(),zK=Nk().maxDimensionCount,IGt=Dz();function RGt(e,t,r,n,i){var a=i("line.color",r);if(MGt(e,"line")&&Ex.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),EGt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function DGt(e,t,r,n){function i(u,c){return Ex.coerce(e,t,hUe.dimensions,u,c)}var a=i("values"),o=i("visible");if(a&&a.length||(o=t.visible=!1),o){i("label"),i("tickvals"),i("ticktext"),i("tickformat");var s=i("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:s},LGt.setConvert(t._ax,n.layout),i("multiselect");var l=i("constraintrange");l&&(t.constraintrange=PGt.cleanRanges(l,t))}}dUe.exports=function(t,r,n,i){function a(c,f){return Ex.coerce(t,r,hUe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>zK&&(Ex.log("parcoords traces support up to "+zK+" dimensions at the moment"),o.splice(zK));var s=CGt(t,r,{name:"dimensions",layout:i,handleItemDefaults:DGt}),l=RGt(t,r,n,i,a);kGt(r,i,a),(!Array.isArray(s)||!s.length)&&(r.visible=!1),IGt(r,s,"values",l);var u=Ex.extendFlat({},i.font,{size:Math.round(i.font.size/1.2)});Ex.coerceFont(a,"labelfont",u),Ex.coerceFont(a,"tickfont",u,{autoShadowDflt:!0}),Ex.coerceFont(a,"rangefont",u),a("labelangle"),a("labelside"),a("unselected.line.color"),a("unselected.line.opacity")}});var gUe=ye((sxr,pUe)=>{"use strict";var FGt=Pr().isArrayOrTypedArray,qK=tc(),zGt=ny().wrap;pUe.exports=function(t,r){var n,i;return qK.hasColorscale(r,"line")&&FGt(r.line.color)?(n=r.line.color,i=qK.extractOpts(r.line).colorscale,qK.calc(t,r,{vals:n,containerStr:"line",cLetter:"c"})):(n=qGt(r._length),i=[[0,r.line.color],[1,r.line.color]]),zGt({lineColor:n,cscale:i})};function qGt(e){for(var t=new Array(e),r=0;r>>16,(e&65280)>>>8,e&255],alpha:1};if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(e=String(e).toLowerCase(),OK.default[e])r=OK.default[e].slice(),i="rgb";else if(e==="transparent")n=0,i="rgb",r=[0,0,0];else if(e[0]==="#"){var a=e.slice(1),o=a.length,s=o<=4;n=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(e)){var l=t[1];i=l.replace(/a$/,"");var u=i==="cmyk"?4:i==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/),i==="color"&&(i=r.shift()),r=r.map(function(h,d){if(h[h.length-1]==="%")return h=parseFloat(h)/100,d===3?h:i==="rgb"?h*255:i[0]==="h"||i[0]==="l"&&!d?h*100:i==="lab"?h*125:i==="lch"?d<2?h*150:h*360:i[0]==="o"&&!d?h:i==="oklab"?h*.4:i==="oklch"?d<2?h*.4:h*360:h;if(i[d]==="h"||d===2&&i[i.length-1]==="h"){if(mUe[h]!==void 0)return mUe[h];if(h.endsWith("deg"))return parseFloat(h);if(h.endsWith("turn"))return parseFloat(h)*360;if(h.endsWith("grad"))return parseFloat(h)*360/400;if(h.endsWith("rad"))return parseFloat(h)*180/Math.PI}return h==="none"?0:parseFloat(h)}),n=r.length>u?r.pop():1}else/[0-9](?:\s|\/|,)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),i=((f=(c=e.match(/([a-z])/ig))==null?void 0:c.join(""))==null?void 0:f.toLowerCase())||"rgb");return{space:i,values:r,alpha:n}}var OK,yUe,mUe,_Ue=gu(()=>{OK=ktt(AX(),1),yUe=OGt,mUe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}});var Uk,BK=gu(()=>{Uk={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}});var jz,xUe=gu(()=>{BK();jz={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,a,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(a=n<.5?n*(1+r):n+r-n*r,i=2*n-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?i+(a-i)*6*o:2*o<1?a:3*o<2?i+(a-i)*(2/3-o)*6:i,s[u++]=l*255;return s}};Uk.hsl=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s,l,u;return a===i?s=0:t===a?s=(r-n)/o:r===a?s=2+(n-t)/o:n===a&&(s=4+(t-r)/o),s=Math.min(s*60,360),s<0&&(s+=360),u=(i+a)/2,a===i?l=0:u<=.5?l=o/(a+i):l=o/(2-a-i),[s,l*100,u*100]}});var wUe={};yee(wUe,{default:()=>bUe});function bUe(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments)),e instanceof Number&&(e=+e);var t,r,n,i=yUe(e);if(!i.space)return[];let a=i.space[0]==="h"?jz.min:Uk.min,o=i.space[0]==="h"?jz.max:Uk.max;return t=Array(3),t[0]=Math.min(Math.max(i.values[0],a[0]),o[0]),t[1]=Math.min(Math.max(i.values[1],a[1]),o[1]),t[2]=Math.min(Math.max(i.values[2],a[2]),o[2]),i.space[0]==="h"&&(t=jz.rgb(t)),t.push(Math.min(Math.max(i.alpha,0),1)),t}var TUe=gu(()=>{_Ue();BK();xUe()});var NK=ye(Wz=>{"use strict";var BGt=Pr().isTypedArray;Wz.convertTypedArray=function(e){return BGt(e)?Array.prototype.slice.call(e):e};Wz.isOrdinal=function(e){return!!e.tickvals};Wz.isVisible=function(e){return e.visible||!("visible"in e)}});var RUe=ye((gxr,IUe)=>{"use strict";var NGt=["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(` +`),UGt=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` +`),Vk=Nk().maxDimensionCount,CUe=Pr(),AUe=1e-6,Xz=2048,VGt=new Uint8Array(4),SUe=new Uint8Array(4),MUe={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function GGt(e){e.read({x:0,y:0,width:1,height:1,data:VGt})}function LUe(e,t,r,n,i){var a=e._gl;a.enable(a.SCISSOR_TEST),a.scissor(t,r,n,i),e.clear({color:[0,0,0,0],depth:1})}function HGt(e,t,r,n,i,a){var o=a.key;function s(l){var u=Math.min(n,i-l*n);l===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],LUe(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),!r.clearOnly&&(a.count=2*u,a.offset=2*l*n,t(a),l*n+u>>8*t)%256/255}function XGt(e,t,r){for(var n=new Array(e*(Vk+4)),i=0,a=0;aZ&&(Z=S[z].dim1.canvasX,V=z);E===0&&LUe(i,0,0,u.canvasWidth,u.canvasHeight);var j=M(r);for(z=0;z{"use strict";var Bd=qa(),p1=Pr(),VK=p1.isArrayOrTypedArray,BUe=p1.numberFormat,NUe=(TUe(),gb(wUe)).default,UUe=ho(),$Gt=p1.strRotate,ay=p1.strTranslate,QGt=Zl(),Zz=So(),DUe=tc(),jK=ny(),ig=jK.keyFun,oy=jK.repeat,VUe=jK.unwrap,M5=NK(),Dl=Nk(),GUe=FK(),eHt=RUe();function FUe(e,t,r){return p1.aggNums(e,null,t,r)}function HUe(e,t){return WK(FUe(Math.min,e,t),FUe(Math.max,e,t))}function Yz(e){var t=e.range;return t?WK(t[0],t[1]):HUe(e.values,e._length)}function WK(e,t){return(isNaN(e)||!isFinite(e))&&(e=0),(isNaN(t)||!isFinite(t))&&(t=0),e===t&&(e===0?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function tHt(e,t){return t?function(r,n){var i=t[n];return i==null?e(r):i}:e}function rHt(e,t,r,n,i){var a=Yz(r);return n?Bd.scale.ordinal().domain(n.map(tHt(BUe(r.tickformat),i))).range(n.map(function(o){var s=(o-a[0])/(a[1]-a[0]);return e-t+s*(2*t-e)})):Bd.scale.linear().domain(a).range([e-t,t])}function iHt(e,t){return Bd.scale.linear().range([t,e-t])}function nHt(e,t){return Bd.scale.linear().domain(Yz(e)).range([t,1-t])}function aHt(e){if(e.tickvals){var t=Yz(e);return Bd.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function oHt(e){var t=e.map(function(a){return a[0]}),r=e.map(function(a){var o=NUe(a[1]);return Bd.rgb("rgb("+o[0]+","+o[1]+","+o[2]+")")}),n=function(a){return function(o){return o[a]}},i="rgb".split("").map(function(a){return Bd.scale.linear().clamp(!0).domain(t).range(r.map(n(a)))});return function(a){return i.map(function(o){return o(a)})}}function HK(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function sHt(e,t,r){var n=VUe(t),i=n.trace,a=M5.convertTypedArray(n.lineColor),o=i.line,s={color:NUe(i.unselected.line.color),opacity:i.unselected.line.opacity},l=DUe.extractOpts(o),u=l.reversescale?DUe.flipScale(n.cscale):n.cscale,c=i.domain,f=i.dimensions,h=e.width,d=i.labelangle,v=i.labelside,m=i.labelfont,b=i.tickfont,p=i.rangefont,k=p1.extendDeepNoArrays({},o,{color:a.map(Bd.scale.linear().domain(Yz({values:a,range:[l.min,l.max],_length:i._length}))),blockLineCount:Dl.blockLineCount,canvasOverdrag:Dl.overdrag*Dl.canvasPixelRatio}),M=Math.floor(h*(c.x[1]-c.x[0])),T=Math.floor(e.height*(c.y[1]-c.y[0])),L=e.margin||{l:80,r:80,t:100,b:80},x=M,C=T;return{key:r,colCount:f.filter(M5.isVisible).length,dimensions:f,tickDistance:Dl.tickDistance,unitToColor:oHt(u),lines:k,deselectedLines:s,labelAngle:d,labelSide:v,labelFont:m,tickFont:b,rangeFont:p,layoutWidth:h,layoutHeight:e.height,domain:c,translateX:c.x[0]*h,translateY:e.height-c.y[1]*e.height,pad:L,canvasWidth:x*Dl.canvasPixelRatio+2*k.canvasOverdrag,canvasHeight:C*Dl.canvasPixelRatio,width:x,height:C,canvasPixelRatio:Dl.canvasPixelRatio}}function lHt(e,t,r){var n=r.width,i=r.height,a=r.dimensions,o=r.canvasPixelRatio,s=function(h){return n*h/Math.max(1,r.colCount-1)},l=Dl.verticalPadding/i,u=iHt(i,Dl.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=a.filter(M5.isVisible).map(function(h,d){var v=nHt(h,l),m=f[h.label];f[h.label]=(m||0)+1;var b=h.label+(m?"__"+m:""),p=h.constraintrange,k=p&&p.length;k&&!VK(p[0])&&(p=[p]);var M=k?p.map(function(q){return q.map(v)}):[[-1/0,1/0]],T=function(){var q=c;q.focusLayer&&q.focusLayer.render(q.panels,!0);var V=HK(q);!e.contextShown()&&V?(q.contextLayer&&q.contextLayer.render(q.panels,!0),e.contextShown(!0)):e.contextShown()&&!V&&(q.contextLayer&&q.contextLayer.render(q.panels,!0,!0),e.contextShown(!1))},L=h.values;L.length>h._length&&(L=L.slice(0,h._length));var x=h.tickvals,C;function S(q,V){return{val:q,text:C[V]}}function g(q,V){return q.val-V.val}if(VK(x)&&x.length){p1.isTypedArray(x)&&(x=Array.from(x)),C=h.ticktext,!VK(C)||!C.length?C=x.map(BUe(h.tickformat)):C.length>x.length?C=C.slice(0,x.length):x.length>C.length&&(x=x.slice(0,C.length));for(var P=1;P=V||N>=G)return;var H=z.lineLayer.readPixel(j,G-1-N),ie=H[3]!==0,ae=ie?H[2]+256*(H[1]+256*H[0]):null,_e={x:j,y:N,clientX:q.clientX,clientY:q.clientY,dataIndex:z.model.key,curveNumber:ae};ae!==v&&(ie?i.hover(_e):i.unhover&&i.unhover(_e),v=ae)}}),d.style("opacity",function(z){return z.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var b=s.selectAll("."+Dl.cn.parcoords).data(h,ig);b.exit().remove(),b.enter().append("g").classed(Dl.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),b.attr("transform",function(z){return ay(z.model.translateX,z.model.translateY)});var p=b.selectAll("."+Dl.cn.parcoordsControlView).data(oy,ig);p.enter().append("g").classed(Dl.cn.parcoordsControlView,!0),p.attr("transform",function(z){return ay(z.model.pad.l,z.model.pad.t)});var k=p.selectAll("."+Dl.cn.yAxis).data(function(z){return z.dimensions},ig);k.enter().append("g").classed(Dl.cn.yAxis,!0),p.each(function(z){GK(k,z,u)}),d.each(function(z){if(z.viewModel){!z.lineLayer||i?z.lineLayer=eHt(this,z):z.lineLayer.update(z),(z.key||z.key===0)&&(z.viewModel[z.key]=z.lineLayer);var q=!z.context||i;z.lineLayer.render(z.viewModel.panels,q)}}),k.attr("transform",function(z){return ay(z.xScale(z.xIndex),0)}),k.call(Bd.behavior.drag().origin(function(z){return z}).on("drag",function(z){var q=z.parent;f.linePickActive(!1),z.x=Math.max(-Dl.overdrag,Math.min(z.model.width+Dl.overdrag,Bd.event.x)),z.canvasX=z.x*z.model.canvasPixelRatio,k.sort(function(V,G){return V.x-G.x}).each(function(V,G){V.xIndex=G,V.x=z===V?V.x:V.xScale(V.xIndex),V.canvasX=V.x*V.model.canvasPixelRatio}),GK(k,q,u),k.filter(function(V){return Math.abs(z.xIndex-V.xIndex)!==0}).attr("transform",function(V){return ay(V.xScale(V.xIndex),0)}),Bd.select(this).attr("transform",ay(z.x,0)),k.each(function(V,G,Z){Z===z.parent.key&&(q.dimensions[G]=V)}),q.contextLayer&&q.contextLayer.render(q.panels,!1,!HK(q)),q.focusLayer.render&&q.focusLayer.render(q.panels)}).on("dragend",function(z){var q=z.parent;z.x=z.xScale(z.xIndex),z.canvasX=z.x*z.model.canvasPixelRatio,GK(k,q,u),Bd.select(this).attr("transform",function(V){return ay(V.x,0)}),q.contextLayer&&q.contextLayer.render(q.panels,!1,!HK(q)),q.focusLayer&&q.focusLayer.render(q.panels),q.pickLayer&&q.pickLayer.render(q.panels,!0),f.linePickActive(!0),i&&i.axesMoved&&i.axesMoved(q.key,q.dimensions.map(function(V){return V.crossfilterDimensionIndex}))})),k.exit().remove();var M=k.selectAll("."+Dl.cn.axisOverlays).data(oy,ig);M.enter().append("g").classed(Dl.cn.axisOverlays,!0),M.selectAll("."+Dl.cn.axis).remove();var T=M.selectAll("."+Dl.cn.axis).data(oy,ig);T.enter().append("g").classed(Dl.cn.axis,!0),T.each(function(z){var q=z.model.height/z.model.tickDistance,V=z.domainScale,G=V.domain();Bd.select(this).call(Bd.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(q,z.tickFormat).tickValues(z.ordinal?G:null).tickFormat(function(Z){return M5.isOrdinal(z)?Z:jUe(z.model.dimensions[z.visibleIndex],Z)}).scale(V)),Zz.font(T.selectAll("text"),z.model.tickFont)}),T.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),T.selectAll("text").style("cursor","default");var L=M.selectAll("."+Dl.cn.axisHeading).data(oy,ig);L.enter().append("g").classed(Dl.cn.axisHeading,!0);var x=L.selectAll("."+Dl.cn.axisTitle).data(oy,ig);x.enter().append("text").classed(Dl.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",a?"none":"auto"),x.text(function(z){return z.label}).each(function(z){var q=Bd.select(this);Zz.font(q,z.model.labelFont),QGt.convertToTspans(q,t)}).attr("transform",function(z){var q=qUe(z.model.labelAngle,z.model.labelSide),V=Dl.axisTitleOffset;return(q.dir>0?"":ay(0,2*V+z.model.height))+$Gt(q.degrees)+ay(-V*q.dx,-V*q.dy)}).attr("text-anchor",function(z){var q=qUe(z.model.labelAngle,z.model.labelSide),V=Math.abs(q.dx),G=Math.abs(q.dy);return 2*V>G?q.dir*q.dx<0?"start":"end":"middle"});var C=M.selectAll("."+Dl.cn.axisExtent).data(oy,ig);C.enter().append("g").classed(Dl.cn.axisExtent,!0);var S=C.selectAll("."+Dl.cn.axisExtentTop).data(oy,ig);S.enter().append("g").classed(Dl.cn.axisExtentTop,!0),S.attr("transform",ay(0,-Dl.axisExtentOffset));var g=S.selectAll("."+Dl.cn.axisExtentTopText).data(oy,ig);g.enter().append("text").classed(Dl.cn.axisExtentTopText,!0).call(zUe),g.text(function(z){return OUe(z,!0)}).each(function(z){Zz.font(Bd.select(this),z.model.rangeFont)});var P=C.selectAll("."+Dl.cn.axisExtentBottom).data(oy,ig);P.enter().append("g").classed(Dl.cn.axisExtentBottom,!0),P.attr("transform",function(z){return ay(0,z.model.height+Dl.axisExtentOffset)});var E=P.selectAll("."+Dl.cn.axisExtentBottomText).data(oy,ig);E.enter().append("text").classed(Dl.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(zUe),E.text(function(z){return OUe(z,!1)}).each(function(z){Zz.font(Bd.select(this),z.model.rangeFont)}),GUe.ensureAxisBrush(M,c,t)}});var ZK=ye((XK,JUe)=>{"use strict";var fHt=XUe(),hHt=Iz(),ZUe=NK().isVisible,KUe={};function YUe(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return i===-1&&(i+=t.length),i}function dHt(e,t){return function(n,i){return YUe(e,t,n)-YUe(e,t,i)}}var XK=JUe.exports=function(t,r){var n=t._fullLayout,i=hHt(t,[],KUe);if(i){var a={},o={},s={},l={},u=n._size;r.forEach(function(v,m){var b=v[0].trace;s[m]=b.index;var p=l[m]=b.index;a[m]=t.data[p].dimensions,o[m]=t.data[p].dimensions.slice()});var c=function(v,m,b){var p=o[v][m],k=b.map(function(S){return S.slice()}),M="dimensions["+m+"].constraintrange",T=n._tracePreGUI[t._fullData[s[v]]._fullInput.uid];if(T[M]===void 0){var L=p.constraintrange;T[M]=L||null}var x=t._fullData[s[v]].dimensions[m];k.length?(k.length===1&&(k=k[0]),p.constraintrange=k,x.constraintrange=k.slice(),k=[k]):(delete p.constraintrange,delete x.constraintrange,k=null);var C={};C[M]=k,t.emit("plotly_restyle",[C,[l[v]]])},f=function(v){t.emit("plotly_hover",v)},h=function(v){t.emit("plotly_unhover",v)},d=function(v,m){var b=dHt(m,o[v].filter(ZUe));a[v].sort(b),o[v].filter(function(p){return!ZUe(p)}).sort(function(p){return o[v].indexOf(p)}).forEach(function(p){a[v].splice(a[v].indexOf(p),1),a[v].splice(o[v].indexOf(p),0,p)}),t.emit("plotly_restyle",[{dimensions:[a[v]]},[l[v]]])};fHt(t,r,{width:u.w,height:u.h,margin:{t:u.t,r:u.r,b:u.b,l:u.l}},{filterChanged:c,hover:f,unhover:h,axesMoved:d})}};XK.reglPrecompiled=KUe});var QUe=ye(Gk=>{"use strict";var $Ue=qa(),vHt=Id().getModuleCalcData,pHt=ZK(),gHt=Wp();Gk.name="parcoords";Gk.plot=function(e){var t=vHt(e.calcdata,"parcoords")[0];t.length&&pHt(e,t)};Gk.clean=function(e,t,r,n){var i=n._has&&n._has("parcoords"),a=t._has&&t._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())};Gk.toSVG=function(e){var t=e._fullLayout._glimages,r=$Ue.select(e).selectAll(".svg-container"),n=r.filter(function(a,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function i(){var a=this,o=a.toDataURL("image/png"),s=t.append("svg:image");s.attr({xmlns:gHt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}n.each(i),window.setTimeout(function(){$Ue.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var tVe=ye((_xr,eVe)=>{"use strict";eVe.exports={attributes:IK(),supplyDefaults:vUe(),calc:gUe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:QUe(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var nVe=ye((xxr,iVe)=>{"use strict";var rVe=tVe();rVe.plot=ZK();iVe.exports=rVe});var oVe=ye((bxr,aVe)=>{"use strict";aVe.exports=nVe()});var YK=ye((wxr,fVe)=>{"use strict";var lVe=Ao().extendFlat,mHt=Gl(),sVe=ec(),yHt=Tu(),{hovertemplateAttrs:uVe,templatefallbackAttrs:cVe}=Ll(),_Ht=Cc().attributes,xHt=lVe({editType:"calc"},yHt("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:uVe({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:cVe({editType:"plot"})});fVe.exports={domain:_Ht({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:lVe({},mHt.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:uVe({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:cVe({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:sVe({editType:"calc"}),tickfont:sVe({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:xHt,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}});var vVe=ye((Txr,dVe)=>{"use strict";var E5=Pr(),bHt=pv().hasColorscale,wHt=td(),THt=Cc().defaults,AHt=Kd(),hVe=YK(),SHt=Dz(),MHt=Yd().isTypedArraySpec;function EHt(e,t,r,n,i){i("line.shape"),i("line.hovertemplate"),i("line.hovertemplatefallback");var a=i("line.color",n.colorway[0]);if(bHt(e,"line")&&E5.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),wHt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function kHt(e,t){function r(u,c){return E5.coerce(e,t,hVe.dimensions,u,c)}var n=r("values"),i=r("visible");if(n&&n.length||(i=t.visible=!1),i){r("label"),r("displayindex",t._index);var a=e.categoryarray,o=E5.isArrayOrTypedArray(a)&&a.length>0||MHt(a),s;o&&(s="array");var l=r("categoryorder",s);l==="array"?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),!o&&l==="array"&&(t.categoryorder="trace")}}dVe.exports=function(t,r,n,i){function a(u,c){return E5.coerce(t,r,hVe,u,c)}var o=AHt(t,r,{name:"dimensions",handleItemDefaults:kHt}),s=EHt(t,r,n,i,a);THt(r,i,a),(!Array.isArray(o)||!o.length)&&(r.visible=!1),SHt(r,o,"values",s),a("hoveron"),a("hovertemplate"),a("hovertemplatefallback"),a("arrangement"),a("bundlecolors"),a("sortpaths"),a("counts");var l=i.font;E5.coerceFont(a,"labelfont",l,{overrideDflt:{size:Math.round(l.size)}}),E5.coerceFont(a,"tickfont",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var gVe=ye((Axr,pVe)=>{"use strict";var CHt=ny().wrap,LHt=pv().hasColorscale,PHt=gv(),IHt=iO(),RHt=So(),Hk=Pr(),DHt=Eo();pVe.exports=function(t,r){var n=Hk.filterVisible(r.dimensions);if(n.length===0)return[];var i=n.map(function(g){var P;if(g.categoryorder==="trace")P=null;else if(g.categoryorder==="array")P=g.categoryarray;else{P=IHt(g.values);for(var E=!0,z=0;z=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var SVe=ye((Sxr,AVe)=>{"use strict";var Fl=qa(),jHt=(j2(),gb(H2)).interpolateNumber,WHt=YP(),Xk=ef(),kx=Pr(),jk=kx.strTranslate,mVe=So(),KK=fd(),XHt=Zl();function ZHt(e,t,r,n){var i=t._context.staticPlot,a=e.map(ujt.bind(0,t,r)),o=n.selectAll("g.parcatslayer").data([null]);o.enter().append("g").attr("class","parcatslayer").style("pointer-events",i?"none":"all");var s=o.selectAll("g.trace.parcats").data(a,g1),l=s.enter().append("g").attr("class","trace parcats");s.attr("transform",function(k){return jk(k.x,k.y)}),l.append("g").attr("class","paths");var u=s.select("g.paths"),c=u.selectAll("path.path").data(function(k){return k.paths},g1);c.attr("fill",function(k){return k.model.color});var f=c.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(k){return k.model.color}).attr("fill-opacity",0);QK(f),c.attr("d",function(k){return k.svgD}),f.empty()||c.sort(JK),c.exit().remove(),c.on("mouseover",YHt).on("mouseout",KHt).on("click",JHt),l.append("g").attr("class","dimensions");var h=s.select("g.dimensions"),d=h.selectAll("g.dimension").data(function(k){return k.dimensions},g1);d.enter().append("g").attr("class","dimension"),d.attr("transform",function(k){return jk(k.x,0)}),d.exit().remove();var v=d.selectAll("g.category").data(function(k){return k.categories},g1),m=v.enter().append("g").attr("class","category");v.attr("transform",function(k){return jk(0,k.y)}),m.append("rect").attr("class","catrect").attr("pointer-events","none"),v.select("rect.catrect").attr("fill","none").attr("width",function(k){return k.width}).attr("height",function(k){return k.height}),_Ve(m);var b=v.selectAll("rect.bandrect").data(function(k){return k.bands},g1);b.each(function(){kx.raiseToTop(this)}),b.attr("fill",function(k){return k.color});var p=b.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(k){return k.color}).attr("fill-opacity",0);b.attr("fill",function(k){return k.color}).attr("width",function(k){return k.width}).attr("height",function(k){return k.height}).attr("y",function(k){return k.y}).attr("cursor",function(k){return k.parcatsViewModel.arrangement==="fixed"?"default":k.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),tJ(p),b.exit().remove(),m.append("text").attr("class","catlabel").attr("pointer-events","none"),v.select("text.catlabel").attr("text-anchor",function(k){return Wk(k)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(k){return Wk(k)?k.width+5:-5}).attr("y",function(k){return k.height/2}).text(function(k){return k.model.categoryLabel}).each(function(k){mVe.font(Fl.select(this),k.parcatsViewModel.categorylabelfont),XHt.convertToTspans(Fl.select(this),t)}),m.append("text").attr("class","dimlabel"),v.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(k){return k.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(k){return k.width/2}).attr("y",-5).text(function(k,M){return M===0?k.parcatsViewModel.model.dimensions[k.model.dimensionInd].dimensionLabel:null}).each(function(k){mVe.font(Fl.select(this),k.parcatsViewModel.labelfont)}),v.selectAll("rect.bandrect").on("mouseover",njt).on("mouseout",ajt),v.exit().remove(),d.call(Fl.behavior.drag().origin(function(k){return{x:k.x,y:0}}).on("dragstart",ojt).on("drag",sjt).on("dragend",ljt)),s.each(function(k){k.traceSelection=Fl.select(this),k.pathSelection=Fl.select(this).selectAll("g.paths").selectAll("path.path"),k.dimensionSelection=Fl.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}AVe.exports=function(e,t,r,n){ZHt(r,e,n,t)};function g1(e){return e.key}function Wk(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function JK(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor"),x=Fl.mouse(i)[0];Xk.loneHover({trace:a,x:v-s.left+l.left,y:m-s.top+l.top,text:L,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:b,idealAlign:x1&&u.displayInd===l.dimensions.length-1?(h=o.left,d="left"):(h=o.left+o.width,d="right");var v=s.model.count,m=s.model.categoryLabel,b=v/s.parcatsViewModel.model.count,p={countLabel:v,categoryLabel:m,probabilityLabel:b.toFixed(3)},k=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&k.push(["Count:",p.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&k.push(["P("+p.categoryLabel+"):",p.probabilityLabel].join(" "));var M=k.join("
");return{trace:c,x:n*(h-t.left),y:i*(f-t.top),text:M,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:p,eventData:[{data:c._input,fullData:c,count:v,category:m,probability:b}]}}function rjt(e,t,r){var n=[];return Fl.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var i=this;n.push(xVe(e,t,i))}),n}function ijt(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,i=e._fullLayout._invScaleY,a=r.getBoundingClientRect(),o=Fl.select(r).datum(),s=o.categoryViewModel,l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=a.y+a.height/2,h,d;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=a.left,d="left"):(h=a.left+a.width,d="right");var v=s.model.categoryLabel,m=o.parcatsViewModel.model.count,b=0;o.categoryViewModel.bands.forEach(function(P){P.color===o.color&&(b+=P.count)});var p=s.model.count,k=0;l.pathSelection.each(function(P){P.model.color===o.color&&(k+=P.model.count)});var M=b/m,T=b/k,L=b/p,x={countLabel:b,categoryLabel:v,probabilityLabel:M.toFixed(3)},C=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&C.push(["Count:",x.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(C.push("P(color \u2229 "+v+"): "+x.probabilityLabel),C.push("P("+v+" | color): "+T.toFixed(3)),C.push("P(color | "+v+"): "+L.toFixed(3)));var S=C.join("
"),g=KK.mostReadable(o.color,["black","white"]);return{trace:c,x:n*(h-t.left),y:i*(f-t.top),text:S,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:g,fontSize:10,idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:x,eventData:[{data:c._input,fullData:c,category:v,count:m,probability:M,categorycount:p,colorcount:k,bandcolorcount:b}]}}function njt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=Fl.mouse(this)[1];if(t<-1)return;var r=e.parcatsViewModel.graphDiv,n=r._fullLayout,i=n._paperdiv.node().getBoundingClientRect(),a=e.parcatsViewModel.hoveron,o=this;if(a==="color"?(tjt(o),iJ(o,"plotly_hover",Fl.event)):(ejt(o),rJ(o,"plotly_hover",Fl.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;a==="category"?s=xVe(r,i,o):a==="color"?s=ijt(r,i,o):a==="dimension"&&(s=rjt(r,i,o)),s&&Xk.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function ajt(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(QK(t.pathSelection),_Ve(t.dimensionSelection.selectAll("g.category")),tJ(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),Xk.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(JK),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r==="color"?iJ(n,"plotly_unhover",Fl.event):rJ(n,"plotly_unhover",Fl.event)}}function ojt(e){e.parcatsViewModel.arrangement!=="fixed"&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,Fl.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=Fl.mouse(this)[0],n=Fl.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=n&&n<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(i){return i.displayInd}),t.model.dragY=t.y,kx.raiseToTop(this.parentNode),Fl.select(this.parentNode).selectAll("rect.bandrect").each(function(i){i.yc.y+c.height/2&&(a.model.displayInd=c.model.displayInd,c.model.displayInd=s),e.dragCategoryDisplayInd=a.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement==="freeform"){i.model.dragX=Fl.event.x;var f=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[n];f!==void 0&&i.model.dragXh.x&&(i.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=i.model.displayInd}aJ(e.parcatsViewModel),nJ(e.parcatsViewModel),TVe(e.parcatsViewModel),wVe(e.parcatsViewModel)}}function ljt(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){Fl.select(this).selectAll("text").attr("font-weight","normal");var t={},r=bVe(e.parcatsViewModel),n=e.parcatsViewModel.model.dimensions.map(function(h){return h.displayInd}),i=e.initialDragDimensionDisplayInds.some(function(h,d){return h!==n[d]});i&&n.forEach(function(h,d){var v=e.parcatsViewModel.model.dimensions[d].containerInd;t["dimensions["+v+"].displayindex"]=h});var a=!1;if(e.dragCategoryDisplayInd!==null){var o=e.model.categories.map(function(h){return h.displayInd});if(a=e.initialDragCategoryDisplayInds.some(function(h,d){return h!==o[d]}),a){var s=e.model.categories.slice().sort(function(h,d){return h.displayInd-d.displayInd}),l=s.map(function(h){return h.categoryValue}),u=s.map(function(h){return h.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[l],t["dimensions["+e.model.containerInd+"].ticktext"]=[u],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron==="color"?iJ(e.potentialClickBand,"plotly_click",Fl.event.sourceEvent):rJ(e.potentialClickBand,"plotly_click",Fl.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var c=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];c.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,aJ(e.parcatsViewModel),nJ(e.parcatsViewModel);var f=Fl.transition().duration(300).ease("cubic-in-out");f.each(function(){TVe(e.parcatsViewModel,!0),wVe(e.parcatsViewModel,!0)}).each("end",function(){(i||a)&&WHt.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function bVe(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;l--)u+="C"+o[l]+","+(t[l+1]+n)+" "+a[l]+","+(t[l]+n)+" "+(e[l]+r[l])+","+(t[l]+n),u+="l-"+r[l]+",0 ";return u+="Z",u}function nJ(e){var t=e.dimensions,r=e.model,n=t.map(function(q){return q.categories.map(function(V){return V.y})}),i=e.model.dimensions.map(function(q){return q.categories.map(function(V){return V.displayInd})}),a=e.model.dimensions.map(function(q){return q.displayInd}),o=e.dimensions.map(function(q){return q.model.dimensionInd}),s=t.map(function(q){return q.x}),l=t.map(function(q){return q.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(q){var V=q.categoryInds.map(function(Z,j){return i[j][Z]}),G=o.map(function(Z){return V[Z]});return G}u.sort(function(q,V){var G=f(q),Z=f(V);return e.sortpaths==="backward"&&(G.reverse(),Z.reverse()),G.push(q.valueInds[0]),Z.push(V.valueInds[0]),e.bundlecolors&&(G.unshift(q.rawColor),Z.unshift(V.rawColor)),GZ?1:0});for(var h=new Array(u.length),d=t[0].model.count,v=t[0].categories.map(function(q){return q.height}).reduce(function(q,V){return q+V}),m=0;m0?p=v*(b.count/d):p=0;for(var k=new Array(n.length),M=0;M1?o=(e.width-2*r-n)/(i-1):o=0,s=r,l=s+o*a;var u=[],c=e.model.maxCats,f=t.categories.length,h=8,d=t.count,v=e.height-h*(c-1),m,b,p,k,M,T=(c-f)*h/2,L=t.categories.map(function(x){return{displayInd:x.displayInd,categoryInd:x.categoryInd}});for(L.sort(function(x,C){return x.displayInd-C.displayInd}),M=0;M0?m=b.count/d*v:m=0,p={key:b.valueInds[0],model:b,width:n,height:m,y:b.dragY!==null?b.dragY:T,bands:[],parcatsViewModel:e},T=T+m+h,u.push(p);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:l,y:0,width:n,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var oJ=ye((Mxr,MVe)=>{"use strict";var fjt=SVe();MVe.exports=function(t,r,n,i){var a=t._fullLayout,o=a._paper,s=a._size;fjt(t,o,r,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},n,i)}});var kVe=ye(Jz=>{"use strict";var hjt=Id().getModuleCalcData,djt=oJ(),EVe="parcats";Jz.name=EVe;Jz.plot=function(e,t,r,n){var i=hjt(e.calcdata,EVe);if(i.length){var a=i[0];djt(e,a,r,n)}};Jz.clean=function(e,t,r,n){var i=n._has&&n._has("parcats"),a=t._has&&t._has("parcats");i&&!a&&n._paperdiv.selectAll(".parcats").remove()}});var LVe=ye((kxr,CVe)=>{"use strict";CVe.exports={attributes:YK(),supplyDefaults:vVe(),calc:gVe(),plot:oJ(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:kVe(),categories:["noOpacity"],meta:{}}});var IVe=ye((Cxr,PVe)=>{"use strict";PVe.exports=LVe()});var m1=ye((Lxr,BVe)=>{"use strict";var vjt=t_(),RVe="1.13.4",qVe='\xA9 OpenStreetMap contributors',DVe=['\xA9 Carto',qVe].join(" "),FVe=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),pjt=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),OVe={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:qVe,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:DVe,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:DVe,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:FVe,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:FVe,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:pjt,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"}},zVe=vjt(OVe);BVe.exports={requiredVersion:RVe,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:OVe,styleValuesNonMapbox:zVe,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@"+RVe+"."].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:",zVe.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')`}}});var Yk=ye((Pxr,GVe)=>{"use strict";var NVe=Pr(),UVe=ka().defaultLine,gjt=Cc().attributes,mjt=ec(),yjt=pf().textposition,_jt=mc().overrideAll,xjt=vl().templatedArray,sJ=m1(),VVe=mjt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});VVe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var bjt=GVe.exports=_jt({_arrayAttrRegexps:[NVe.counterRegex("mapbox",".layers",!0)],domain:gjt({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:sJ.styleValuesMapbox.concat(sJ.styleValuesNonMapbox),dflt:sJ.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:xjt("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:UVe},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:UVe}},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:VVe,textposition:NVe.extendFlat({},yjt,{arrayOk:!1})}})},"plot","from-root");bjt.uirevision={valType:"any",editType:"none"}});var $z=ye((Ixr,XVe)=>{"use strict";var{hovertemplateAttrs:wjt,texttemplateAttrs:Tjt,templatefallbackAttrs:HVe}=Ll(),Ajt=Pg(),Kk=tw(),k5=pf(),jVe=Yk(),Sjt=Gl(),Mjt=Tu(),dw=Ao().extendFlat,Ejt=mc().overrideAll,kjt=Yk(),WVe=Kk.line,C5=Kk.marker;XVe.exports=Ejt({lon:Kk.lon,lat:Kk.lat,cluster:{enabled:{valType:"boolean"},maxzoom:dw({},kjt.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:dw({},C5.opacity,{dflt:1})},mode:dw({},k5.mode,{dflt:"markers"}),text:dw({},k5.text,{}),texttemplate:Tjt({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:HVe({editType:"plot"}),hovertext:dw({},k5.hovertext,{}),line:{color:WVe.color,width:WVe.width},connectgaps:k5.connectgaps,marker:dw({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:C5.opacity,size:C5.size,sizeref:C5.sizeref,sizemin:C5.sizemin,sizemode:C5.sizemode},Mjt("marker")),fill:Kk.fill,fillcolor:Ajt(),textfont:jVe.layers.symbol.textfont,textposition:jVe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:k5.selected.marker},unselected:{marker:k5.unselected.marker},hoverinfo:dw({},Sjt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:wjt(),hovertemplatefallback:HVe()},"calc","nested")});var lJ=ye((Rxr,ZVe)=>{"use strict";var Cjt=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];ZVe.exports={isSupportedFont:function(e){return Cjt.indexOf(e)!==-1}}});var JVe=ye((Dxr,KVe)=>{"use strict";var Jk=Pr(),uJ=Ru(),Ljt=$p(),Pjt=D0(),Ijt=F0(),Rjt=Fg(),YVe=$z(),Djt=lJ().isSupportedFont;KVe.exports=function(t,r,n,i){function a(p,k){return Jk.coerce(t,r,YVe,p,k)}function o(p,k){return Jk.coerce2(t,r,YVe,p,k)}var s=Fjt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),a("below"),uJ.hasMarkers(r)){Ljt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(Jk.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),Jk.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}uJ.hasLines(r)&&(Pjt(t,r,n,i,a,{noDash:!0}),a("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),d=o("cluster.opacity"),v=u!==!1||c!==!1||f!==!1||h!==!1||d!==!1,m=a("cluster.enabled",v);if(m||uJ.hasText(r)){var b=i.font.family;Ijt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:Djt(b)?b:"Open Sans Regular",weight:i.font.weight,style:i.font.style,size:i.font.size,color:i.font.color}})}a("fill"),r.fill!=="none"&&Rjt(t,r,n,a),Jk.coerceSelectionMarkerOpacity(r,a)};function Fjt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var cJ=ye((Fxr,QVe)=>{"use strict";var $Ve=ho();QVe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=$Ve.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=$Ve.tickText(o,o.c2l(s[1]),!0).text,i}});var fJ=ye((zxr,tGe)=>{"use strict";var eGe=Pr();tGe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=eGe.isArrayOrTypedArray(r)?eGe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(i){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(a){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var sGe=ye((qxr,oGe)=>{"use strict";var nGe=Eo(),ov=Pr(),zjt=fs().BADNUM,e7=fx(),rGe=tc(),qjt=So(),Ojt=B3(),t7=Ru(),Bjt=lJ().isSupportedFont,Njt=fJ(),Ujt=ip().appendArrayPointValue,Vjt=Zl().NEWLINES,Gjt=Zl().BR_TAG_ALL;oGe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=t7.hasLines(n),s=t7.hasMarkers(n),l=t7.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,h=Qz("fill"),d=Qz("line"),v=Qz("circle"),m=Qz("symbol"),b={fill:h,line:d,circle:v,symbol:m};if(!i)return b;var p;if((a||o)&&(p=e7.calcTraceToLineCoords(r)),a&&(h.geojson=e7.makePolygon(p),h.layout.visibility="visible",ov.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=e7.makeLine(p),d.layout.visibility="visible",ov.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var k=Hjt(r);v.geojson=k.geojson,v.layout.visibility="visible",f&&(v.filter=["!",["has","point_count"]],b.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":dJ(n.cluster.color,n.cluster.step),"circle-radius":dJ(n.cluster.size,n.cluster.step),"circle-opacity":dJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":iGe(n),"text-size":12}}),ov.extendFlat(v.paint,{"circle-color":k.mcc,"circle-radius":k.mrc,"circle-opacity":k.mo})}if(u&&f&&(v.filter=["!",["has","point_count"]]),(c||l)&&(m.geojson=jjt(r,t),ov.extendFlat(m.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),c&&(ov.extendFlat(m.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&ov.extendFlat(m.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),m.layout["icon-allow-overlap"]=n.marker.allowoverlap,ov.extendFlat(m.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),l)){var M=(n.marker||{}).size,T=Njt(n.textposition,M);ov.extendFlat(m.layout,{"text-size":n.textfont.size,"text-anchor":T.anchor,"text-offset":T.offset,"text-font":iGe(n)}),ov.extendFlat(m.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function Qz(e){return{type:e,geojson:e7.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function Hjt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=ov.isArrayOrTypedArray(r.color),a=ov.isArrayOrTypedArray(r.size),o=ov.isArrayOrTypedArray(r.opacity),s;function l(M){return t.opacity*M}function u(M){return M/2}var c;i&&(rGe.hasColorscale(t,"marker")?c=rGe.makeColorScaleFuncFromTrace(r):c=ov.identity);var f;a&&(f=Ojt(t));var h;o&&(h=function(M){var T=nGe(M)?+ov.constrain(M,0,1):0;return l(T)});var d=[];for(s=0;s850?s+=" Black":i>750?s+=" Extra Bold":i>650?s+=" Bold":i>550?s+=" Semi Bold":i>450?s+=" Medium":i>350?s+=" Regular":i>250?s+=" Light":i>150?s+=" Extra Light":s+=" Thin"):a.slice(0,2).join(" ")==="Open Sans"?(s="Open Sans",i>750?s+=" Extrabold":i>650?s+=" Bold":i>550?s+=" Semibold":i>350?s+=" Regular":s+=" Light"):a.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(s="Klokantech Noto Sans",a[3]==="CJK"&&(s+=" CJK"),s+=i>500?" Bold":" Regular")),o&&(s+=" Italic"),s==="Open Sans Regular Italic"?s="Open Sans Italic":s==="Open Sans Regular Bold"?s="Open Sans Bold":s==="Open Sans Regular Bold Italic"?s="Open Sans Bold Italic":s==="Klokantech Noto Sans Regular Italic"&&(s="Klokantech Noto Sans Italic"),Bjt(s)||(s=r);var l=s.split(", ");return l}});var fGe=ye((Oxr,cGe)=>{"use strict";var Wjt=Pr(),lGe=sGe(),L5=m1().traceLayerPrefix,ng={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function uGe(e,t,r,n){this.type="scattermapbox",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:L5+t+"-fill",line:L5+t+"-line",circle:L5+t+"-circle",symbol:L5+t+"-symbol",cluster:L5+t+"-cluster",clusterCount:L5+t+"-cluster-count"},this.below=null}var $k=uGe.prototype;$k.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&Wjt.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[e]);i?i.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};$k.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};$k.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s=0;L--){var x=T[L];i.removeLayer(u.layerIds[x])}M||i.removeSource(u.sourceIds.circle)}function h(M){for(var T=ng.nonCluster,L=0;L=0;L--){var x=T[L];i.removeLayer(u.layerIds[x]),M||i.removeSource(u.sourceIds[x])}}function v(M){l?f(M):d(M)}function m(M){s?c(M):h(M)}function b(){for(var M=s?ng.cluster:ng.nonCluster,T=0;T=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};cGe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new uGe(t,n.uid,i,a),s=lGe(t.gd,r),l=o.below=t.belowLookup["trace-"+n.uid],u,c,f;if(i)for(o.addSource("circle",s.circle,n.cluster),u=0;u{"use strict";var Xjt=ef(),vJ=Pr(),Zjt=yT(),Yjt=vJ.fillText,Kjt=fs().BADNUM,Jjt=m1().traceLayerPrefix;function $jt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=Jjt+i.uid+"-circle",c=i.cluster&&i.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(S){return S.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,v=t-d;function m(S){var g=S.lonlat;if(g[0]===Kjt||c&&l.indexOf(S.i+1)===-1)return 1/0;var P=vJ.modHalf(g[0],360),E=g[1],z=s.project([P,E]),q=z.x-a.c2p([v,E]),V=z.y-o.c2p([P,r]),G=Math.max(3,S.mrc||0);return Math.max(Math.sqrt(q*q+V*V)-G,1-3/G)}if(Xjt.getClosest(n,m,e),e.index!==!1){var b=n[e.index],p=b.lonlat,k=[vJ.modHalf(p[0],360)+d,p[1]],M=a.c2p(k),T=o.c2p(k),L=b.mrc||1;e.x0=M-L,e.x1=M+L,e.y0=T-L,e.y1=T+L;var x={};x[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,x);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=Zjt(i,b),e.extraText=hGe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function hGe(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,i=n.split("+"),a=i.indexOf("all")!==-1,o=i.indexOf("lon")!==-1,s=i.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return a||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||i.indexOf("text")!==-1)&&Yjt(t,e,u),u.join("
")}dGe.exports={hoverPoints:$jt,getExtraText:hGe}});var pGe=ye((Nxr,vGe)=>{"use strict";vGe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var mGe=ye((Uxr,gGe)=>{"use strict";var Qjt=Pr(),eWt=Ru(),tWt=fs().BADNUM;gGe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!eWt.hasMarkers(s))return[];if(r===!1)for(l=0;l{(function(e,t){typeof pJ=="object"&&typeof gJ!="undefined"?gJ.exports=t():(e=e||self,e.mapboxgl=t())})(pJ,function(){"use strict";var e,t,r;function n(i,a){if(!e)e=a;else if(!t)t=a;else{var o="var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk);",s={};e(s),r=a(s),typeof window!="undefined"&&(r.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"})))}}return n(["exports"],function(i){"use strict";function a(y,_){return _={exports:{}},y(_,_.exports),_.exports}var o="1.13.4",s=l;function l(y,_,I,U){this.cx=3*y,this.bx=3*(I-y)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*_,this.by=3*(U-_)-this.cy,this.ay=1-this.cy-this.by,this.p1x=y,this.p1y=U,this.p2x=I,this.p2y=U}l.prototype.sampleCurveX=function(y){return((this.ax*y+this.bx)*y+this.cx)*y},l.prototype.sampleCurveY=function(y){return((this.ay*y+this.by)*y+this.cy)*y},l.prototype.sampleCurveDerivativeX=function(y){return(3*this.ax*y+2*this.bx)*y+this.cx},l.prototype.solveCurveX=function(y,_){typeof _=="undefined"&&(_=1e-6);var I,U,$,oe,he;for($=y,he=0;he<8;he++){if(oe=this.sampleCurveX($)-y,Math.abs(oe)<_)return $;var De=this.sampleCurveDerivativeX($);if(Math.abs(De)<1e-6)break;$=$-oe/De}if(I=0,U=1,$=y,$U)return U;for(;Ioe?I=$:U=$,$=(U-I)*.5+I}return $},l.prototype.solve=function(y,_){return this.sampleCurveY(this.solveCurveX(y,_))};var u=c;function c(y,_){this.x=y,this.y=_}c.prototype={clone:function(){return new c(this.x,this.y)},add:function(y){return this.clone()._add(y)},sub:function(y){return this.clone()._sub(y)},multByPoint:function(y){return this.clone()._multByPoint(y)},divByPoint:function(y){return this.clone()._divByPoint(y)},mult:function(y){return this.clone()._mult(y)},div:function(y){return this.clone()._div(y)},rotate:function(y){return this.clone()._rotate(y)},rotateAround:function(y,_){return this.clone()._rotateAround(y,_)},matMult:function(y){return this.clone()._matMult(y)},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(y){return this.x===y.x&&this.y===y.y},dist:function(y){return Math.sqrt(this.distSqr(y))},distSqr:function(y){var _=y.x-this.x,I=y.y-this.y;return _*_+I*I},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(y){return Math.atan2(this.y-y.y,this.x-y.x)},angleWith:function(y){return this.angleWithSep(y.x,y.y)},angleWithSep:function(y,_){return Math.atan2(this.x*_-this.y*y,this.x*y+this.y*_)},_matMult:function(y){var _=y[0]*this.x+y[1]*this.y,I=y[2]*this.x+y[3]*this.y;return this.x=_,this.y=I,this},_add:function(y){return this.x+=y.x,this.y+=y.y,this},_sub:function(y){return this.x-=y.x,this.y-=y.y,this},_mult:function(y){return this.x*=y,this.y*=y,this},_div:function(y){return this.x/=y,this.y/=y,this},_multByPoint:function(y){return this.x*=y.x,this.y*=y.y,this},_divByPoint:function(y){return this.x/=y.x,this.y/=y.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var y=this.y;return this.y=this.x,this.x=-y,this},_rotate:function(y){var _=Math.cos(y),I=Math.sin(y),U=_*this.x-I*this.y,$=I*this.x+_*this.y;return this.x=U,this.y=$,this},_rotateAround:function(y,_){var I=Math.cos(y),U=Math.sin(y),$=_.x+I*(this.x-_.x)-U*(this.y-_.y),oe=_.y+U*(this.x-_.x)+I*(this.y-_.y);return this.x=$,this.y=oe,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},c.convert=function(y){return y instanceof c?y:Array.isArray(y)?new c(y[0],y[1]):y};var f=typeof self!="undefined"?self:{};function h(y,_){if(Array.isArray(y)){if(!Array.isArray(_)||y.length!==_.length)return!1;for(var I=0;I=1)return 1;var _=y*y,I=_*y;return 4*(y<.5?I:3*(y-_)+I-.75)}function m(y,_,I,U){var $=new s(y,_,I,U);return function(oe){return $.solve(oe)}}var b=m(.25,.1,.25,1);function p(y,_,I){return Math.min(I,Math.max(_,y))}function k(y,_,I){var U=I-_,$=((y-_)%U+U)%U+_;return $===_?I:$}function M(y,_,I){if(!y.length)return I(null,[]);var U=y.length,$=new Array(y.length),oe=null;y.forEach(function(he,De){_(he,function(it,yt){it&&(oe=it),$[De]=yt,--U===0&&I(oe,$)})})}function T(y){var _=[];for(var I in y)_.push(y[I]);return _}function L(y,_){var I=[];for(var U in y)U in _||I.push(U);return I}function x(y){for(var _=[],I=arguments.length-1;I-- >0;)_[I]=arguments[I+1];for(var U=0,$=_;U<$.length;U+=1){var oe=$[U];for(var he in oe)y[he]=oe[he]}return y}function C(y,_){for(var I={},U=0;U<_.length;U++){var $=_[U];$ in y&&(I[$]=y[$])}return I}var S=1;function g(){return S++}function P(){function y(_){return _?(_^Math.random()*16>>_/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,y)}return y()}function E(y){return y<=1?1:Math.pow(2,Math.ceil(Math.log(y)/Math.LN2))}function z(y){return y?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(y):!1}function q(y,_){y.forEach(function(I){_[I]&&(_[I]=_[I].bind(_))})}function V(y,_){return y.indexOf(_,y.length-_.length)!==-1}function G(y,_,I){var U={};for(var $ in y)U[$]=_.call(I||this,y[$],$,y);return U}function Z(y,_,I){var U={};for(var $ in y)_.call(I||this,y[$],$,y)&&(U[$]=y[$]);return U}function j(y){return Array.isArray(y)?y.map(j):typeof y=="object"&&y?G(y,j):y}function N(y,_){for(var I=0;I=0)return!0;return!1}var H={};function ie(y){H[y]||(typeof console!="undefined"&&console.warn(y),H[y]=!0)}function ae(y,_,I){return(I.y-y.y)*(_.x-y.x)>(_.y-y.y)*(I.x-y.x)}function _e(y){for(var _=0,I=0,U=y.length,$=U-1,oe=void 0,he=void 0;I@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,I={};if(y.replace(_,function($,oe,he,De){var it=he||De;return I[oe]=it?it.toLowerCase():!0,""}),I["max-age"]){var U=parseInt(I["max-age"],10);isNaN(U)?delete I["max-age"]:I["max-age"]=U}return I}var re=null;function Se(y){if(re==null){var _=y.navigator?y.navigator.userAgent:null;re=!!y.safari||!!(_&&(/\b(iPad|iPhone|iPod)\b/.test(_)||_.match("Safari")&&!_.match("Chrome")))}return re}function ke(y){try{var _=f[y];return _.setItem("_mapbox_test_",1),_.removeItem("_mapbox_test_"),!0}catch(I){return!1}}function be(y){return f.btoa(encodeURIComponent(y).replace(/%([0-9A-F]{2})/g,function(_,I){return String.fromCharCode(+("0x"+I))}))}function Be(y){return decodeURIComponent(f.atob(y).split("").map(function(_){return"%"+("00"+_.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var Le=f.performance&&f.performance.now?f.performance.now.bind(f.performance):Date.now.bind(Date),me=f.requestAnimationFrame||f.mozRequestAnimationFrame||f.webkitRequestAnimationFrame||f.msRequestAnimationFrame,Pe=f.cancelAnimationFrame||f.mozCancelAnimationFrame||f.webkitCancelAnimationFrame||f.msCancelAnimationFrame,ce,He,lt={now:Le,frame:function(_){var I=me(_);return{cancel:function(){return Pe(I)}}},getImageData:function(_,I){I===void 0&&(I=0);var U=f.document.createElement("canvas"),$=U.getContext("2d");if(!$)throw new Error("failed to create canvas 2d context");return U.width=_.width,U.height=_.height,$.drawImage(_,0,0,_.width,_.height),$.getImageData(-I,-I,_.width+2*I,_.height+2*I)},resolveURL:function(_){return ce||(ce=f.document.createElement("a")),ce.href=_,ce.href},hardwareConcurrency:f.navigator&&f.navigator.hardwareConcurrency||4,get devicePixelRatio(){return f.devicePixelRatio},get prefersReducedMotion(){return f.matchMedia?(He==null&&(He=f.matchMedia("(prefers-reduced-motion: reduce)")),He.matches):!1}},mt={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},Ht={supported:!1,testSupport:rr},at,ct=!1,ar,Vt=!1;f.document&&(ar=f.document.createElement("img"),ar.onload=function(){at&&tt(at),at=null,Vt=!0},ar.onerror=function(){ct=!0,at=null},ar.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function rr(y){ct||!ar||(Vt?tt(y):at=y)}function tt(y){var _=y.createTexture();y.bindTexture(y.TEXTURE_2D,_);try{if(y.texImage2D(y.TEXTURE_2D,0,y.RGBA,y.RGBA,y.UNSIGNED_BYTE,ar),y.isContextLost())return;Ht.supported=!0}catch(I){}y.deleteTexture(_),ct=!0}var je="01";function Ue(){for(var y="1",_="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",I="",U=0;U<10;U++)I+=_[Math.floor(Math.random()*62)];var $=12*60*60*1e3,oe=[y,je,I].join(""),he=Date.now()+$;return{token:oe,tokenExpiresAt:he}}var Ae=function(_,I){this._transformRequestFn=_,this._customAccessToken=I,this._createSkuToken()};Ae.prototype._createSkuToken=function(){var _=Ue();this._skuToken=_.token,this._skuTokenExpiresAt=_.tokenExpiresAt},Ae.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Ae.prototype.transformRequest=function(_,I){return this._transformRequestFn?this._transformRequestFn(_,I)||{url:_}:{url:_}},Ae.prototype.normalizeStyleURL=function(_,I){if(!rt(_))return _;var U=jt(_);return U.path="/styles/v1"+U.path,this._makeAPIURL(U,this._customAccessToken||I)},Ae.prototype.normalizeGlyphsURL=function(_,I){if(!rt(_))return _;var U=jt(_);return U.path="/fonts/v1"+U.path,this._makeAPIURL(U,this._customAccessToken||I)},Ae.prototype.normalizeSourceURL=function(_,I){if(!rt(_))return _;var U=jt(_);return U.path="/v4/"+U.authority+".json",U.params.push("secure"),this._makeAPIURL(U,this._customAccessToken||I)},Ae.prototype.normalizeSpriteURL=function(_,I,U,$){var oe=jt(_);return rt(_)?(oe.path="/styles/v1"+oe.path+"/sprite"+I+U,this._makeAPIURL(oe,this._customAccessToken||$)):(oe.path+=""+I+U,or(oe))},Ae.prototype.normalizeTileURL=function(_,I){if(this._isSkuTokenExpired()&&this._createSkuToken(),_&&!rt(_))return _;var U=jt(_),$=/(\.(png|jpg)\d*)(?=$)/,oe=/^.+\/v4\//,he=lt.devicePixelRatio>=2||I===512?"@2x":"",De=Ht.supported?".webp":"$1";U.path=U.path.replace($,""+he+De),U.path=U.path.replace(oe,"/"),U.path="/v4"+U.path;var it=this._customAccessToken||Et(U.params)||mt.ACCESS_TOKEN;return mt.REQUIRE_ACCESS_TOKEN&&it&&this._skuToken&&U.params.push("sku="+this._skuToken),this._makeAPIURL(U,it)},Ae.prototype.canonicalizeTileURL=function(_,I){var U="/v4/",$=/\.[\w]+$/,oe=jt(_);if(!oe.path.match(/(^\/v4\/)/)||!oe.path.match($))return _;var he="mapbox://tiles/";he+=oe.path.replace(U,"");var De=oe.params;return I&&(De=De.filter(function(it){return!it.match(/^access_token=/)})),De.length&&(he+="?"+De.join("&")),he},Ae.prototype.canonicalizeTileset=function(_,I){for(var U=I?rt(I):!1,$=[],oe=0,he=_.tiles||[];oe=0&&_.params.splice(oe,1)}if($.path!=="/"&&(_.path=""+$.path+_.path),!mt.REQUIRE_ACCESS_TOKEN)return or(_);if(I=I||mt.ACCESS_TOKEN,!I)throw new Error("An API access token is required to use Mapbox GL. "+U);if(I[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+U);return _.params=_.params.filter(function(he){return he.indexOf("access_token")===-1}),_.params.push("access_token="+I),or(_)};function rt(y){return y.indexOf("mapbox:")===0}var St=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Tt(y){return St.test(y)}function dt(y){return y.indexOf("sku=")>0&&Tt(y)}function Et(y){for(var _=0,I=y;_=1&&f.localStorage.setItem(I,JSON.stringify(this.eventData))}catch($){ie("Unable to write to LocalStorage")}},ei.prototype.processRequests=function(_){},ei.prototype.postEvent=function(_,I,U,$){var oe=this;if(mt.EVENTS_URL){var he=jt(mt.EVENTS_URL);he.params.push("access_token="+($||mt.ACCESS_TOKEN||""));var De={event:this.type,created:new Date(_).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:o,skuId:je,userId:this.anonId},it=I?x(De,I):De,yt={url:or(he),headers:{"Content-Type":"text/plain"},body:JSON.stringify([it])};this.pendingRequest=$r(yt,function(Lt){oe.pendingRequest=null,U(Lt),oe.saveEventData(),oe.processRequests($)})}},ei.prototype.queueRequest=function(_,I){this.queue.push(_),this.processRequests(I)};var qr=function(y){function _(){y.call(this,"map.load"),this.success={},this.skuToken=""}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.postMapLoadEvent=function(U,$,oe,he){this.skuToken=oe,(mt.EVENTS_URL&&he||mt.ACCESS_TOKEN&&Array.isArray(U)&&U.some(function(De){return rt(De)||Tt(De)}))&&this.queueRequest({id:$,timestamp:Date.now()},he)},_.prototype.processRequests=function(U){var $=this;if(!(this.pendingRequest||this.queue.length===0)){var oe=this.queue.shift(),he=oe.id,De=oe.timestamp;he&&this.success[he]||(this.anonId||this.fetchEventData(),z(this.anonId)||(this.anonId=P()),this.postEvent(De,{skuToken:this.skuToken},function(it){it||he&&($.success[he]=!0)},U))}},_}(ei),jr=function(y){function _(I){y.call(this,"appUserTurnstile"),this._customAccessToken=I}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.postTurnstileEvent=function(U,$){mt.EVENTS_URL&&mt.ACCESS_TOKEN&&Array.isArray(U)&&U.some(function(oe){return rt(oe)||Tt(oe)})&&this.queueRequest(Date.now(),$)},_.prototype.processRequests=function(U){var $=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var oe=Ar(mt.ACCESS_TOKEN),he=oe?oe.u:mt.ACCESS_TOKEN,De=he!==this.eventData.tokenU;z(this.anonId)||(this.anonId=P(),De=!0);var it=this.queue.shift();if(this.eventData.lastSuccess){var yt=new Date(this.eventData.lastSuccess),Lt=new Date(it),sr=(it-this.eventData.lastSuccess)/(24*60*60*1e3);De=De||sr>=1||sr<-1||yt.getDate()!==Lt.getDate()}else De=!0;if(!De)return this.processRequests();this.postEvent(it,{"enabled.telemetry":!1},function(gr){gr||($.eventData.lastSuccess=it,$.eventData.tokenU=he)},U)}},_}(ei),gt=new jr,Ge=gt.postTurnstileEvent.bind(gt),Je=new qr,We=Je.postMapLoadEvent.bind(Je),et="mapbox-tiles",xt=500,At=50,Kt=1e3*60*7,Qt;function Mr(){f.caches&&!Qt&&(Qt=f.caches.open(et))}var Gr;function Ir(y,_){if(Gr===void 0)try{new Response(new ReadableStream),Gr=!0}catch(I){Gr=!1}Gr?_(y.body):y.blob().then(_)}function Yr(y,_,I){if(Mr(),!!Qt){var U={status:_.status,statusText:_.statusText,headers:new f.Headers};_.headers.forEach(function(he,De){return U.headers.set(De,he)});var $=ge(_.headers.get("Cache-Control")||"");if(!$["no-store"]){$["max-age"]&&U.headers.set("Expires",new Date(I+$["max-age"]*1e3).toUTCString());var oe=new Date(U.headers.get("Expires")).getTime()-I;oeDate.now()&&!I["no-cache"]}var mi=1/0;function un(y){mi++,mi>At&&(y.getActor().send("enforceCacheSizeLimit",xt),mi=0)}function Fn(y){Mr(),Qt&&Qt.then(function(_){_.keys().then(function(I){for(var U=0;U=200&&I.status<300||I.status===0)&&I.response!==null){var $=I.response;if(y.type==="json")try{$=JSON.parse(I.response)}catch(oe){return _(oe)}_(null,$,I.getResponseHeader("Cache-Control"),I.getResponseHeader("Expires"))}else _(new Jn(I.statusText,I.status,y.url))},I.send(y.body),{cancel:function(){return I.abort()}}}var wr=function(y,_){if(!wt(y.url)){if(f.fetch&&f.Request&&f.AbortController&&f.Request.prototype.hasOwnProperty("signal"))return tr(y,_);if(Ce()&&self.worker&&self.worker.actor){var I=!0;return self.worker.actor.send("getResource",y,_,void 0,I)}}return ir(y,_)},Xr=function(y,_){return wr(x(y,{type:"json"}),_)},ti=function(y,_){return wr(x(y,{type:"arrayBuffer"}),_)},$r=function(y,_){return wr(x(y,{method:"POST"}),_)};function Ri(y){var _=f.document.createElement("a");return _.href=y,_.protocol===f.document.location.protocol&&_.host===f.document.location.host}var Zi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function en(y,_,I,U){var $=new f.Image,oe=f.URL;$.onload=function(){_(null,$),oe.revokeObjectURL($.src),$.onload=null,f.requestAnimationFrame(function(){$.src=Zi})},$.onerror=function(){return _(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 he=new f.Blob([new Uint8Array(y)],{type:"image/png"});$.cacheControl=I,$.expires=U,$.src=y.byteLength?oe.createObjectURL(he):Zi}function fn(y,_){var I=new f.Blob([new Uint8Array(y)],{type:"image/png"});f.createImageBitmap(I).then(function(U){_(null,U)}).catch(function(U){_(new Error("Could not load image because of "+U.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var yn,Mn,Ba=function(){yn=[],Mn=0};Ba();var ua=function(y,_){if(Ht.supported&&(y.headers||(y.headers={}),y.headers.accept="image/webp,*/*"),Mn>=mt.MAX_PARALLEL_IMAGE_REQUESTS){var I={requestParameters:y,callback:_,cancelled:!1,cancel:function(){this.cancelled=!0}};return yn.push(I),I}Mn++;var U=!1,$=function(){if(!U)for(U=!0,Mn--;yn.length&&Mn0||this._oneTimeListeners&&this._oneTimeListeners[_]&&this._oneTimeListeners[_].length>0||this._eventedParent&&this._eventedParent.listens(_)},jn.prototype.setEventedParent=function(_,I){return this._eventedParent=_,this._eventedParentData=I,this};var Ha=8,vo={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"}},Gn={"*":{type:"source"}},Ct=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Sr={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:"*"}},Jr={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:"*"}},hi={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:"*"}},hn={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"}},Sn={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"}}},ki={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"}},_n=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],ya={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ea={"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"}},Ma={"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"}},_o={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},No={"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"}},po={"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"}},Lo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ko={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ds={type:"array",value:"*"},Fs={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},ll={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},ul={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},zl={type:"array",value:"*",minimum:1},us={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}},il=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],As={"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"}},cl={"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"}},Ks={"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"}},zs={"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"}},Io={"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"}},ls={"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"}},Yl={"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"}},Su={"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"}},nc={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},bs={"*":{type:"string"}},Rn={$version:Ha,$root:vo,sources:Gn,source:Ct,source_vector:Sr,source_raster:Jr,source_raster_dem:hi,source_geojson:hn,source_video:Sn,source_image:En,layer:ki,layout:_n,layout_background:ya,layout_fill:ea,layout_circle:Ma,layout_heatmap:_o,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:No,layout_symbol:po,layout_raster:Lo,layout_hillshade:ko,filter:Ds,filter_operator:Fs,geometry_type:ll,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:ul,expression:zl,light:us,paint:il,paint_fill:As,"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:cl,paint_circle:Ks,paint_heatmap:zs,paint_symbol:Io,paint_raster:ls,paint_hillshade:Yl,paint_background:Su,transition:nc,"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:bs},_a=function(_,I,U,$){this.message=(_?_+": ":"")+U,$&&(this.identifier=$),I!=null&&I.__line__&&(this.line=I.__line__)};function Vu(y){var _=y.key,I=y.value;return I?[new _a(_,I,"constants have been deprecated as of v8")]:[]}function ql(y){for(var _=[],I=arguments.length-1;I-- >0;)_[I]=arguments[I+1];for(var U=0,$=_;U<$.length;U+=1){var oe=$[U];for(var he in oe)y[he]=oe[he]}return y}function xo(y){return y instanceof Number||y instanceof String||y instanceof Boolean?y.valueOf():y}function Kl(y){if(Array.isArray(y))return y.map(Kl);if(y instanceof Object&&!(y instanceof Number||y instanceof String||y instanceof Boolean)){var _={};for(var I in y)_[I]=Kl(y[I]);return _}return xo(y)}var Ns=function(y){function _(I,U){y.call(this,U),this.message=U,this.key=I}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_}(Error),Hl=function(_,I){I===void 0&&(I=[]),this.parent=_,this.bindings={};for(var U=0,$=I;U<$.length;U+=1){var oe=$[U],he=oe[0],De=oe[1];this.bindings[he]=De}};Hl.prototype.concat=function(_){return new Hl(this,_)},Hl.prototype.get=function(_){if(this.bindings[_])return this.bindings[_];if(this.parent)return this.parent.get(_);throw new Error(_+" not found in scope.")},Hl.prototype.has=function(_){return this.bindings[_]?!0:this.parent?this.parent.has(_):!1};var ac={kind:"null"},oa={kind:"number"},qo={kind:"string"},Oo={kind:"boolean"},Ol={kind:"color"},Pc={kind:"object"},Do={kind:"value"},nf={kind:"error"},Vf={kind:"collator"},pl={kind:"formatted"},Zc={kind:"resolvedImage"};function Jl(y,_){return{kind:"array",itemType:y,N:_}}function qs(y){if(y.kind==="array"){var _=qs(y.itemType);return typeof y.N=="number"?"array<"+_+", "+y.N+">":y.itemType.kind==="value"?"array":"array<"+_+">"}else return y.kind}var yu=[ac,oa,qo,Oo,Ol,pl,Pc,Jl(Do),Zc];function oc(y,_){if(_.kind==="error")return null;if(y.kind==="array"){if(_.kind==="array"&&(_.N===0&&_.itemType.kind==="value"||!oc(y.itemType,_.itemType))&&(typeof y.N!="number"||y.N===_.N))return null}else{if(y.kind===_.kind)return null;if(y.kind==="value")for(var I=0,U=yu;I255?255:yt}function $(yt){return yt<0?0:yt>1?1:yt}function oe(yt){return yt[yt.length-1]==="%"?U(parseFloat(yt)/100*255):U(parseInt(yt))}function he(yt){return yt[yt.length-1]==="%"?$(parseFloat(yt)/100):$(parseFloat(yt))}function De(yt,Lt,sr){return sr<0?sr+=1:sr>1&&(sr-=1),sr*6<1?yt+(Lt-yt)*sr*6:sr*2<1?Lt:sr*3<2?yt+(Lt-yt)*(2/3-sr)*6:yt}function it(yt){var Lt=yt.replace(/ /g,"").toLowerCase();if(Lt in I)return I[Lt].slice();if(Lt[0]==="#"){if(Lt.length===4){var sr=parseInt(Lt.substr(1),16);return sr>=0&&sr<=4095?[(sr&3840)>>4|(sr&3840)>>8,sr&240|(sr&240)>>4,sr&15|(sr&15)<<4,1]:null}else if(Lt.length===7){var sr=parseInt(Lt.substr(1),16);return sr>=0&&sr<=16777215?[(sr&16711680)>>16,(sr&65280)>>8,sr&255,1]:null}return null}var gr=Lt.indexOf("("),hr=Lt.indexOf(")");if(gr!==-1&&hr+1===Lt.length){var Rr=Lt.substr(0,gr),ni=Lt.substr(gr+1,hr-(gr+1)).split(","),Hi=1;switch(Rr){case"rgba":if(ni.length!==4)return null;Hi=he(ni.pop());case"rgb":return ni.length!==3?null:[oe(ni[0]),oe(ni[1]),oe(ni[2]),Hi];case"hsla":if(ni.length!==4)return null;Hi=he(ni.pop());case"hsl":if(ni.length!==3)return null;var wi=(parseFloat(ni[0])%360+360)%360/360,bn=he(ni[1]),rn=he(ni[2]),xn=rn<=.5?rn*(bn+1):rn+bn-rn*bn,In=rn*2-xn;return[U(De(In,xn,wi+1/3)*255),U(De(In,xn,wi)*255),U(De(In,xn,wi-1/3)*255),Hi];default:return null}}return null}try{_.parseCSSColor=it}catch(yt){}}),Lf=jh.parseCSSColor,cs=function(_,I,U,$){$===void 0&&($=1),this.r=_,this.g=I,this.b=U,this.a=$};cs.parse=function(_){if(_){if(_ instanceof cs)return _;if(typeof _=="string"){var I=Lf(_);if(I)return new cs(I[0]/255*I[3],I[1]/255*I[3],I[2]/255*I[3],I[3])}}},cs.prototype.toString=function(){var _=this.toArray(),I=_[0],U=_[1],$=_[2],oe=_[3];return"rgba("+Math.round(I)+","+Math.round(U)+","+Math.round($)+","+oe+")"},cs.prototype.toArray=function(){var _=this,I=_.r,U=_.g,$=_.b,oe=_.a;return oe===0?[0,0,0,0]:[I*255/oe,U*255/oe,$*255/oe,oe]},cs.black=new cs(0,0,0,1),cs.white=new cs(1,1,1,1),cs.transparent=new cs(0,0,0,0),cs.red=new cs(1,0,0,1);var af=function(_,I,U){_?this.sensitivity=I?"variant":"case":this.sensitivity=I?"accent":"base",this.locale=U,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};af.prototype.compare=function(_,I){return this.collator.compare(_,I)},af.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Gf=function(_,I,U,$,oe){this.text=_,this.image=I,this.scale=U,this.fontStack=$,this.textColor=oe},$l=function(_){this.sections=_};$l.fromString=function(_){return new $l([new Gf(_,null,null,null,null)])},$l.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(_){return _.text.length!==0||_.image&&_.image.name.length!==0})},$l.factory=function(_){return _ instanceof $l?_:$l.fromString(_)},$l.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(_){return _.text}).join("")},$l.prototype.serialize=function(){for(var _=["format"],I=0,U=this.sections;I=0&&y<=255&&typeof _=="number"&&_>=0&&_<=255&&typeof I=="number"&&I>=0&&I<=255)){var $=typeof U=="number"?[y,_,I,U]:[y,_,I];return"Invalid rgba value ["+$.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof U=="undefined"||typeof U=="number"&&U>=0&&U<=1?null:"Invalid rgba value ["+[y,_,I,U].join(", ")+"]: 'a' must be between 0 and 1."}function Fu(y){if(y===null)return!0;if(typeof y=="string")return!0;if(typeof y=="boolean")return!0;if(typeof y=="number")return!0;if(y instanceof cs)return!0;if(y instanceof af)return!0;if(y instanceof $l)return!0;if(y instanceof fl)return!0;if(Array.isArray(y)){for(var _=0,I=y;_2){var De=_[1];if(typeof De!="string"||!(De in uc)||De==="object")return I.error('The item type argument of "array" must be one of string, number, boolean',1);he=uc[De],U++}else he=Do;var it;if(_.length>3){if(_[2]!==null&&(typeof _[2]!="number"||_[2]<0||_[2]!==Math.floor(_[2])))return I.error('The length argument to "array" must be a positive integer literal',2);it=_[2],U++}$=Jl(he,it)}else $=uc[oe];for(var yt=[];U<_.length;U++){var Lt=I.parse(_[U],U,Do);if(!Lt)return null;yt.push(Lt)}return new xl($,yt)},xl.prototype.evaluate=function(_){for(var I=0;I1)&&I.push($)}}return I.concat(this.args.map(function(oe){return oe.serialize()}))};var Gu=function(_){this.type=pl,this.sections=_};Gu.parse=function(_,I){if(_.length<2)return I.error("Expected at least one argument.");var U=_[1];if(!Array.isArray(U)&&typeof U=="object")return I.error("First argument must be an image or text section.");for(var $=[],oe=!1,he=1;he<=_.length-1;++he){var De=_[he];if(oe&&typeof De=="object"&&!Array.isArray(De)){oe=!1;var it=null;if(De["font-scale"]&&(it=I.parse(De["font-scale"],1,oa),!it))return null;var yt=null;if(De["text-font"]&&(yt=I.parse(De["text-font"],1,Jl(qo)),!yt))return null;var Lt=null;if(De["text-color"]&&(Lt=I.parse(De["text-color"],1,Ol),!Lt))return null;var sr=$[$.length-1];sr.scale=it,sr.font=yt,sr.textColor=Lt}else{var gr=I.parse(_[he],1,Do);if(!gr)return null;var hr=gr.type.kind;if(hr!=="string"&&hr!=="value"&&hr!=="null"&&hr!=="resolvedImage")return I.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");oe=!0,$.push({content:gr,scale:null,font:null,textColor:null})}}return new Gu($)},Gu.prototype.evaluate=function(_){var I=function(U){var $=U.content.evaluate(_);return Es($)===Zc?new Gf("",$,null,null,null):new Gf(Hs($),null,U.scale?U.scale.evaluate(_):null,U.font?U.font.evaluate(_).join(","):null,U.textColor?U.textColor.evaluate(_):null)};return new $l(this.sections.map(I))},Gu.prototype.eachChild=function(_){for(var I=0,U=this.sections;I-1),U},Os.prototype.eachChild=function(_){_(this.input)},Os.prototype.outputDefined=function(){return!1},Os.prototype.serialize=function(){return["image",this.input.serialize()]};var od={"to-boolean":Oo,"to-color":Ol,"to-number":oa,"to-string":qo},Po=function(_,I){this.type=_,this.args=I};Po.parse=function(_,I){if(_.length<2)return I.error("Expected at least one argument.");var U=_[0];if((U==="to-boolean"||U==="to-string")&&_.length!==2)return I.error("Expected one argument.");for(var $=od[U],oe=[],he=1;he<_.length;he++){var De=I.parse(_[he],he,Do);if(!De)return null;oe.push(De)}return new Po($,oe)},Po.prototype.evaluate=function(_){if(this.type.kind==="boolean")return!!this.args[0].evaluate(_);if(this.type.kind==="color"){for(var I,U,$=0,oe=this.args;$4?U="Invalid rbga value "+JSON.stringify(I)+": expected an array containing either three or four numeric values.":U=lc(I[0],I[1],I[2],I[3]),!U))return new cs(I[0]/255,I[1]/255,I[2]/255,I[3])}throw new ps(U||"Could not parse color from value '"+(typeof I=="string"?I:String(JSON.stringify(I)))+"'")}else if(this.type.kind==="number"){for(var it=null,yt=0,Lt=this.args;yt=_[2]||y[1]<=_[1]||y[3]>=_[3])}function Ah(y,_){var I=Ic(y[0]),U=yf(y[1]),$=Math.pow(2,_.z);return[Math.round(I*$*bl),Math.round(U*$*bl)]}function Qf(y,_,I){var U=y[0]-_[0],$=y[1]-_[1],oe=y[0]-I[0],he=y[1]-I[1];return U*he-oe*$===0&&U*oe<=0&&$*he<=0}function _f(y,_,I){return _[1]>y[1]!=I[1]>y[1]&&y[0]<(I[0]-_[0])*(y[1]-_[1])/(I[1]-_[1])+_[0]}function Yc(y,_){for(var I=!1,U=0,$=_.length;U<$;U++)for(var oe=_[U],he=0,De=oe.length;he0&&sr<0||Lt<0&&sr>0}function jf(y,_,I,U){var $=[_[0]-y[0],_[1]-y[1]],oe=[U[0]-I[0],U[1]-I[1]];return th(oe,$)===0?!1:!!(ju(y,_,I,U)&&ju(I,U,y,_))}function cc(y,_,I){for(var U=0,$=I;U<$.length;U+=1)for(var oe=$[U],he=0;heI[2]){var $=U*.5,oe=y[0]-I[0]>$?-U:I[0]-y[0]>$?U:0;oe===0&&(oe=y[0]-I[2]>$?-U:I[2]-y[0]>$?U:0),y[0]+=oe}Hf(_,y)}function Wf(y){y[0]=y[1]=1/0,y[2]=y[3]=-1/0}function Wh(y,_,I,U){for(var $=Math.pow(2,U.z)*bl,oe=[U.x*bl,U.y*bl],he=[],De=0,it=y;De=0)return!1;var I=!0;return y.eachChild(function(U){I&&!Eu(U,_)&&(I=!1)}),I}var Dc=function(_,I){this.type=I.type,this.name=_,this.boundExpression=I};Dc.parse=function(_,I){if(_.length!==2||typeof _[1]!="string")return I.error("'var' expression requires exactly one string literal argument.");var U=_[1];return I.scope.has(U)?new Dc(U,I.scope.get(U)):I.error('Unknown variable "'+U+'". Make sure "'+U+'" has been bound in an enclosing "let" expression before using it.',1)},Dc.prototype.evaluate=function(_){return this.boundExpression.evaluate(_)},Dc.prototype.eachChild=function(){},Dc.prototype.outputDefined=function(){return!1},Dc.prototype.serialize=function(){return["var",this.name]};var ks=function(_,I,U,$,oe){I===void 0&&(I=[]),$===void 0&&($=new Hl),oe===void 0&&(oe=[]),this.registry=_,this.path=I,this.key=I.map(function(he){return"["+he+"]"}).join(""),this.scope=$,this.errors=oe,this.expectedType=U};ks.prototype.parse=function(_,I,U,$,oe){return oe===void 0&&(oe={}),I?this.concat(I,U,$)._parse(_,oe):this._parse(_,oe)},ks.prototype._parse=function(_,I){(_===null||typeof _=="string"||typeof _=="boolean"||typeof _=="number")&&(_=["literal",_]);function U(Lt,sr,gr){return gr==="assert"?new xl(sr,[Lt]):gr==="coerce"?new Po(sr,[Lt]):Lt}if(Array.isArray(_)){if(_.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var $=_[0];if(typeof $!="string")return this.error("Expression name must be a string, but found "+typeof $+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var oe=this.registry[$];if(oe){var he=oe.parse(_,this);if(!he)return null;if(this.expectedType){var De=this.expectedType,it=he.type;if((De.kind==="string"||De.kind==="number"||De.kind==="boolean"||De.kind==="object"||De.kind==="array")&&it.kind==="value")he=U(he,De,I.typeAnnotation||"assert");else if((De.kind==="color"||De.kind==="formatted"||De.kind==="resolvedImage")&&(it.kind==="value"||it.kind==="string"))he=U(he,De,I.typeAnnotation||"coerce");else if(this.checkSubtype(De,it))return null}if(!(he instanceof Go)&&he.type.kind!=="resolvedImage"&&bc(he)){var yt=new Ko;try{he=new Go(he.type,he.evaluate(yt))}catch(Lt){return this.error(Lt.message),null}}return he}return this.error('Unknown expression "'+$+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof _=="undefined"?this.error("'undefined' value invalid. Use null instead."):typeof _=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof _+" instead.")},ks.prototype.concat=function(_,I,U){var $=typeof _=="number"?this.path.concat(_):this.path,oe=U?this.scope.concat(U):this.scope;return new ks(this.registry,$,I||null,oe,this.errors)},ks.prototype.error=function(_){for(var I=[],U=arguments.length-1;U-- >0;)I[U]=arguments[U+1];var $=""+this.key+I.map(function(oe){return"["+oe+"]"}).join("");this.errors.push(new Ns($,_))},ks.prototype.checkSubtype=function(_,I){var U=oc(_,I);return U&&this.error(U),U};function bc(y){if(y instanceof Dc)return bc(y.boundExpression);if(y instanceof Pa&&y.name==="error")return!1;if(y instanceof Hu)return!1;if(y instanceof Mu)return!1;var _=y instanceof Po||y instanceof xl,I=!0;return y.eachChild(function(U){_?I=I&&bc(U):I=I&&U instanceof Go}),I?ih(y)&&Eu(y,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function hu(y,_){for(var I=y.length-1,U=0,$=I,oe=0,he,De;U<=$;)if(oe=Math.floor((U+$)/2),he=y[oe],De=y[oe+1],he<=_){if(oe===I||__)$=oe-1;else throw new ps("Input is not a number.");return 0}var _u=function(_,I,U){this.type=_,this.input=I,this.labels=[],this.outputs=[];for(var $=0,oe=U;$=De)return I.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',yt);var sr=I.parse(it,Lt,oe);if(!sr)return null;oe=oe||sr.type,$.push([De,sr])}return new _u(oe,U,$)},_u.prototype.evaluate=function(_){var I=this.labels,U=this.outputs;if(I.length===1)return U[0].evaluate(_);var $=this.input.evaluate(_);if($<=I[0])return U[0].evaluate(_);var oe=I.length;if($>=I[oe-1])return U[oe-1].evaluate(_);var he=hu(I,$);return U[he].evaluate(_)},_u.prototype.eachChild=function(_){_(this.input);for(var I=0,U=this.outputs;I0&&_.push(this.labels[I]),_.push(this.outputs[I].serialize());return _};function nl(y,_,I){return y*(1-I)+_*I}function nh(y,_,I){return new cs(nl(y.r,_.r,I),nl(y.g,_.g,I),nl(y.b,_.b,I),nl(y.a,_.a,I))}function Mh(y,_,I){return y.map(function(U,$){return nl(U,_[$],I)})}var zu=Object.freeze({__proto__:null,number:nl,color:nh,array:Mh}),Fc=.95047,wc=1,bd=1.08883,xf=4/29,Pf=6/29,qu=3*Pf*Pf,bf=Pf*Pf*Pf,jl=Math.PI/180,uf=180/Math.PI;function Xh(y){return y>bf?Math.pow(y,1/3):y/qu+xf}function If(y){return y>Pf?y*y*y:qu*(y-xf)}function Cs(y){return 255*(y<=.0031308?12.92*y:1.055*Math.pow(y,1/2.4)-.055)}function du(y){return y/=255,y<=.04045?y/12.92:Math.pow((y+.055)/1.055,2.4)}function ku(y){var _=du(y.r),I=du(y.g),U=du(y.b),$=Xh((.4124564*_+.3575761*I+.1804375*U)/Fc),oe=Xh((.2126729*_+.7151522*I+.072175*U)/wc),he=Xh((.0193339*_+.119192*I+.9503041*U)/bd);return{l:116*oe-16,a:500*($-oe),b:200*(oe-he),alpha:y.a}}function Xf(y){var _=(y.l+16)/116,I=isNaN(y.a)?_:_+y.a/500,U=isNaN(y.b)?_:_-y.b/200;return _=wc*If(_),I=Fc*If(I),U=bd*If(U),new cs(Cs(3.2404542*I-1.5371385*_-.4985314*U),Cs(-.969266*I+1.8760108*_+.041556*U),Cs(.0556434*I-.2040259*_+1.0572252*U),y.alpha)}function Us(y,_,I){return{l:nl(y.l,_.l,I),a:nl(y.a,_.a,I),b:nl(y.b,_.b,I),alpha:nl(y.alpha,_.alpha,I)}}function wf(y){var _=ku(y),I=_.l,U=_.a,$=_.b,oe=Math.atan2($,U)*uf;return{h:oe<0?oe+360:oe,c:Math.sqrt(U*U+$*$),l:I,alpha:y.a}}function zc(y){var _=y.h*jl,I=y.c,U=y.l;return Xf({l:U,a:Math.cos(_)*I,b:Math.sin(_)*I,alpha:y.alpha})}function Wu(y,_,I){var U=_-y;return y+I*(U>180||U<-180?U-360*Math.round(U/360):U)}function Rf(y,_,I){return{h:Wu(y.h,_.h,I),c:nl(y.c,_.c,I),l:nl(y.l,_.l,I),alpha:nl(y.alpha,_.alpha,I)}}var Xu={forward:ku,reverse:Xf,interpolate:Us},cf={forward:wf,reverse:zc,interpolate:Rf},Zf=Object.freeze({__proto__:null,lab:Xu,hcl:cf}),Wl=function(_,I,U,$,oe){this.type=_,this.operator=I,this.interpolation=U,this.input=$,this.labels=[],this.outputs=[];for(var he=0,De=oe;he1}))return I.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);$={name:"cubic-bezier",controlPoints:it}}else return I.error("Unknown interpolation type "+String($[0]),1,0);if(_.length-1<4)return I.error("Expected at least 4 arguments, but found only "+(_.length-1)+".");if((_.length-1)%2!==0)return I.error("Expected an even number of arguments.");if(oe=I.parse(oe,2,oa),!oe)return null;var yt=[],Lt=null;U==="interpolate-hcl"||U==="interpolate-lab"?Lt=Ol:I.expectedType&&I.expectedType.kind!=="value"&&(Lt=I.expectedType);for(var sr=0;sr=gr)return I.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Rr);var Hi=I.parse(hr,ni,Lt);if(!Hi)return null;Lt=Lt||Hi.type,yt.push([gr,Hi])}return Lt.kind!=="number"&&Lt.kind!=="color"&&!(Lt.kind==="array"&&Lt.itemType.kind==="number"&&typeof Lt.N=="number")?I.error("Type "+qs(Lt)+" is not interpolatable."):new Wl(Lt,U,$,oe,yt)},Wl.prototype.evaluate=function(_){var I=this.labels,U=this.outputs;if(I.length===1)return U[0].evaluate(_);var $=this.input.evaluate(_);if($<=I[0])return U[0].evaluate(_);var oe=I.length;if($>=I[oe-1])return U[oe-1].evaluate(_);var he=hu(I,$),De=I[he],it=I[he+1],yt=Wl.interpolationFactor(this.interpolation,$,De,it),Lt=U[he].evaluate(_),sr=U[he+1].evaluate(_);return this.operator==="interpolate"?zu[this.type.kind.toLowerCase()](Lt,sr,yt):this.operator==="interpolate-hcl"?cf.reverse(cf.interpolate(cf.forward(Lt),cf.forward(sr),yt)):Xu.reverse(Xu.interpolate(Xu.forward(Lt),Xu.forward(sr),yt))},Wl.prototype.eachChild=function(_){_(this.input);for(var I=0,U=this.outputs;I=U.length)throw new ps("Array index out of bounds: "+I+" > "+(U.length-1)+".");if(I!==Math.floor(I))throw new ps("Array index must be an integer, but found "+I+" instead.");return U[I]},Tc.prototype.eachChild=function(_){_(this.index),_(this.input)},Tc.prototype.outputDefined=function(){return!1},Tc.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var wl=function(_,I){this.type=Oo,this.needle=_,this.haystack=I};wl.parse=function(_,I){if(_.length!==3)return I.error("Expected 2 arguments, but found "+(_.length-1)+" instead.");var U=I.parse(_[1],1,Do),$=I.parse(_[2],2,Do);return!U||!$?null:Cf(U.type,[Oo,qo,oa,ac,Do])?new wl(U,$):I.error("Expected first argument to be of type boolean, string, number or null, but found "+qs(U.type)+" instead")},wl.prototype.evaluate=function(_){var I=this.needle.evaluate(_),U=this.haystack.evaluate(_);if(!U)return!1;if(!sc(I,["boolean","string","number","null"]))throw new ps("Expected first argument to be of type boolean, string, number or null, but found "+qs(Es(I))+" instead.");if(!sc(U,["string","array"]))throw new ps("Expected second argument to be of type array or string, but found "+qs(Es(U))+" instead.");return U.indexOf(I)>=0},wl.prototype.eachChild=function(_){_(this.needle),_(this.haystack)},wl.prototype.outputDefined=function(){return!0},wl.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var vu=function(_,I,U){this.type=oa,this.needle=_,this.haystack=I,this.fromIndex=U};vu.parse=function(_,I){if(_.length<=2||_.length>=5)return I.error("Expected 3 or 4 arguments, but found "+(_.length-1)+" instead.");var U=I.parse(_[1],1,Do),$=I.parse(_[2],2,Do);if(!U||!$)return null;if(!Cf(U.type,[Oo,qo,oa,ac,Do]))return I.error("Expected first argument to be of type boolean, string, number or null, but found "+qs(U.type)+" instead");if(_.length===4){var oe=I.parse(_[3],3,oa);return oe?new vu(U,$,oe):null}else return new vu(U,$)},vu.prototype.evaluate=function(_){var I=this.needle.evaluate(_),U=this.haystack.evaluate(_);if(!sc(I,["boolean","string","number","null"]))throw new ps("Expected first argument to be of type boolean, string, number or null, but found "+qs(Es(I))+" instead.");if(!sc(U,["string","array"]))throw new ps("Expected second argument to be of type array or string, but found "+qs(Es(U))+" instead.");if(this.fromIndex){var $=this.fromIndex.evaluate(_);return U.indexOf(I,$)}return U.indexOf(I)},vu.prototype.eachChild=function(_){_(this.needle),_(this.haystack),this.fromIndex&&_(this.fromIndex)},vu.prototype.outputDefined=function(){return!1},vu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var _=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),_]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Oc=function(_,I,U,$,oe,he){this.inputType=_,this.type=I,this.input=U,this.cases=$,this.outputs=oe,this.otherwise=he};Oc.parse=function(_,I){if(_.length<5)return I.error("Expected at least 4 arguments, but found only "+(_.length-1)+".");if(_.length%2!==1)return I.error("Expected an even number of arguments.");var U,$;I.expectedType&&I.expectedType.kind!=="value"&&($=I.expectedType);for(var oe={},he=[],De=2;De<_.length-1;De+=2){var it=_[De],yt=_[De+1];Array.isArray(it)||(it=[it]);var Lt=I.concat(De);if(it.length===0)return Lt.error("Expected at least one branch label.");for(var sr=0,gr=it;srNumber.MAX_SAFE_INTEGER)return Lt.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof hr=="number"&&Math.floor(hr)!==hr)return Lt.error("Numeric branch labels must be integer values.");if(!U)U=Es(hr);else if(Lt.checkSubtype(U,Es(hr)))return null;if(typeof oe[String(hr)]!="undefined")return Lt.error("Branch labels must be unique.");oe[String(hr)]=he.length}var Rr=I.parse(yt,De,$);if(!Rr)return null;$=$||Rr.type,he.push(Rr)}var ni=I.parse(_[1],1,Do);if(!ni)return null;var Hi=I.parse(_[_.length-1],_.length-1,$);return!Hi||ni.type.kind!=="value"&&I.concat(1).checkSubtype(U,ni.type)?null:new Oc(U,$,ni,oe,he,Hi)},Oc.prototype.evaluate=function(_){var I=this.input.evaluate(_),U=Es(I)===this.inputType&&this.outputs[this.cases[I]]||this.otherwise;return U.evaluate(_)},Oc.prototype.eachChild=function(_){_(this.input),this.outputs.forEach(_),_(this.otherwise)},Oc.prototype.outputDefined=function(){return this.outputs.every(function(_){return _.outputDefined()})&&this.otherwise.outputDefined()},Oc.prototype.serialize=function(){for(var _=this,I=["match",this.input.serialize()],U=Object.keys(this.cases).sort(),$=[],oe={},he=0,De=U;he=5)return I.error("Expected 3 or 4 arguments, but found "+(_.length-1)+" instead.");var U=I.parse(_[1],1,Do),$=I.parse(_[2],2,oa);if(!U||!$)return null;if(!Cf(U.type,[Jl(Do),qo,Do]))return I.error("Expected first argument to be of type array or string, but found "+qs(U.type)+" instead");if(_.length===4){var oe=I.parse(_[3],3,oa);return oe?new fc(U.type,U,$,oe):null}else return new fc(U.type,U,$)},fc.prototype.evaluate=function(_){var I=this.input.evaluate(_),U=this.beginIndex.evaluate(_);if(!sc(I,["string","array"]))throw new ps("Expected first argument to be of type array or string, but found "+qs(Es(I))+" instead.");if(this.endIndex){var $=this.endIndex.evaluate(_);return I.slice(U,$)}return I.slice(U)},fc.prototype.eachChild=function(_){_(this.input),_(this.beginIndex),this.endIndex&&_(this.endIndex)},fc.prototype.outputDefined=function(){return!1},fc.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var _=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),_]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Bc(y,_){return y==="=="||y==="!="?_.kind==="boolean"||_.kind==="string"||_.kind==="number"||_.kind==="null"||_.kind==="value":_.kind==="string"||_.kind==="number"||_.kind==="value"}function kt(y,_,I){return _===I}function Zt(y,_,I){return _!==I}function Er(y,_,I){return _I}function Kr(y,_,I){return _<=I}function Mi(y,_,I){return _>=I}function Wi(y,_,I,U){return U.compare(_,I)===0}function dn(y,_,I,U){return!Wi(y,_,I,U)}function wn(y,_,I,U){return U.compare(_,I)<0}function On(y,_,I,U){return U.compare(_,I)>0}function Yi(y,_,I,U){return U.compare(_,I)<=0}function $i(y,_,I,U){return U.compare(_,I)>=0}function an(y,_,I){var U=y!=="=="&&y!=="!=";return function(){function $(oe,he,De){this.type=Oo,this.lhs=oe,this.rhs=he,this.collator=De,this.hasUntypedArgument=oe.type.kind==="value"||he.type.kind==="value"}return $.parse=function(he,De){if(he.length!==3&&he.length!==4)return De.error("Expected two or three arguments.");var it=he[0],yt=De.parse(he[1],1,Do);if(!yt)return null;if(!Bc(it,yt.type))return De.concat(1).error('"'+it+`" comparisons are not supported for type '`+qs(yt.type)+"'.");var Lt=De.parse(he[2],2,Do);if(!Lt)return null;if(!Bc(it,Lt.type))return De.concat(2).error('"'+it+`" comparisons are not supported for type '`+qs(Lt.type)+"'.");if(yt.type.kind!==Lt.type.kind&&yt.type.kind!=="value"&&Lt.type.kind!=="value")return De.error("Cannot compare types '"+qs(yt.type)+"' and '"+qs(Lt.type)+"'.");U&&(yt.type.kind==="value"&&Lt.type.kind!=="value"?yt=new xl(Lt.type,[yt]):yt.type.kind!=="value"&&Lt.type.kind==="value"&&(Lt=new xl(yt.type,[Lt])));var sr=null;if(he.length===4){if(yt.type.kind!=="string"&&Lt.type.kind!=="string"&&yt.type.kind!=="value"&&Lt.type.kind!=="value")return De.error("Cannot use collator to compare non-string types.");if(sr=De.parse(he[3],3,Vf),!sr)return null}return new $(yt,Lt,sr)},$.prototype.evaluate=function(he){var De=this.lhs.evaluate(he),it=this.rhs.evaluate(he);if(U&&this.hasUntypedArgument){var yt=Es(De),Lt=Es(it);if(yt.kind!==Lt.kind||!(yt.kind==="string"||yt.kind==="number"))throw new ps('Expected arguments for "'+y+'" to be (string, string) or (number, number), but found ('+yt.kind+", "+Lt.kind+") instead.")}if(this.collator&&!U&&this.hasUntypedArgument){var sr=Es(De),gr=Es(it);if(sr.kind!=="string"||gr.kind!=="string")return _(he,De,it)}return this.collator?I(he,De,it,this.collator.evaluate(he)):_(he,De,it)},$.prototype.eachChild=function(he){he(this.lhs),he(this.rhs),this.collator&&he(this.collator)},$.prototype.outputDefined=function(){return!0},$.prototype.serialize=function(){var he=[y];return this.eachChild(function(De){he.push(De.serialize())}),he},$}()}var Fi=an("==",kt,Wi),ta=an("!=",Zt,dn),Ca=an("<",Er,wn),Ra=an(">",xr,On),La=an("<=",Kr,Yi),Ua=an(">=",Mi,$i),Zn=function(_,I,U,$,oe){this.type=qo,this.number=_,this.locale=I,this.currency=U,this.minFractionDigits=$,this.maxFractionDigits=oe};Zn.parse=function(_,I){if(_.length!==3)return I.error("Expected two arguments.");var U=I.parse(_[1],1,oa);if(!U)return null;var $=_[2];if(typeof $!="object"||Array.isArray($))return I.error("NumberFormat options argument must be an object.");var oe=null;if($.locale&&(oe=I.parse($.locale,1,qo),!oe))return null;var he=null;if($.currency&&(he=I.parse($.currency,1,qo),!he))return null;var De=null;if($["min-fraction-digits"]&&(De=I.parse($["min-fraction-digits"],1,oa),!De))return null;var it=null;return $["max-fraction-digits"]&&(it=I.parse($["max-fraction-digits"],1,oa),!it)?null:new Zn(U,oe,he,De,it)},Zn.prototype.evaluate=function(_){return new Intl.NumberFormat(this.locale?this.locale.evaluate(_):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(_):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(_):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(_):void 0}).format(this.number.evaluate(_))},Zn.prototype.eachChild=function(_){_(this.number),this.locale&&_(this.locale),this.currency&&_(this.currency),this.minFractionDigits&&_(this.minFractionDigits),this.maxFractionDigits&&_(this.maxFractionDigits)},Zn.prototype.outputDefined=function(){return!1},Zn.prototype.serialize=function(){var _={};return this.locale&&(_.locale=this.locale.serialize()),this.currency&&(_.currency=this.currency.serialize()),this.minFractionDigits&&(_["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(_["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),_]};var Dn=function(_){this.type=oa,this.input=_};Dn.parse=function(_,I){if(_.length!==2)return I.error("Expected 1 argument, but found "+(_.length-1)+" instead.");var U=I.parse(_[1],1);return U?U.type.kind!=="array"&&U.type.kind!=="string"&&U.type.kind!=="value"?I.error("Expected argument of type string or array, but found "+qs(U.type)+" instead."):new Dn(U):null},Dn.prototype.evaluate=function(_){var I=this.input.evaluate(_);if(typeof I=="string")return I.length;if(Array.isArray(I))return I.length;throw new ps("Expected value to be of type string or array, but found "+qs(Es(I))+" instead.")},Dn.prototype.eachChild=function(_){_(this.input)},Dn.prototype.outputDefined=function(){return!1},Dn.prototype.serialize=function(){var _=["length"];return this.eachChild(function(I){_.push(I.serialize())}),_};var Ka={"==":Fi,"!=":ta,">":Ra,"<":Ca,">=":Ua,"<=":La,array:xl,at:Tc,boolean:xl,case:ff,coalesce:Zu,collator:Hu,format:Gu,image:Os,in:wl,"index-of":vu,interpolate:Wl,"interpolate-hcl":Wl,"interpolate-lab":Wl,length:Dn,let:qc,literal:Go,match:Oc,number:xl,"number-format":Zn,object:xl,slice:fc,step:_u,string:xl,"to-boolean":Po,"to-color":Po,"to-number":Po,"to-string":Po,var:Dc,within:Mu};function bo(y,_){var I=_[0],U=_[1],$=_[2],oe=_[3];I=I.evaluate(y),U=U.evaluate(y),$=$.evaluate(y);var he=oe?oe.evaluate(y):1,De=lc(I,U,$,he);if(De)throw new ps(De);return new cs(I/255*he,U/255*he,$/255*he,he)}function Zo(y,_){return y in _}function Ss(y,_){var I=_[y];return typeof I=="undefined"?null:I}function as(y,_,I,U){for(;I<=U;){var $=I+U>>1;if(_[$]===y)return!0;_[$]>y?U=$-1:I=$+1}return!1}function ws(y){return{type:y}}Pa.register(Ka,{error:[nf,[qo],function(y,_){var I=_[0];throw new ps(I.evaluate(y))}],typeof:[qo,[Do],function(y,_){var I=_[0];return qs(Es(I.evaluate(y)))}],"to-rgba":[Jl(oa,4),[Ol],function(y,_){var I=_[0];return I.evaluate(y).toArray()}],rgb:[Ol,[oa,oa,oa],bo],rgba:[Ol,[oa,oa,oa,oa],bo],has:{type:Oo,overloads:[[[qo],function(y,_){var I=_[0];return Zo(I.evaluate(y),y.properties())}],[[qo,Pc],function(y,_){var I=_[0],U=_[1];return Zo(I.evaluate(y),U.evaluate(y))}]]},get:{type:Do,overloads:[[[qo],function(y,_){var I=_[0];return Ss(I.evaluate(y),y.properties())}],[[qo,Pc],function(y,_){var I=_[0],U=_[1];return Ss(I.evaluate(y),U.evaluate(y))}]]},"feature-state":[Do,[qo],function(y,_){var I=_[0];return Ss(I.evaluate(y),y.featureState||{})}],properties:[Pc,[],function(y){return y.properties()}],"geometry-type":[qo,[],function(y){return y.geometryType()}],id:[Do,[],function(y){return y.id()}],zoom:[oa,[],function(y){return y.globals.zoom}],"heatmap-density":[oa,[],function(y){return y.globals.heatmapDensity||0}],"line-progress":[oa,[],function(y){return y.globals.lineProgress||0}],accumulated:[Do,[],function(y){return y.globals.accumulated===void 0?null:y.globals.accumulated}],"+":[oa,ws(oa),function(y,_){for(var I=0,U=0,$=_;U<$.length;U+=1){var oe=$[U];I+=oe.evaluate(y)}return I}],"*":[oa,ws(oa),function(y,_){for(var I=1,U=0,$=_;U<$.length;U+=1){var oe=$[U];I*=oe.evaluate(y)}return I}],"-":{type:oa,overloads:[[[oa,oa],function(y,_){var I=_[0],U=_[1];return I.evaluate(y)-U.evaluate(y)}],[[oa],function(y,_){var I=_[0];return-I.evaluate(y)}]]},"/":[oa,[oa,oa],function(y,_){var I=_[0],U=_[1];return I.evaluate(y)/U.evaluate(y)}],"%":[oa,[oa,oa],function(y,_){var I=_[0],U=_[1];return I.evaluate(y)%U.evaluate(y)}],ln2:[oa,[],function(){return Math.LN2}],pi:[oa,[],function(){return Math.PI}],e:[oa,[],function(){return Math.E}],"^":[oa,[oa,oa],function(y,_){var I=_[0],U=_[1];return Math.pow(I.evaluate(y),U.evaluate(y))}],sqrt:[oa,[oa],function(y,_){var I=_[0];return Math.sqrt(I.evaluate(y))}],log10:[oa,[oa],function(y,_){var I=_[0];return Math.log(I.evaluate(y))/Math.LN10}],ln:[oa,[oa],function(y,_){var I=_[0];return Math.log(I.evaluate(y))}],log2:[oa,[oa],function(y,_){var I=_[0];return Math.log(I.evaluate(y))/Math.LN2}],sin:[oa,[oa],function(y,_){var I=_[0];return Math.sin(I.evaluate(y))}],cos:[oa,[oa],function(y,_){var I=_[0];return Math.cos(I.evaluate(y))}],tan:[oa,[oa],function(y,_){var I=_[0];return Math.tan(I.evaluate(y))}],asin:[oa,[oa],function(y,_){var I=_[0];return Math.asin(I.evaluate(y))}],acos:[oa,[oa],function(y,_){var I=_[0];return Math.acos(I.evaluate(y))}],atan:[oa,[oa],function(y,_){var I=_[0];return Math.atan(I.evaluate(y))}],min:[oa,ws(oa),function(y,_){return Math.min.apply(Math,_.map(function(I){return I.evaluate(y)}))}],max:[oa,ws(oa),function(y,_){return Math.max.apply(Math,_.map(function(I){return I.evaluate(y)}))}],abs:[oa,[oa],function(y,_){var I=_[0];return Math.abs(I.evaluate(y))}],round:[oa,[oa],function(y,_){var I=_[0],U=I.evaluate(y);return U<0?-Math.round(-U):Math.round(U)}],floor:[oa,[oa],function(y,_){var I=_[0];return Math.floor(I.evaluate(y))}],ceil:[oa,[oa],function(y,_){var I=_[0];return Math.ceil(I.evaluate(y))}],"filter-==":[Oo,[qo,Do],function(y,_){var I=_[0],U=_[1];return y.properties()[I.value]===U.value}],"filter-id-==":[Oo,[Do],function(y,_){var I=_[0];return y.id()===I.value}],"filter-type-==":[Oo,[qo],function(y,_){var I=_[0];return y.geometryType()===I.value}],"filter-<":[Oo,[qo,Do],function(y,_){var I=_[0],U=_[1],$=y.properties()[I.value],oe=U.value;return typeof $==typeof oe&&$":[Oo,[qo,Do],function(y,_){var I=_[0],U=_[1],$=y.properties()[I.value],oe=U.value;return typeof $==typeof oe&&$>oe}],"filter-id->":[Oo,[Do],function(y,_){var I=_[0],U=y.id(),$=I.value;return typeof U==typeof $&&U>$}],"filter-<=":[Oo,[qo,Do],function(y,_){var I=_[0],U=_[1],$=y.properties()[I.value],oe=U.value;return typeof $==typeof oe&&$<=oe}],"filter-id-<=":[Oo,[Do],function(y,_){var I=_[0],U=y.id(),$=I.value;return typeof U==typeof $&&U<=$}],"filter->=":[Oo,[qo,Do],function(y,_){var I=_[0],U=_[1],$=y.properties()[I.value],oe=U.value;return typeof $==typeof oe&&$>=oe}],"filter-id->=":[Oo,[Do],function(y,_){var I=_[0],U=y.id(),$=I.value;return typeof U==typeof $&&U>=$}],"filter-has":[Oo,[Do],function(y,_){var I=_[0];return I.value in y.properties()}],"filter-has-id":[Oo,[],function(y){return y.id()!==null&&y.id()!==void 0}],"filter-type-in":[Oo,[Jl(qo)],function(y,_){var I=_[0];return I.value.indexOf(y.geometryType())>=0}],"filter-id-in":[Oo,[Jl(Do)],function(y,_){var I=_[0];return I.value.indexOf(y.id())>=0}],"filter-in-small":[Oo,[qo,Jl(Do)],function(y,_){var I=_[0],U=_[1];return U.value.indexOf(y.properties()[I.value])>=0}],"filter-in-large":[Oo,[qo,Jl(Do)],function(y,_){var I=_[0],U=_[1];return as(y.properties()[I.value],U.value,0,U.value.length-1)}],all:{type:Oo,overloads:[[[Oo,Oo],function(y,_){var I=_[0],U=_[1];return I.evaluate(y)&&U.evaluate(y)}],[ws(Oo),function(y,_){for(var I=0,U=_;I-1}function va(y){return!!y.expression&&y.expression.interpolated}function no(y){return y instanceof Number?"number":y instanceof String?"string":y instanceof Boolean?"boolean":Array.isArray(y)?"array":y===null?"null":typeof y}function ys(y){return typeof y=="object"&&y!==null&&!Array.isArray(y)}function rs(y){return y}function Ql(y,_){var I=_.type==="color",U=y.stops&&typeof y.stops[0][0]=="object",$=U||y.property!==void 0,oe=U||!$,he=y.type||(va(_)?"exponential":"interval");if(I&&(y=ql({},y),y.stops&&(y.stops=y.stops.map(function(ha){return[ha[0],cs.parse(ha[1])]})),y.default?y.default=cs.parse(y.default):y.default=cs.parse(_.default)),y.colorSpace&&y.colorSpace!=="rgb"&&!Zf[y.colorSpace])throw new Error("Unknown color space: "+y.colorSpace);var De,it,yt;if(he==="exponential")De=pu;else if(he==="interval")De=Nc;else if(he==="categorical"){De=Yu,it=Object.create(null);for(var Lt=0,sr=y.stops;Lt=y.stops[U-1][0])return y.stops[U-1][1];var $=hu(y.stops.map(function(oe){return oe[0]}),I);return y.stops[$][1]}function pu(y,_,I){var U=y.base!==void 0?y.base:1;if(no(I)!=="number")return Cu(y.default,_.default);var $=y.stops.length;if($===1||I<=y.stops[0][0])return y.stops[0][1];if(I>=y.stops[$-1][0])return y.stops[$-1][1];var oe=hu(y.stops.map(function(sr){return sr[0]}),I),he=xu(I,U,y.stops[oe][0],y.stops[oe+1][0]),De=y.stops[oe][1],it=y.stops[oe+1][1],yt=zu[_.type]||rs;if(y.colorSpace&&y.colorSpace!=="rgb"){var Lt=Zf[y.colorSpace];yt=function(sr,gr){return Lt.reverse(Lt.interpolate(Lt.forward(sr),Lt.forward(gr),he))}}return typeof De.evaluate=="function"?{evaluate:function(){for(var gr=[],hr=arguments.length;hr--;)gr[hr]=arguments[hr];var Rr=De.evaluate.apply(void 0,gr),ni=it.evaluate.apply(void 0,gr);if(!(Rr===void 0||ni===void 0))return yt(Rr,ni,he)}}:yt(De,it,he)}function Uc(y,_,I){return _.type==="color"?I=cs.parse(I):_.type==="formatted"?I=$l.fromString(I.toString()):_.type==="resolvedImage"?I=fl.fromString(I.toString()):no(I)!==_.type&&(_.type!=="enum"||!_.values[I])&&(I=void 0),Cu(I,y.default,_.default)}function xu(y,_,I,U){var $=U-I,oe=y-I;return $===0?0:_===1?oe/$:(Math.pow(_,oe)-1)/(Math.pow(_,$)-1)}var Ac=function(_,I){this.expression=_,this._warningHistory={},this._evaluator=new Ko,this._defaultValue=I?ee(I):null,this._enumValues=I&&I.type==="enum"?I.values:null};Ac.prototype.evaluateWithoutErrorHandling=function(_,I,U,$,oe,he){return this._evaluator.globals=_,this._evaluator.feature=I,this._evaluator.featureState=U,this._evaluator.canonical=$,this._evaluator.availableImages=oe||null,this._evaluator.formattedSection=he,this.expression.evaluate(this._evaluator)},Ac.prototype.evaluate=function(_,I,U,$,oe,he){this._evaluator.globals=_,this._evaluator.feature=I||null,this._evaluator.featureState=U||null,this._evaluator.canonical=$,this._evaluator.availableImages=oe||null,this._evaluator.formattedSection=he||null;try{var De=this.expression.evaluate(this._evaluator);if(De==null||typeof De=="number"&&De!==De)return this._defaultValue;if(this._enumValues&&!(De in this._enumValues))throw new ps("Expected value to be one of "+Object.keys(this._enumValues).map(function(it){return JSON.stringify(it)}).join(", ")+", but found "+JSON.stringify(De)+" instead.");return De}catch(it){return this._warningHistory[it.message]||(this._warningHistory[it.message]=!0,typeof console!="undefined"&&console.warn(it.message)),this._defaultValue}};function Va(y){return Array.isArray(y)&&y.length>0&&typeof y[0]=="string"&&y[0]in Ka}function oo(y,_){var I=new ks(Ka,[],_?Q(_):void 0),U=I.parse(y,void 0,void 0,void 0,_&&_.type==="string"?{typeAnnotation:"coerce"}:void 0);return U?Ho(new Ac(U,_)):ml(I.errors)}var Vc=function(_,I){this.kind=_,this._styleExpression=I,this.isStateDependent=_!=="constant"&&!js(I.expression)};Vc.prototype.evaluateWithoutErrorHandling=function(_,I,U,$,oe,he){return this._styleExpression.evaluateWithoutErrorHandling(_,I,U,$,oe,he)},Vc.prototype.evaluate=function(_,I,U,$,oe,he){return this._styleExpression.evaluate(_,I,U,$,oe,he)};var hc=function(_,I,U,$){this.kind=_,this.zoomStops=U,this._styleExpression=I,this.isStateDependent=_!=="camera"&&!js(I.expression),this.interpolationType=$};hc.prototype.evaluateWithoutErrorHandling=function(_,I,U,$,oe,he){return this._styleExpression.evaluateWithoutErrorHandling(_,I,U,$,oe,he)},hc.prototype.evaluate=function(_,I,U,$,oe,he){return this._styleExpression.evaluate(_,I,U,$,oe,he)},hc.prototype.interpolationFactor=function(_,I,U){return this.interpolationType?Wl.interpolationFactor(this.interpolationType,_,I,U):0};function Ku(y,_){if(y=oo(y,_),y.result==="error")return y;var I=y.value.expression,U=ih(I);if(!U&&!Ws(_))return ml([new Ns("","data expressions not supported")]);var $=Eu(I,["zoom"]);if(!$&&!Ls(_))return ml([new Ns("","zoom expressions not supported")]);var oe=B(I);if(!oe&&!$)return ml([new Ns("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(oe instanceof Ns)return ml([oe]);if(oe instanceof Wl&&!va(_))return ml([new Ns("",'"interpolate" expressions cannot be used with this property')]);if(!oe)return Ho(U?new Vc("constant",y.value):new Vc("source",y.value));var he=oe instanceof Wl?oe.interpolation:void 0;return Ho(U?new hc("camera",y.value,oe.labels,he):new hc("composite",y.value,oe.labels,he))}var ue=function(_,I){this._parameters=_,this._specification=I,ql(this,Ql(this._parameters,this._specification))};ue.deserialize=function(_){return new ue(_._parameters,_._specification)},ue.serialize=function(_){return{_parameters:_._parameters,_specification:_._specification}};function w(y,_){if(ys(y))return new ue(y,_);if(Va(y)){var I=Ku(y,_);if(I.result==="error")throw new Error(I.value.map(function($){return $.key+": "+$.message}).join(", "));return I.value}else{var U=y;return typeof y=="string"&&_.type==="color"&&(U=cs.parse(y)),{kind:"constant",evaluate:function(){return U}}}}function B(y){var _=null;if(y instanceof qc)_=B(y.result);else if(y instanceof Zu)for(var I=0,U=y.args;IU.maximum?[new _a(_,I,I+" is greater than the maximum value "+U.maximum)]:[]}function ut(y){var _=y.valueSpec,I=xo(y.value.type),U,$={},oe,he,De=I!=="categorical"&&y.value.property===void 0,it=!De,yt=no(y.value.stops)==="array"&&no(y.value.stops[0])==="array"&&no(y.value.stops[0][0])==="object",Lt=le({key:y.key,value:y.value,valueSpec:y.styleSpec.function,style:y.style,styleSpec:y.styleSpec,objectElementValidators:{stops:sr,default:Rr}});return I==="identity"&&De&&Lt.push(new _a(y.key,y.value,'missing required property "property"')),I!=="identity"&&!y.value.stops&&Lt.push(new _a(y.key,y.value,'missing required property "stops"')),I==="exponential"&&y.valueSpec.expression&&!va(y.valueSpec)&&Lt.push(new _a(y.key,y.value,"exponential functions not supported")),y.styleSpec.$version>=8&&(it&&!Ws(y.valueSpec)?Lt.push(new _a(y.key,y.value,"property functions not supported")):De&&!Ls(y.valueSpec)&&Lt.push(new _a(y.key,y.value,"zoom functions not supported"))),(I==="categorical"||yt)&&y.value.property===void 0&&Lt.push(new _a(y.key,y.value,'"property" property is required')),Lt;function sr(ni){if(I==="identity")return[new _a(ni.key,ni.value,'identity function may not have a "stops" property')];var Hi=[],wi=ni.value;return Hi=Hi.concat(Fe({key:ni.key,value:wi,valueSpec:ni.valueSpec,style:ni.style,styleSpec:ni.styleSpec,arrayElementValidator:gr})),no(wi)==="array"&&wi.length===0&&Hi.push(new _a(ni.key,wi,"array must have at least one stop")),Hi}function gr(ni){var Hi=[],wi=ni.value,bn=ni.key;if(no(wi)!=="array")return[new _a(bn,wi,"array expected, "+no(wi)+" found")];if(wi.length!==2)return[new _a(bn,wi,"array length 2 expected, length "+wi.length+" found")];if(yt){if(no(wi[0])!=="object")return[new _a(bn,wi,"object expected, "+no(wi[0])+" found")];if(wi[0].zoom===void 0)return[new _a(bn,wi,"object stop key must have zoom")];if(wi[0].value===void 0)return[new _a(bn,wi,"object stop key must have value")];if(he&&he>xo(wi[0].zoom))return[new _a(bn,wi[0].zoom,"stop zoom values must appear in ascending order")];xo(wi[0].zoom)!==he&&(he=xo(wi[0].zoom),oe=void 0,$={}),Hi=Hi.concat(le({key:bn+"[0]",value:wi[0],valueSpec:{zoom:{}},style:ni.style,styleSpec:ni.styleSpec,objectElementValidators:{zoom:Ze,value:hr}}))}else Hi=Hi.concat(hr({key:bn+"[0]",value:wi[0],valueSpec:{},style:ni.style,styleSpec:ni.styleSpec},wi));return Va(Kl(wi[1]))?Hi.concat([new _a(bn+"[1]",wi[1],"expressions are not allowed in function stops.")]):Hi.concat(Qa({key:bn+"[1]",value:wi[1],valueSpec:_,style:ni.style,styleSpec:ni.styleSpec}))}function hr(ni,Hi){var wi=no(ni.value),bn=xo(ni.value),rn=ni.value!==null?ni.value:Hi;if(!U)U=wi;else if(wi!==U)return[new _a(ni.key,rn,wi+" stop domain type must match previous stop domain type "+U)];if(wi!=="number"&&wi!=="string"&&wi!=="boolean")return[new _a(ni.key,rn,"stop domain value must be a number, string, or boolean")];if(wi!=="number"&&I!=="categorical"){var xn="number expected, "+wi+" found";return Ws(_)&&I===void 0&&(xn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new _a(ni.key,rn,xn)]}return I==="categorical"&&wi==="number"&&(!isFinite(bn)||Math.floor(bn)!==bn)?[new _a(ni.key,rn,"integer expected, found "+bn)]:I!=="categorical"&&wi==="number"&&oe!==void 0&&bn=2&&y[1]!=="$id"&&y[1]!=="$type";case"in":return y.length>=3&&(typeof y[1]!="string"||Array.isArray(y[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return y.length!==3||Array.isArray(y[1])||Array.isArray(y[2]);case"any":case"all":for(var _=0,I=y.slice(1);__?1:0}function ze(y){if(!Array.isArray(y))return!1;if(y[0]==="within")return!0;for(var _=1;_"||_==="<="||_===">="?Xe(y[1],y[2],_):_==="any"?nt(y.slice(1)):_==="all"?["all"].concat(y.slice(1).map(Qe)):_==="none"?["all"].concat(y.slice(1).map(Qe).map(nr)):_==="in"?qt(y[1],y.slice(2)):_==="!in"?nr(qt(y[1],y.slice(2))):_==="has"?Wt(y[1]):_==="!has"?nr(Wt(y[1])):_==="within"?y:!0;return I}function Xe(y,_,I){switch(y){case"$type":return["filter-type-"+I,_];case"$id":return["filter-id-"+I,_];default:return["filter-"+I,y,_]}}function nt(y){return["any"].concat(y.map(Qe))}function qt(y,_){if(_.length===0)return!1;switch(y){case"$type":return["filter-type-in",["literal",_]];case"$id":return["filter-id-in",["literal",_]];default:return _.length>200&&!_.some(function(I){return typeof I!=typeof _[0]})?["filter-in-large",y,["literal",_.sort(Ie)]]:["filter-in-small",y,["literal",_]]}}function Wt(y){switch(y){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",y]}}function nr(y){return["!",y]}function fr(y){return Cr(Kl(y.value))?Mt(ql({},y,{expressionContext:"filter",valueSpec:{value:"boolean"}})):br(y)}function br(y){var _=y.value,I=y.key;if(no(_)!=="array")return[new _a(I,_,"array expected, "+no(_)+" found")];var U=y.styleSpec,$,oe=[];if(_.length<1)return[new _a(I,_,"filter array must have at least 1 element")];switch(oe=oe.concat(yr({key:I+"[0]",value:_[0],valueSpec:U.filter_operator,style:y.style,styleSpec:y.styleSpec})),xo(_[0])){case"<":case"<=":case">":case">=":_.length>=2&&xo(_[1])==="$type"&&oe.push(new _a(I,_,'"$type" cannot be use with operator "'+_[0]+'"'));case"==":case"!=":_.length!==3&&oe.push(new _a(I,_,'filter array for operator "'+_[0]+'" must have 3 elements'));case"in":case"!in":_.length>=2&&($=no(_[1]),$!=="string"&&oe.push(new _a(I+"[1]",_[1],"string expected, "+$+" found")));for(var he=2;he<_.length;he++)$=no(_[he]),xo(_[1])==="$type"?oe=oe.concat(yr({key:I+"["+he+"]",value:_[he],valueSpec:U.geometry_type,style:y.style,styleSpec:y.styleSpec})):$!=="string"&&$!=="number"&&$!=="boolean"&&oe.push(new _a(I+"["+he+"]",_[he],"string, number, or boolean expected, "+$+" found"));break;case"any":case"all":case"none":for(var De=1;De<_.length;De++)oe=oe.concat(br({key:I+"["+De+"]",value:_[De],style:y.style,styleSpec:y.styleSpec}));break;case"has":case"!has":$=no(_[1]),_.length!==2?oe.push(new _a(I,_,'filter array for "'+_[0]+'" operator must have 2 elements')):$!=="string"&&oe.push(new _a(I+"[1]",_[1],"string expected, "+$+" found"));break;case"within":$=no(_[1]),_.length!==2?oe.push(new _a(I,_,'filter array for "'+_[0]+'" operator must have 2 elements')):$!=="object"&&oe.push(new _a(I+"[1]",_[1],"object expected, "+$+" found"));break}return oe}function Fr(y,_){var I=y.key,U=y.style,$=y.styleSpec,oe=y.value,he=y.objectKey,De=$[_+"_"+y.layerType];if(!De)return[];var it=he.match(/^(.*)-transition$/);if(_==="paint"&&it&&De[it[1]]&&De[it[1]].transition)return Qa({key:I,value:oe,valueSpec:$.transition,style:U,styleSpec:$});var yt=y.valueSpec||De[he];if(!yt)return[new _a(I,oe,'unknown property "'+he+'"')];var Lt;if(no(oe)==="string"&&Ws(yt)&&!yt.tokens&&(Lt=/^{([^}]+)}$/.exec(oe)))return[new _a(I,oe,'"'+he+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(Lt[1])+" }`.")];var sr=[];return y.layerType==="symbol"&&(he==="text-field"&&U&&!U.glyphs&&sr.push(new _a(I,oe,'use of "text-field" requires a style "glyphs" property')),he==="text-font"&&ys(Kl(oe))&&xo(oe.type)==="identity"&&sr.push(new _a(I,oe,'"text-font" does not support identity functions'))),sr.concat(Qa({key:y.key,value:oe,valueSpec:yt,style:U,styleSpec:$,expressionContext:"property",propertyType:_,propertyKey:he}))}function Hr(y){return Fr(y,"paint")}function ri(y){return Fr(y,"layout")}function Ci(y){var _=[],I=y.value,U=y.key,$=y.style,oe=y.styleSpec;!I.type&&!I.ref&&_.push(new _a(U,I,'either "type" or "ref" is required'));var he=xo(I.type),De=xo(I.ref);if(I.id)for(var it=xo(I.id),yt=0;yt=Lt[hr+0]&&U>=Lt[hr+1])?(he[gr]=!0,oe.push(yt[gr])):he[gr]=!1}}},eu.prototype._forEachCell=function(y,_,I,U,$,oe,he,De){for(var it=this._convertToCellCoord(y),yt=this._convertToCellCoord(_),Lt=this._convertToCellCoord(I),sr=this._convertToCellCoord(U),gr=it;gr<=Lt;gr++)for(var hr=yt;hr<=sr;hr++){var Rr=this.d*hr+gr;if(!(De&&!De(this._convertFromCellCoord(gr),this._convertFromCellCoord(hr),this._convertFromCellCoord(gr+1),this._convertFromCellCoord(hr+1)))&&$.call(this,y,_,I,U,Rr,oe,he,De))return}},eu.prototype._convertFromCellCoord=function(y){return(y-this.padding)/this.scale},eu.prototype._convertToCellCoord=function(y){return Math.max(0,Math.min(this.d-1,Math.floor(y*this.scale)+this.padding))},eu.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var y=this.cells,_=Js+this.cells.length+1+1,I=0,U=0;U=0)){var sr=y[Lt];yt[Lt]=Al[it].shallow.indexOf(Lt)>=0?sr:Ve(sr,_)}y instanceof Error&&(yt.message=y.message)}if(yt.$name)throw new Error("$name property is reserved for worker serialization logic.");return it!=="Object"&&(yt.$name=it),yt}throw new Error("can't serialize object of type "+typeof y)}function Ye(y){if(y==null||typeof y=="boolean"||typeof y=="number"||typeof y=="string"||y instanceof Boolean||y instanceof Number||y instanceof String||y instanceof Date||y instanceof RegExp||Te(y)||qe(y)||ArrayBuffer.isView(y)||y instanceof dc)return y;if(Array.isArray(y))return y.map(Ye);if(typeof y=="object"){var _=y.$name||"Object",I=Al[_],U=I.klass;if(!U)throw new Error("can't deserialize unregistered class "+_);if(U.deserialize)return U.deserialize(y);for(var $=Object.create(U.prototype),oe=0,he=Object.keys(y);oe=0?it:Ye(it)}}return $}throw new Error("can't deserialize object of type "+typeof y)}var Pt=function(){this.first=!0};Pt.prototype.update=function(_,I){var U=Math.floor(_);return this.first?(this.first=!1,this.lastIntegerZoom=U,this.lastIntegerZoomTime=0,this.lastZoom=_,this.lastFloorZoom=U,!0):(this.lastFloorZoom>U?(this.lastIntegerZoom=U+1,this.lastIntegerZoomTime=I):this.lastFloorZoom=128&&y<=255},Arabic:function(y){return y>=1536&&y<=1791},"Arabic Supplement":function(y){return y>=1872&&y<=1919},"Arabic Extended-A":function(y){return y>=2208&&y<=2303},"Hangul Jamo":function(y){return y>=4352&&y<=4607},"Unified Canadian Aboriginal Syllabics":function(y){return y>=5120&&y<=5759},Khmer:function(y){return y>=6016&&y<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(y){return y>=6320&&y<=6399},"General Punctuation":function(y){return y>=8192&&y<=8303},"Letterlike Symbols":function(y){return y>=8448&&y<=8527},"Number Forms":function(y){return y>=8528&&y<=8591},"Miscellaneous Technical":function(y){return y>=8960&&y<=9215},"Control Pictures":function(y){return y>=9216&&y<=9279},"Optical Character Recognition":function(y){return y>=9280&&y<=9311},"Enclosed Alphanumerics":function(y){return y>=9312&&y<=9471},"Geometric Shapes":function(y){return y>=9632&&y<=9727},"Miscellaneous Symbols":function(y){return y>=9728&&y<=9983},"Miscellaneous Symbols and Arrows":function(y){return y>=11008&&y<=11263},"CJK Radicals Supplement":function(y){return y>=11904&&y<=12031},"Kangxi Radicals":function(y){return y>=12032&&y<=12255},"Ideographic Description Characters":function(y){return y>=12272&&y<=12287},"CJK Symbols and Punctuation":function(y){return y>=12288&&y<=12351},Hiragana:function(y){return y>=12352&&y<=12447},Katakana:function(y){return y>=12448&&y<=12543},Bopomofo:function(y){return y>=12544&&y<=12591},"Hangul Compatibility Jamo":function(y){return y>=12592&&y<=12687},Kanbun:function(y){return y>=12688&&y<=12703},"Bopomofo Extended":function(y){return y>=12704&&y<=12735},"CJK Strokes":function(y){return y>=12736&&y<=12783},"Katakana Phonetic Extensions":function(y){return y>=12784&&y<=12799},"Enclosed CJK Letters and Months":function(y){return y>=12800&&y<=13055},"CJK Compatibility":function(y){return y>=13056&&y<=13311},"CJK Unified Ideographs Extension A":function(y){return y>=13312&&y<=19903},"Yijing Hexagram Symbols":function(y){return y>=19904&&y<=19967},"CJK Unified Ideographs":function(y){return y>=19968&&y<=40959},"Yi Syllables":function(y){return y>=40960&&y<=42127},"Yi Radicals":function(y){return y>=42128&&y<=42191},"Hangul Jamo Extended-A":function(y){return y>=43360&&y<=43391},"Hangul Syllables":function(y){return y>=44032&&y<=55215},"Hangul Jamo Extended-B":function(y){return y>=55216&&y<=55295},"Private Use Area":function(y){return y>=57344&&y<=63743},"CJK Compatibility Ideographs":function(y){return y>=63744&&y<=64255},"Arabic Presentation Forms-A":function(y){return y>=64336&&y<=65023},"Vertical Forms":function(y){return y>=65040&&y<=65055},"CJK Compatibility Forms":function(y){return y>=65072&&y<=65103},"Small Form Variants":function(y){return y>=65104&&y<=65135},"Arabic Presentation Forms-B":function(y){return y>=65136&&y<=65279},"Halfwidth and Fullwidth Forms":function(y){return y>=65280&&y<=65519}};function Xt(y){for(var _=0,I=y;_=65097&&y<=65103)||ot["CJK Compatibility Ideographs"](y)||ot["CJK Compatibility"](y)||ot["CJK Radicals Supplement"](y)||ot["CJK Strokes"](y)||ot["CJK Symbols and Punctuation"](y)&&!(y>=12296&&y<=12305)&&!(y>=12308&&y<=12319)&&y!==12336||ot["CJK Unified Ideographs Extension A"](y)||ot["CJK Unified Ideographs"](y)||ot["Enclosed CJK Letters and Months"](y)||ot["Hangul Compatibility Jamo"](y)||ot["Hangul Jamo Extended-A"](y)||ot["Hangul Jamo Extended-B"](y)||ot["Hangul Jamo"](y)||ot["Hangul Syllables"](y)||ot.Hiragana(y)||ot["Ideographic Description Characters"](y)||ot.Kanbun(y)||ot["Kangxi Radicals"](y)||ot["Katakana Phonetic Extensions"](y)||ot.Katakana(y)&&y!==12540||ot["Halfwidth and Fullwidth Forms"](y)&&y!==65288&&y!==65289&&y!==65293&&!(y>=65306&&y<=65310)&&y!==65339&&y!==65341&&y!==65343&&!(y>=65371&&y<=65503)&&y!==65507&&!(y>=65512&&y<=65519)||ot["Small Form Variants"](y)&&!(y>=65112&&y<=65118)&&!(y>=65123&&y<=65126)||ot["Unified Canadian Aboriginal Syllabics"](y)||ot["Unified Canadian Aboriginal Syllabics Extended"](y)||ot["Vertical Forms"](y)||ot["Yijing Hexagram Symbols"](y)||ot["Yi Syllables"](y)||ot["Yi Radicals"](y))}function gi(y){return!!(ot["Latin-1 Supplement"](y)&&(y===167||y===169||y===174||y===177||y===188||y===189||y===190||y===215||y===247)||ot["General Punctuation"](y)&&(y===8214||y===8224||y===8225||y===8240||y===8241||y===8251||y===8252||y===8258||y===8263||y===8264||y===8265||y===8273)||ot["Letterlike Symbols"](y)||ot["Number Forms"](y)||ot["Miscellaneous Technical"](y)&&(y>=8960&&y<=8967||y>=8972&&y<=8991||y>=8996&&y<=9e3||y===9003||y>=9085&&y<=9114||y>=9150&&y<=9165||y===9167||y>=9169&&y<=9179||y>=9186&&y<=9215)||ot["Control Pictures"](y)&&y!==9251||ot["Optical Character Recognition"](y)||ot["Enclosed Alphanumerics"](y)||ot["Geometric Shapes"](y)||ot["Miscellaneous Symbols"](y)&&!(y>=9754&&y<=9759)||ot["Miscellaneous Symbols and Arrows"](y)&&(y>=11026&&y<=11055||y>=11088&&y<=11097||y>=11192&&y<=11243)||ot["CJK Symbols and Punctuation"](y)||ot.Katakana(y)||ot["Private Use Area"](y)||ot["CJK Compatibility Forms"](y)||ot["Small Form Variants"](y)||ot["Halfwidth and Fullwidth Forms"](y)||y===8734||y===8756||y===8757||y>=9984&&y<=10087||y>=10102&&y<=10131||y===65532||y===65533)}function xi(y){return!(zr(y)||gi(y))}function Wr(y){return ot.Arabic(y)||ot["Arabic Supplement"](y)||ot["Arabic Extended-A"](y)||ot["Arabic Presentation Forms-A"](y)||ot["Arabic Presentation Forms-B"](y)}function ii(y){return y>=1424&&y<=2303||ot["Arabic Presentation Forms-A"](y)||ot["Arabic Presentation Forms-B"](y)}function di(y,_){return!(!_&&ii(y)||y>=2304&&y<=3583||y>=3840&&y<=4255||ot.Khmer(y))}function Li(y){for(var _=0,I=y;_-1&&(kn=Qr.error),Pn&&Pn(y)};function Ea(){Ia.fire(new Xo("pluginStateChange",{pluginStatus:kn,pluginURL:Bn}))}var Ia=new jn,yo=function(){return kn},Da=function(y){return y({pluginStatus:kn,pluginURL:Bn}),Ia.on("pluginStateChange",y),y},go=function(y,_,I){if(I===void 0&&(I=!1),kn===Qr.deferred||kn===Qr.loading||kn===Qr.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Bn=lt.resolveURL(y),kn=Qr.deferred,Pn=_,Ea(),I||Is()},Is=function(){if(kn!==Qr.deferred||!Bn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");kn=Qr.loading,Ea(),Bn&&ti({url:Bn},function(y){y?na(y):(kn=Qr.loaded,Ea())})},Ms={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return kn===Qr.loaded||Ms.applyArabicShaping!=null},isLoading:function(){return kn===Qr.loading},setState:function(_){kn=_.pluginStatus,Bn=_.pluginURL},isParsed:function(){return Ms.applyArabicShaping!=null&&Ms.processBidirectionalText!=null&&Ms.processStyledBidirectionalText!=null},getPluginURL:function(){return Bn}},Xs=function(){!Ms.isLoading()&&!Ms.isLoaded()&&yo()==="deferred"&&Is()},Un=function(_,I){this.zoom=_,I?(this.now=I.now,this.fadeDuration=I.fadeDuration,this.zoomHistory=I.zoomHistory,this.transition=I.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Pt,this.transition={})};Un.prototype.isSupportedScript=function(_){return Ti(_,Ms.isLoaded())},Un.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Un.prototype.getCrossfadeParameters=function(){var _=this.zoom,I=_-Math.floor(_),U=this.crossFadingFactor();return _>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:I+(1-I)*U}:{fromScale:.5,toScale:1,t:1-(1-U)*I}};var ja=function(_,I){this.property=_,this.value=I,this.expression=w(I===void 0?_.specification.default:I,_.specification)};ja.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},ja.prototype.possiblyEvaluate=function(_,I,U){return this.property.possiblyEvaluate(this,_,I,U)};var Fo=function(_){this.property=_,this.value=new ja(_,void 0)};Fo.prototype.transitioned=function(_,I){return new $s(this.property,this.value,I,x({},_.transition,this.transition),_.now)},Fo.prototype.untransitioned=function(){return new $s(this.property,this.value,null,{},0)};var Uo=function(_){this._properties=_,this._values=Object.create(_.defaultTransitionablePropertyValues)};Uo.prototype.getValue=function(_){return j(this._values[_].value.value)},Uo.prototype.setValue=function(_,I){this._values.hasOwnProperty(_)||(this._values[_]=new Fo(this._values[_].property)),this._values[_].value=new ja(this._values[_].property,I===null?void 0:j(I))},Uo.prototype.getTransition=function(_){return j(this._values[_].transition)},Uo.prototype.setTransition=function(_,I){this._values.hasOwnProperty(_)||(this._values[_]=new Fo(this._values[_].property)),this._values[_].transition=j(I)||void 0},Uo.prototype.serialize=function(){for(var _={},I=0,U=Object.keys(this._values);Ithis.end)return this.prior=null,oe;if(this.value.isDataDriven())return this.prior=null,oe;if($he.zoomHistory.lastIntegerZoom?{from:U,to:$}:{from:oe,to:$}},_.prototype.interpolate=function(U){return U},_}(bt),Lr=function(_){this.specification=_};Lr.prototype.possiblyEvaluate=function(_,I,U,$){if(_.value!==void 0)if(_.expression.kind==="constant"){var oe=_.expression.evaluate(I,null,{},U,$);return this._calculate(oe,oe,oe,I)}else return this._calculate(_.expression.evaluate(new Un(Math.floor(I.zoom-1),I)),_.expression.evaluate(new Un(Math.floor(I.zoom),I)),_.expression.evaluate(new Un(Math.floor(I.zoom+1),I)),I)},Lr.prototype._calculate=function(_,I,U,$){var oe=$.zoom;return oe>$.zoomHistory.lastIntegerZoom?{from:_,to:I}:{from:U,to:I}},Lr.prototype.interpolate=function(_){return _};var Vr=function(_){this.specification=_};Vr.prototype.possiblyEvaluate=function(_,I,U,$){return!!_.expression.evaluate(I,null,{},U,$)},Vr.prototype.interpolate=function(){return!1};var Or=function(_){this.properties=_,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var I in _){var U=_[I];U.specification.overridable&&this.overridableProperties.push(I);var $=this.defaultPropertyValues[I]=new ja(U,void 0),oe=this.defaultTransitionablePropertyValues[I]=new Fo(U);this.defaultTransitioningPropertyValues[I]=oe.untransitioned(),this.defaultPossiblyEvaluatedValues[I]=$.possiblyEvaluate({})}};X("DataDrivenProperty",bt),X("DataConstantProperty",Me),X("CrossFadedDataDrivenProperty",Ot),X("CrossFadedProperty",Lr),X("ColorRampProperty",Vr);var Nr="-transition",vi=function(y){function _(I,U){if(y.call(this),this.id=I.id,this.type=I.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},I.type!=="custom"&&(I=I,this.metadata=I.metadata,this.minzoom=I.minzoom,this.maxzoom=I.maxzoom,I.type!=="background"&&(this.source=I.source,this.sourceLayer=I["source-layer"],this.filter=I.filter),U.layout&&(this._unevaluatedLayout=new bu(U.layout)),U.paint)){this._transitionablePaint=new Uo(U.paint);for(var $ in I.paint)this.setPaintProperty($,I.paint[$],{validate:!1});for(var oe in I.layout)this.setLayoutProperty(oe,I.layout[oe],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Sc(U.paint)}}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},_.prototype.getLayoutProperty=function(U){return U==="visibility"?this.visibility:this._unevaluatedLayout.getValue(U)},_.prototype.setLayoutProperty=function(U,$,oe){if(oe===void 0&&(oe={}),$!=null){var he="layers."+this.id+".layout."+U;if(this._validate(Ul,he,U,$,oe))return}if(U==="visibility"){this.visibility=$;return}this._unevaluatedLayout.setValue(U,$)},_.prototype.getPaintProperty=function(U){return V(U,Nr)?this._transitionablePaint.getTransition(U.slice(0,-Nr.length)):this._transitionablePaint.getValue(U)},_.prototype.setPaintProperty=function(U,$,oe){if(oe===void 0&&(oe={}),$!=null){var he="layers."+this.id+".paint."+U;if(this._validate(hl,he,U,$,oe))return!1}if(V(U,Nr))return this._transitionablePaint.setTransition(U.slice(0,-Nr.length),$||void 0),!1;var De=this._transitionablePaint._values[U],it=De.property.specification["property-type"]==="cross-faded-data-driven",yt=De.value.isDataDriven(),Lt=De.value;this._transitionablePaint.setValue(U,$),this._handleSpecialPaintPropertyUpdate(U);var sr=this._transitionablePaint._values[U].value,gr=sr.isDataDriven();return gr||yt||it||this._handleOverridablePaintPropertyUpdate(U,Lt,sr)},_.prototype._handleSpecialPaintPropertyUpdate=function(U){},_.prototype._handleOverridablePaintPropertyUpdate=function(U,$,oe){return!1},_.prototype.isHidden=function(U){return this.minzoom&&U=this.maxzoom?!0:this.visibility==="none"},_.prototype.updateTransitions=function(U){this._transitioningPaint=this._transitionablePaint.transitioned(U,this._transitioningPaint)},_.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},_.prototype.recalculate=function(U,$){U.getCrossfadeParameters&&(this._crossfadeParameters=U.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(U,void 0,$)),this.paint=this._transitioningPaint.possiblyEvaluate(U,void 0,$)},_.prototype.serialize=function(){var U={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&&(U.layout=U.layout||{},U.layout.visibility=this.visibility),Z(U,function($,oe){return $!==void 0&&!(oe==="layout"&&!Object.keys($).length)&&!(oe==="paint"&&!Object.keys($).length)})},_.prototype._validate=function(U,$,oe,he,De){return De===void 0&&(De={}),De&&De.validate===!1?!1:Lu(this,U.call(wo,{key:$,layerType:this.type,objectKey:oe,value:he,styleSpec:Rn,style:{glyphs:!0,sprite:!0}}))},_.prototype.is3D=function(){return!1},_.prototype.isTileClipped=function(){return!1},_.prototype.hasOffscreenPass=function(){return!1},_.prototype.resize=function(){},_.prototype.isStateDependent=function(){for(var U in this.paint._values){var $=this.paint.get(U);if(!(!($ instanceof dl)||!Ws($.property.specification))&&($.value.kind==="source"||$.value.kind==="composite")&&$.value.isStateDependent)return!0}return!1},_}(jn),Ni={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},qi=function(_,I){this._structArray=_,this._pos1=I*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Si=128,Vn=5,Qi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Qi.serialize=function(_,I){return _._trim(),I&&(_.isTransferred=!0,I.push(_.arrayBuffer)),{length:_.length,arrayBuffer:_.arrayBuffer}},Qi.deserialize=function(_){var I=Object.create(this.prototype);return I.arrayBuffer=_.arrayBuffer,I.length=_.length,I.capacity=_.arrayBuffer.byteLength/I.bytesPerElement,I._refreshViews(),I},Qi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Qi.prototype.clear=function(){this.length=0},Qi.prototype.resize=function(_){this.reserve(_),this.length=_},Qi.prototype.reserve=function(_){if(_>this.capacity){this.capacity=Math.max(_,Math.floor(this.capacity*Vn),Si),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var I=this.uint8;this._refreshViews(),I&&this.uint8.set(I)}},Qi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function ji(y,_){_===void 0&&(_=1);var I=0,U=0,$=y.map(function(he){var De=oi(he.type),it=I=Tr(I,Math.max(_,De)),yt=he.components||1;return U=Math.max(U,De),I+=De*yt,{name:he.name,type:he.type,components:yt,offset:it}}),oe=Tr(I,Math.max(U,_));return{members:$,size:oe,alignment:_}}function oi(y){return Ni[y].BYTES_PER_ELEMENT}function Tr(y,_){return Math.ceil(y/_)*_}var Zr=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U,$){var oe=this.length;return this.resize(oe+1),this.emplace(oe,U,$)},_.prototype.emplace=function(U,$,oe){var he=U*2;return this.int16[he+0]=$,this.int16[he+1]=oe,U},_}(Qi);Zr.prototype.bytesPerElement=4,X("StructArrayLayout2i4",Zr);var yi=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U,$,oe,he){var De=this.length;return this.resize(De+1),this.emplace(De,U,$,oe,he)},_.prototype.emplace=function(U,$,oe,he,De){var it=U*4;return this.int16[it+0]=$,this.int16[it+1]=oe,this.int16[it+2]=he,this.int16[it+3]=De,U},_}(Qi);yi.prototype.bytesPerElement=8,X("StructArrayLayout4i8",yi);var Ii=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U,$,oe,he,De,it){var yt=this.length;return this.resize(yt+1),this.emplace(yt,U,$,oe,he,De,it)},_.prototype.emplace=function(U,$,oe,he,De,it,yt){var Lt=U*6;return this.int16[Lt+0]=$,this.int16[Lt+1]=oe,this.int16[Lt+2]=he,this.int16[Lt+3]=De,this.int16[Lt+4]=it,this.int16[Lt+5]=yt,U},_}(Qi);Ii.prototype.bytesPerElement=12,X("StructArrayLayout2i4i12",Ii);var ui=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U,$,oe,he,De,it){var yt=this.length;return this.resize(yt+1),this.emplace(yt,U,$,oe,he,De,it)},_.prototype.emplace=function(U,$,oe,he,De,it,yt){var Lt=U*4,sr=U*8;return this.int16[Lt+0]=$,this.int16[Lt+1]=oe,this.uint8[sr+4]=he,this.uint8[sr+5]=De,this.uint8[sr+6]=it,this.uint8[sr+7]=yt,U},_}(Qi);ui.prototype.bytesPerElement=8,X("StructArrayLayout2i4ub8",ui);var nn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U,$){var oe=this.length;return this.resize(oe+1),this.emplace(oe,U,$)},_.prototype.emplace=function(U,$,oe){var he=U*2;return this.float32[he+0]=$,this.float32[he+1]=oe,U},_}(Qi);nn.prototype.bytesPerElement=8,X("StructArrayLayout2f8",nn);var Xi=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U,$,oe,he,De,it,yt,Lt,sr,gr){var hr=this.length;return this.resize(hr+1),this.emplace(hr,U,$,oe,he,De,it,yt,Lt,sr,gr)},_.prototype.emplace=function(U,$,oe,he,De,it,yt,Lt,sr,gr,hr){var Rr=U*10;return this.uint16[Rr+0]=$,this.uint16[Rr+1]=oe,this.uint16[Rr+2]=he,this.uint16[Rr+3]=De,this.uint16[Rr+4]=it,this.uint16[Rr+5]=yt,this.uint16[Rr+6]=Lt,this.uint16[Rr+7]=sr,this.uint16[Rr+8]=gr,this.uint16[Rr+9]=hr,U},_}(Qi);Xi.prototype.bytesPerElement=20,X("StructArrayLayout10ui20",Xi);var qn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U,$,oe,he,De,it,yt,Lt,sr,gr,hr,Rr){var ni=this.length;return this.resize(ni+1),this.emplace(ni,U,$,oe,he,De,it,yt,Lt,sr,gr,hr,Rr)},_.prototype.emplace=function(U,$,oe,he,De,it,yt,Lt,sr,gr,hr,Rr,ni){var Hi=U*12;return this.int16[Hi+0]=$,this.int16[Hi+1]=oe,this.int16[Hi+2]=he,this.int16[Hi+3]=De,this.uint16[Hi+4]=it,this.uint16[Hi+5]=yt,this.uint16[Hi+6]=Lt,this.uint16[Hi+7]=sr,this.int16[Hi+8]=gr,this.int16[Hi+9]=hr,this.int16[Hi+10]=Rr,this.int16[Hi+11]=ni,U},_}(Qi);qn.prototype.bytesPerElement=24,X("StructArrayLayout4i4ui4i24",qn);var fi=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U,$,oe){var he=this.length;return this.resize(he+1),this.emplace(he,U,$,oe)},_.prototype.emplace=function(U,$,oe,he){var De=U*3;return this.float32[De+0]=$,this.float32[De+1]=oe,this.float32[De+2]=he,U},_}(Qi);fi.prototype.bytesPerElement=12,X("StructArrayLayout3f12",fi);var si=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U){var $=this.length;return this.resize($+1),this.emplace($,U)},_.prototype.emplace=function(U,$){var oe=U*1;return this.uint32[oe+0]=$,U},_}(Qi);si.prototype.bytesPerElement=4,X("StructArrayLayout1ul4",si);var mn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.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)},_.prototype.emplaceBack=function(U,$,oe,he,De,it,yt,Lt,sr){var gr=this.length;return this.resize(gr+1),this.emplace(gr,U,$,oe,he,De,it,yt,Lt,sr)},_.prototype.emplace=function(U,$,oe,he,De,it,yt,Lt,sr,gr){var hr=U*10,Rr=U*5;return this.int16[hr+0]=$,this.int16[hr+1]=oe,this.int16[hr+2]=he,this.int16[hr+3]=De,this.int16[hr+4]=it,this.int16[hr+5]=yt,this.uint32[Rr+3]=Lt,this.uint16[hr+8]=sr,this.uint16[hr+9]=gr,U},_}(Qi);mn.prototype.bytesPerElement=20,X("StructArrayLayout6i1ul2ui20",mn);var Ji=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U,$,oe,he,De,it){var yt=this.length;return this.resize(yt+1),this.emplace(yt,U,$,oe,he,De,it)},_.prototype.emplace=function(U,$,oe,he,De,it,yt){var Lt=U*6;return this.int16[Lt+0]=$,this.int16[Lt+1]=oe,this.int16[Lt+2]=he,this.int16[Lt+3]=De,this.int16[Lt+4]=it,this.int16[Lt+5]=yt,U},_}(Qi);Ji.prototype.bytesPerElement=12,X("StructArrayLayout2i2i2i12",Ji);var Ui=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U,$,oe,he,De){var it=this.length;return this.resize(it+1),this.emplace(it,U,$,oe,he,De)},_.prototype.emplace=function(U,$,oe,he,De,it){var yt=U*4,Lt=U*8;return this.float32[yt+0]=$,this.float32[yt+1]=oe,this.float32[yt+2]=he,this.int16[Lt+6]=De,this.int16[Lt+7]=it,U},_}(Qi);Ui.prototype.bytesPerElement=16,X("StructArrayLayout2f1f2i16",Ui);var Bi=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U,$,oe,he){var De=this.length;return this.resize(De+1),this.emplace(De,U,$,oe,he)},_.prototype.emplace=function(U,$,oe,he,De){var it=U*12,yt=U*3;return this.uint8[it+0]=$,this.uint8[it+1]=oe,this.float32[yt+1]=he,this.float32[yt+2]=De,U},_}(Qi);Bi.prototype.bytesPerElement=12,X("StructArrayLayout2ub2f12",Bi);var pn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U,$,oe){var he=this.length;return this.resize(he+1),this.emplace(he,U,$,oe)},_.prototype.emplace=function(U,$,oe,he){var De=U*3;return this.uint16[De+0]=$,this.uint16[De+1]=oe,this.uint16[De+2]=he,U},_}(Qi);pn.prototype.bytesPerElement=6,X("StructArrayLayout3ui6",pn);var Nn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.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)},_.prototype.emplaceBack=function(U,$,oe,he,De,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn){var xn=this.length;return this.resize(xn+1),this.emplace(xn,U,$,oe,he,De,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn)},_.prototype.emplace=function(U,$,oe,he,De,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn,xn){var In=U*24,Xn=U*12,ga=U*48;return this.int16[In+0]=$,this.int16[In+1]=oe,this.uint16[In+2]=he,this.uint16[In+3]=De,this.uint32[Xn+2]=it,this.uint32[Xn+3]=yt,this.uint32[Xn+4]=Lt,this.uint16[In+10]=sr,this.uint16[In+11]=gr,this.uint16[In+12]=hr,this.float32[Xn+7]=Rr,this.float32[Xn+8]=ni,this.uint8[ga+36]=Hi,this.uint8[ga+37]=wi,this.uint8[ga+38]=bn,this.uint32[Xn+10]=rn,this.int16[In+22]=xn,U},_}(Qi);Nn.prototype.bytesPerElement=48,X("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Nn);var aa=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.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)},_.prototype.emplaceBack=function(U,$,oe,he,De,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn,xn,In,Xn,ga,ha,eo,za,Za,Jo,to,ao){var _s=this.length;return this.resize(_s+1),this.emplace(_s,U,$,oe,he,De,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn,xn,In,Xn,ga,ha,eo,za,Za,Jo,to,ao)},_.prototype.emplace=function(U,$,oe,he,De,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn,xn,In,Xn,ga,ha,eo,za,Za,Jo,to,ao,_s){var jo=U*34,El=U*17;return this.int16[jo+0]=$,this.int16[jo+1]=oe,this.int16[jo+2]=he,this.int16[jo+3]=De,this.int16[jo+4]=it,this.int16[jo+5]=yt,this.int16[jo+6]=Lt,this.int16[jo+7]=sr,this.uint16[jo+8]=gr,this.uint16[jo+9]=hr,this.uint16[jo+10]=Rr,this.uint16[jo+11]=ni,this.uint16[jo+12]=Hi,this.uint16[jo+13]=wi,this.uint16[jo+14]=bn,this.uint16[jo+15]=rn,this.uint16[jo+16]=xn,this.uint16[jo+17]=In,this.uint16[jo+18]=Xn,this.uint16[jo+19]=ga,this.uint16[jo+20]=ha,this.uint16[jo+21]=eo,this.uint16[jo+22]=za,this.uint32[El+12]=Za,this.float32[El+13]=Jo,this.float32[El+14]=to,this.float32[El+15]=ao,this.float32[El+16]=_s,U},_}(Qi);aa.prototype.bytesPerElement=68,X("StructArrayLayout8i15ui1ul4f68",aa);var Ki=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U){var $=this.length;return this.resize($+1),this.emplace($,U)},_.prototype.emplace=function(U,$){var oe=U*1;return this.float32[oe+0]=$,U},_}(Qi);Ki.prototype.bytesPerElement=4,X("StructArrayLayout1f4",Ki);var Cn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U,$,oe){var he=this.length;return this.resize(he+1),this.emplace(he,U,$,oe)},_.prototype.emplace=function(U,$,oe,he){var De=U*3;return this.int16[De+0]=$,this.int16[De+1]=oe,this.int16[De+2]=he,U},_}(Qi);Cn.prototype.bytesPerElement=6,X("StructArrayLayout3i6",Cn);var ia=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U,$,oe){var he=this.length;return this.resize(he+1),this.emplace(he,U,$,oe)},_.prototype.emplace=function(U,$,oe,he){var De=U*2,it=U*4;return this.uint32[De+0]=$,this.uint16[it+2]=oe,this.uint16[it+3]=he,U},_}(Qi);ia.prototype.bytesPerElement=8,X("StructArrayLayout1ul2ui8",ia);var sa=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U,$){var oe=this.length;return this.resize(oe+1),this.emplace(oe,U,$)},_.prototype.emplace=function(U,$,oe){var he=U*2;return this.uint16[he+0]=$,this.uint16[he+1]=oe,U},_}(Qi);sa.prototype.bytesPerElement=4,X("StructArrayLayout2ui4",sa);var ba=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U){var $=this.length;return this.resize($+1),this.emplace($,U)},_.prototype.emplace=function(U,$){var oe=U*1;return this.uint16[oe+0]=$,U},_}(Qi);ba.prototype.bytesPerElement=2,X("StructArrayLayout1ui2",ba);var is=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(U,$,oe,he){var De=this.length;return this.resize(De+1),this.emplace(De,U,$,oe,he)},_.prototype.emplace=function(U,$,oe,he,De){var it=U*4;return this.float32[it+0]=$,this.float32[it+1]=oe,this.float32[it+2]=he,this.float32[it+3]=De,U},_}(Qi);is.prototype.bytesPerElement=16,X("StructArrayLayout4f16",is);var Zs=function(y){function _(){y.apply(this,arguments)}y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_;var I={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 I.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},I.x1.get=function(){return this._structArray.int16[this._pos2+2]},I.y1.get=function(){return this._structArray.int16[this._pos2+3]},I.x2.get=function(){return this._structArray.int16[this._pos2+4]},I.y2.get=function(){return this._structArray.int16[this._pos2+5]},I.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},I.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},I.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},I.anchorPoint.get=function(){return new u(this.anchorPointX,this.anchorPointY)},Object.defineProperties(_.prototype,I),_}(qi);Zs.prototype.size=20;var Ga=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.get=function(U){return new Zs(this,U)},_}(mn);X("CollisionBoxArray",Ga);var Ml=function(y){function _(){y.apply(this,arguments)}y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_;var I={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 I.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},I.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},I.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},I.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},I.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},I.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},I.segment.get=function(){return this._structArray.uint16[this._pos2+10]},I.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},I.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},I.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},I.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},I.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},I.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},I.placedOrientation.set=function(U){this._structArray.uint8[this._pos1+37]=U},I.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},I.hidden.set=function(U){this._structArray.uint8[this._pos1+38]=U},I.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},I.crossTileID.set=function(U){this._structArray.uint32[this._pos4+10]=U},I.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(_.prototype,I),_}(qi);Ml.prototype.size=48;var zo=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.get=function(U){return new Ml(this,U)},_}(Nn);X("PlacedSymbolArray",zo);var Qs=function(y){function _(){y.apply(this,arguments)}y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_;var I={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 I.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},I.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},I.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},I.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},I.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},I.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},I.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},I.key.get=function(){return this._structArray.uint16[this._pos2+8]},I.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},I.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},I.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},I.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},I.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},I.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},I.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},I.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},I.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},I.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},I.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},I.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},I.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},I.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},I.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},I.crossTileID.set=function(U){this._structArray.uint32[this._pos4+12]=U},I.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},I.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},I.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},I.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(_.prototype,I),_}(qi);Qs.prototype.size=68;var al=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.get=function(U){return new Qs(this,U)},_}(aa);X("SymbolInstanceArray",al);var Vl=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.getoffsetX=function(U){return this.float32[U*1+0]},_}(Ki);X("GlyphOffsetArray",Vl);var ss=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.getx=function(U){return this.int16[U*3+0]},_.prototype.gety=function(U){return this.int16[U*3+1]},_.prototype.gettileUnitDistanceFromAnchor=function(U){return this.int16[U*3+2]},_}(Cn);X("SymbolLineVertexArray",ss);var Vs=function(y){function _(){y.apply(this,arguments)}y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_;var I={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return I.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},I.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},I.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(_.prototype,I),_}(qi);Vs.prototype.size=8;var Ys=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.get=function(U){return new Vs(this,U)},_}(ia);X("FeatureIndexArray",Ys);var wa=ji([{name:"a_pos",components:2,type:"Int16"}],4),ol=wa.members,io=function(_){_===void 0&&(_=[]),this.segments=_};io.prototype.prepareSegment=function(_,I,U,$){var oe=this.segments[this.segments.length-1];return _>io.MAX_VERTEX_ARRAY_LENGTH&&ie("Max vertices per segment is "+io.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+_),(!oe||oe.vertexLength+_>io.MAX_VERTEX_ARRAY_LENGTH||oe.sortKey!==$)&&(oe={vertexOffset:I.length,primitiveOffset:U.length,vertexLength:0,primitiveLength:0},$!==void 0&&(oe.sortKey=$),this.segments.push(oe)),oe},io.prototype.get=function(){return this.segments},io.prototype.destroy=function(){for(var _=0,I=this.segments;_>>16)*it&65535)<<16)&4294967295,Lt=Lt<<15|Lt>>>17,Lt=(Lt&65535)*yt+(((Lt>>>16)*yt&65535)<<16)&4294967295,he^=Lt,he=he<<13|he>>>19,De=(he&65535)*5+(((he>>>16)*5&65535)<<16)&4294967295,he=(De&65535)+27492+(((De>>>16)+58964&65535)<<16);switch(Lt=0,$){case 3:Lt^=(I.charCodeAt(sr+2)&255)<<16;case 2:Lt^=(I.charCodeAt(sr+1)&255)<<8;case 1:Lt^=I.charCodeAt(sr)&255,Lt=(Lt&65535)*it+(((Lt>>>16)*it&65535)<<16)&4294967295,Lt=Lt<<15|Lt>>>17,Lt=(Lt&65535)*yt+(((Lt>>>16)*yt&65535)<<16)&4294967295,he^=Lt}return he^=I.length,he^=he>>>16,he=(he&65535)*2246822507+(((he>>>16)*2246822507&65535)<<16)&4294967295,he^=he>>>13,he=(he&65535)*3266489909+(((he>>>16)*3266489909&65535)<<16)&4294967295,he^=he>>>16,he>>>0}y.exports=_}),O=a(function(y){function _(I,U){for(var $=I.length,oe=U^$,he=0,De;$>=4;)De=I.charCodeAt(he)&255|(I.charCodeAt(++he)&255)<<8|(I.charCodeAt(++he)&255)<<16|(I.charCodeAt(++he)&255)<<24,De=(De&65535)*1540483477+(((De>>>16)*1540483477&65535)<<16),De^=De>>>24,De=(De&65535)*1540483477+(((De>>>16)*1540483477&65535)<<16),oe=(oe&65535)*1540483477+(((oe>>>16)*1540483477&65535)<<16)^De,$-=4,++he;switch($){case 3:oe^=(I.charCodeAt(he+2)&255)<<16;case 2:oe^=(I.charCodeAt(he+1)&255)<<8;case 1:oe^=I.charCodeAt(he)&255,oe=(oe&65535)*1540483477+(((oe>>>16)*1540483477&65535)<<16)}return oe^=oe>>>13,oe=(oe&65535)*1540483477+(((oe>>>16)*1540483477&65535)<<16),oe^=oe>>>15,oe>>>0}y.exports=_}),K=J,de=J,ne=O;K.murmur3=de,K.murmur2=ne;var we=function(){this.ids=[],this.positions=[],this.indexed=!1};we.prototype.add=function(_,I,U,$){this.ids.push(ht(_)),this.positions.push(I,U,$)},we.prototype.getPositions=function(_){for(var I=ht(_),U=0,$=this.ids.length-1;U<$;){var oe=U+$>>1;this.ids[oe]>=I?$=oe:U=oe+1}for(var he=[];this.ids[U]===I;){var De=this.positions[3*U],it=this.positions[3*U+1],yt=this.positions[3*U+2];he.push({index:De,start:it,end:yt}),U++}return he},we.serialize=function(_,I){var U=new Float64Array(_.ids),$=new Uint32Array(_.positions);return Yt(U,$,0,U.length-1),I&&I.push(U.buffer,$.buffer),{ids:U,positions:$}},we.deserialize=function(_){var I=new we;return I.ids=_.ids,I.positions=_.positions,I.indexed=!0,I};var Oe=Math.pow(2,53)-1;function ht(y){var _=+y;return!isNaN(_)&&_<=Oe?_:K(String(y))}function Yt(y,_,I,U){for(;I>1],oe=I-1,he=U+1;;){do oe++;while(y[oe]<$);do he--;while(y[he]>$);if(oe>=he)break;cr(y,oe,he),cr(_,3*oe,3*he),cr(_,3*oe+1,3*he+1),cr(_,3*oe+2,3*he+2)}he-Ihe.x+1||ithe.y+1)&&ie("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return I}function Ja(y,_){return{type:y.type,id:y.id,properties:y.properties,geometry:_?zn(y):[]}}function co(y,_,I,U,$){y.emplaceBack(_*2+(U+1)/2,I*2+($+1)/2)}var ts=function(_){this.zoom=_.zoom,this.overscaling=_.overscaling,this.layers=_.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=_.index,this.hasPattern=!1,this.layoutVertexArray=new Zr,this.indexArray=new pn,this.segments=new io,this.programConfigurations=new ci(_.layers,_.zoom),this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};ts.prototype.populate=function(_,I,U){var $=this.layers[0],oe=[],he=null;$.type==="circle"&&(he=$.layout.get("circle-sort-key"));for(var De=0,it=_;De=Ei||gr<0||gr>=Ei)){var hr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,_.sortKey),Rr=hr.vertexLength;co(this.layoutVertexArray,sr,gr,-1,-1),co(this.layoutVertexArray,sr,gr,1,-1),co(this.layoutVertexArray,sr,gr,1,1),co(this.layoutVertexArray,sr,gr,-1,1),this.indexArray.emplaceBack(Rr,Rr+1,Rr+2),this.indexArray.emplaceBack(Rr,Rr+3,Rr+2),hr.vertexLength+=4,hr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,_,U,{},$)},X("CircleBucket",ts,{omit:["layers"]});function so(y,_){for(var I=0;I=3){for(var oe=0;oe<$.length;oe++)if(Td(y,$[oe]))return!0}if(Cv(y,$,I))return!0}return!1}function Cv(y,_,I){if(y.length>1){if(Lv(y,_))return!0;for(var U=0;U<_.length;U++)if(Kv(_[U],y,I))return!0}for(var $=0;$1?y.distSqr(I):y.distSqr(I.sub(_)._mult($)._add(_))}function gp(y,_){for(var I=!1,U,$,oe,he=0;he_.y!=oe.y>_.y&&_.x<(oe.x-$.x)*(_.y-$.y)/(oe.y-$.y)+$.x&&(I=!I)}return I}function Td(y,_){for(var I=!1,U=0,$=y.length-1;U_.y!=he.y>_.y&&_.x<(he.x-oe.x)*(_.y-oe.y)/(he.y-oe.y)+oe.x&&(I=!I)}return I}function mp(y,_,I,U,$){for(var oe=0,he=y;oe=De.x&&$>=De.y)return!0}var it=[new u(_,I),new u(_,$),new u(U,$),new u(U,I)];if(y.length>2)for(var yt=0,Lt=it;yt$.x&&_.x>$.x||y.y$.y&&_.y>$.y)return!1;var oe=ae(y,_,I[0]);return oe!==ae(y,_,I[1])||oe!==ae(y,_,I[2])||oe!==ae(y,_,I[3])}function Ad(y,_,I){var U=_.paint.get(y).value;return U.kind==="constant"?U.value:I.programConfigurations.get(_.id).getMaxValue(y)}function Pv(y){return Math.sqrt(y[0]*y[0]+y[1]*y[1])}function Jv(y,_,I,U,$){if(!_[0]&&!_[1])return y;var oe=u.convert(_)._mult($);I==="viewport"&&oe._rotate(-U);for(var he=[],De=0;De0&&(oe=1/Math.sqrt(oe)),y[0]=_[0]*oe,y[1]=_[1]*oe,y[2]=_[2]*oe,y}function H9(y,_){return y[0]*_[0]+y[1]*_[1]+y[2]*_[2]}function j9(y,_,I){var U=_[0],$=_[1],oe=_[2],he=I[0],De=I[1],it=I[2];return y[0]=$*it-oe*De,y[1]=oe*he-U*it,y[2]=U*De-$*he,y}function W9(y,_,I){var U=_[0],$=_[1],oe=_[2];return y[0]=U*I[0]+$*I[3]+oe*I[6],y[1]=U*I[1]+$*I[4]+oe*I[7],y[2]=U*I[2]+$*I[5]+oe*I[8],y}var X9=um,OQ=function(){var y=lm();return function(_,I,U,$,oe,he){var De,it;for(I||(I=3),U||(U=0),$?it=Math.min($*I+U,_.length):it=_.length,De=U;Dey.width||$.height>y.height||I.x>y.width-$.width||I.y>y.height-$.height)throw new RangeError("out of range source coordinates for image copy");if($.width>_.width||$.height>_.height||U.x>_.width-$.width||U.y>_.height-$.height)throw new RangeError("out of range destination coordinates for image copy");for(var he=y.data,De=_.data,it=0;it<$.height;it++)for(var yt=((I.y+it)*y.width+I.x)*oe,Lt=((U.y+it)*_.width+U.x)*oe,sr=0;sr<$.width*oe;sr++)De[Lt+sr]=he[yt+sr];return _}var Dv=function(_,I){Md(this,_,1,I)};Dv.prototype.resize=function(_){Uw(this,_,1)},Dv.prototype.clone=function(){return new Dv({width:this.width,height:this.height},new Uint8Array(this.data))},Dv.copy=function(_,I,U,$,oe){Vw(_,I,U,$,oe,1)};var Eh=function(_,I){Md(this,_,4,I)};Eh.prototype.resize=function(_){Uw(this,_,4)},Eh.prototype.replace=function(_,I){I?this.data.set(_):_ instanceof Uint8ClampedArray?this.data=new Uint8Array(_.buffer):this.data=_},Eh.prototype.clone=function(){return new Eh({width:this.width,height:this.height},new Uint8Array(this.data))},Eh.copy=function(_,I,U,$,oe){Vw(_,I,U,$,oe,4)},X("AlphaImage",Dv),X("RGBAImage",Eh);var Qx=new Or({"heatmap-radius":new bt(Rn.paint_heatmap["heatmap-radius"]),"heatmap-weight":new bt(Rn.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Me(Rn.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Vr(Rn.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Me(Rn.paint_heatmap["heatmap-opacity"])}),P1={paint:Qx};function eb(y){var _={},I=y.resolution||256,U=y.clips?y.clips.length:1,$=y.image||new Eh({width:I,height:U}),oe=function(bn,rn,xn){_[y.evaluationKey]=xn;var In=y.expression.evaluate(_);$.data[bn+rn+0]=Math.floor(In.r*255/In.a),$.data[bn+rn+1]=Math.floor(In.g*255/In.a),$.data[bn+rn+2]=Math.floor(In.b*255/In.a),$.data[bn+rn+3]=Math.floor(In.a*255)};if(y.clips)for(var yt=0,Lt=0;yt80*I){De=yt=y[0],it=Lt=y[1];for(var Rr=I;Rr<$;Rr+=I)sr=y[Rr],gr=y[Rr+1],sryt&&(yt=sr),gr>Lt&&(Lt=gr);hr=Math.max(yt-De,Lt-it),hr=hr!==0?1/hr:0}return tb(oe,he,I,De,it,hr),he}function jw(y,_,I,U,$){var oe,he;if($===yS(y,_,I,U)>0)for(oe=_;oe=_;oe-=U)he=zC(oe,y[oe],y[oe+1],he);return he&&ib(he,he.next)&&(ob(he),he=he.next),he}function cm(y,_){if(!y)return y;_||(_=y);var I=y,U;do if(U=!1,!I.steiner&&(ib(I,I.next)||Tf(I.prev,I,I.next)===0)){if(ob(I),I=_=I.prev,I===I.next)break;U=!0}else I=I.next;while(U||I!==_);return _}function tb(y,_,I,U,$,oe,he){if(y){!he&&oe&&Ww(y,U,$,oe);for(var De=y,it,yt;y.prev!==y.next;){if(it=y.prev,yt=y.next,oe?RC(y,U,$,oe):IC(y)){_.push(it.i/I),_.push(y.i/I),_.push(yt.i/I),ob(y),y=yt.next,De=yt.next;continue}if(y=yt,y===De){he?he===1?(y=rb(cm(y),_,I),tb(y,_,I,U,$,oe,2)):he===2&&v0(y,_,I,U,$,oe):tb(cm(y),_,I,U,$,oe,1);break}}}}function IC(y){var _=y.prev,I=y,U=y.next;if(Tf(_,I,U)>=0)return!1;for(var $=y.next.next;$!==y.prev;){if(hm(_.x,_.y,I.x,I.y,U.x,U.y,$.x,$.y)&&Tf($.prev,$,$.next)>=0)return!1;$=$.next}return!0}function RC(y,_,I,U){var $=y.prev,oe=y,he=y.next;if(Tf($,oe,he)>=0)return!1;for(var De=$.xoe.x?$.x>he.x?$.x:he.x:oe.x>he.x?oe.x:he.x,Lt=$.y>oe.y?$.y>he.y?$.y:he.y:oe.y>he.y?oe.y:he.y,sr=vS(De,it,_,I,U),gr=vS(yt,Lt,_,I,U),hr=y.prevZ,Rr=y.nextZ;hr&&hr.z>=sr&&Rr&&Rr.z<=gr;){if(hr!==y.prev&&hr!==y.next&&hm($.x,$.y,oe.x,oe.y,he.x,he.y,hr.x,hr.y)&&Tf(hr.prev,hr,hr.next)>=0||(hr=hr.prevZ,Rr!==y.prev&&Rr!==y.next&&hm($.x,$.y,oe.x,oe.y,he.x,he.y,Rr.x,Rr.y)&&Tf(Rr.prev,Rr,Rr.next)>=0))return!1;Rr=Rr.nextZ}for(;hr&&hr.z>=sr;){if(hr!==y.prev&&hr!==y.next&&hm($.x,$.y,oe.x,oe.y,he.x,he.y,hr.x,hr.y)&&Tf(hr.prev,hr,hr.next)>=0)return!1;hr=hr.prevZ}for(;Rr&&Rr.z<=gr;){if(Rr!==y.prev&&Rr!==y.next&&hm($.x,$.y,oe.x,oe.y,he.x,he.y,Rr.x,Rr.y)&&Tf(Rr.prev,Rr,Rr.next)>=0)return!1;Rr=Rr.nextZ}return!0}function rb(y,_,I){var U=y;do{var $=U.prev,oe=U.next.next;!ib($,oe)&&Xw($,U,U.next,oe)&&ab($,oe)&&ab(oe,$)&&(_.push($.i/I),_.push(U.i/I),_.push(oe.i/I),ob(U),ob(U.next),U=y=oe),U=U.next}while(U!==y);return cm(U)}function v0(y,_,I,U,$,oe){var he=y;do{for(var De=he.next.next;De!==he.prev;){if(he.i!==De.i&&R1(he,De)){var it=gS(he,De);he=cm(he,he.next),it=cm(it,it.next),tb(he,_,I,U,$,oe),tb(it,_,I,U,$,oe);return}De=De.next}he=he.next}while(he!==y)}function fm(y,_,I,U){var $=[],oe,he,De,it,yt;for(oe=0,he=_.length;oe=I.next.y&&I.next.y!==I.y){var De=I.x+($-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(De<=U&&De>oe){if(oe=De,De===U){if($===I.y)return I;if($===I.next.y)return I.next}he=I.x=I.x&&I.x>=yt&&U!==I.x&&hm($he.x||I.x===he.x&&rq(he,I)))&&(he=I,sr=gr)),I=I.next;while(I!==it);return he}function rq(y,_){return Tf(y.prev,y,_.prev)<0&&Tf(_.next,y,y.next)<0}function Ww(y,_,I,U){var $=y;do $.z===null&&($.z=vS($.x,$.y,_,I,U)),$.prevZ=$.prev,$.nextZ=$.next,$=$.next;while($!==y);$.prevZ.nextZ=null,$.prevZ=null,dS($)}function dS(y){var _,I,U,$,oe,he,De,it,yt=1;do{for(I=y,y=null,oe=null,he=0;I;){for(he++,U=I,De=0,_=0;_0||it>0&&U;)De!==0&&(it===0||!U||I.z<=U.z)?($=I,I=I.nextZ,De--):($=U,U=U.nextZ,it--),oe?oe.nextZ=$:y=$,$.prevZ=oe,oe=$;I=U}oe.nextZ=null,yt*=2}while(he>1);return y}function vS(y,_,I,U,$){return y=32767*(y-I)*$,_=32767*(_-U)*$,y=(y|y<<8)&16711935,y=(y|y<<4)&252645135,y=(y|y<<2)&858993459,y=(y|y<<1)&1431655765,_=(_|_<<8)&16711935,_=(_|_<<4)&252645135,_=(_|_<<2)&858993459,_=(_|_<<1)&1431655765,y|_<<1}function pS(y){var _=y,I=y;do(_.x=0&&(y-he)*(U-De)-(I-he)*(_-De)>=0&&(I-he)*(oe-De)-($-he)*(U-De)>=0}function R1(y,_){return y.next.i!==_.i&&y.prev.i!==_.i&&!FC(y,_)&&(ab(y,_)&&ab(_,y)&&iq(y,_)&&(Tf(y.prev,y,_.prev)||Tf(y,_.prev,_))||ib(y,_)&&Tf(y.prev,y,y.next)>0&&Tf(_.prev,_,_.next)>0)}function Tf(y,_,I){return(_.y-y.y)*(I.x-_.x)-(_.x-y.x)*(I.y-_.y)}function ib(y,_){return y.x===_.x&&y.y===_.y}function Xw(y,_,I,U){var $=my(Tf(y,_,I)),oe=my(Tf(y,_,U)),he=my(Tf(I,U,y)),De=my(Tf(I,U,_));return!!($!==oe&&he!==De||$===0&&nb(y,I,_)||oe===0&&nb(y,U,_)||he===0&&nb(I,y,U)||De===0&&nb(I,_,U))}function nb(y,_,I){return _.x<=Math.max(y.x,I.x)&&_.x>=Math.min(y.x,I.x)&&_.y<=Math.max(y.y,I.y)&&_.y>=Math.min(y.y,I.y)}function my(y){return y>0?1:y<0?-1:0}function FC(y,_){var I=y;do{if(I.i!==y.i&&I.next.i!==y.i&&I.i!==_.i&&I.next.i!==_.i&&Xw(I,I.next,y,_))return!0;I=I.next}while(I!==y);return!1}function ab(y,_){return Tf(y.prev,y,y.next)<0?Tf(y,_,y.next)>=0&&Tf(y,y.prev,_)>=0:Tf(y,_,y.prev)<0||Tf(y,y.next,_)<0}function iq(y,_){var I=y,U=!1,$=(y.x+_.x)/2,oe=(y.y+_.y)/2;do I.y>oe!=I.next.y>oe&&I.next.y!==I.y&&$<(I.next.x-I.x)*(oe-I.y)/(I.next.y-I.y)+I.x&&(U=!U),I=I.next;while(I!==y);return U}function gS(y,_){var I=new mS(y.i,y.x,y.y),U=new mS(_.i,_.x,_.y),$=y.next,oe=_.prev;return y.next=_,_.prev=y,I.next=$,$.prev=I,U.next=I,I.prev=U,oe.next=U,U.prev=oe,U}function zC(y,_,I,U){var $=new mS(y,_,I);return U?($.next=U.next,$.prev=U,U.next.prev=$,U.next=$):($.prev=$,$.next=$),$}function ob(y){y.next.prev=y.prev,y.prev.next=y.next,y.prevZ&&(y.prevZ.nextZ=y.nextZ),y.nextZ&&(y.nextZ.prevZ=y.prevZ)}function mS(y,_,I){this.i=y,this.x=_,this.y=I,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}I1.deviation=function(y,_,I,U){var $=_&&_.length,oe=$?_[0]*I:y.length,he=Math.abs(yS(y,0,oe,I));if($)for(var De=0,it=_.length;De0&&(U+=y[$-1].length,I.holes.push(U))}return I},Hw.default=PC;function _S(y,_,I,U,$){pg(y,_,I||0,U||y.length-1,$||qC)}function pg(y,_,I,U,$){for(;U>I;){if(U-I>600){var oe=U-I+1,he=_-I+1,De=Math.log(oe),it=.5*Math.exp(2*De/3),yt=.5*Math.sqrt(De*it*(oe-it)/oe)*(he-oe/2<0?-1:1),Lt=Math.max(I,Math.floor(_-he*it/oe+yt)),sr=Math.min(U,Math.floor(_+(oe-he)*it/oe+yt));pg(y,_,Lt,sr,$)}var gr=y[_],hr=I,Rr=U;for(D1(y,I,_),$(y[U],gr)>0&&D1(y,I,U);hr0;)Rr--}$(y[I],gr)===0?D1(y,I,Rr):(Rr++,D1(y,Rr,U)),Rr<=_&&(I=Rr+1),_<=Rr&&(U=Rr-1)}}function D1(y,_,I){var U=y[_];y[_]=y[I],y[I]=U}function qC(y,_){return y<_?-1:y>_?1:0}function Zw(y,_){var I=y.length;if(I<=1)return[y];for(var U=[],$,oe,he=0;he1)for(var it=0;it>3}if(U--,I===1||I===2)$+=y.readSVarint(),oe+=y.readSVarint(),I===1&&(De&&he.push(De),De=[]),De.push(new u($,oe));else if(I===7)De&&De.push(De[0].clone());else throw new Error("unknown command "+I)}return De&&he.push(De),he},yy.prototype.bbox=function(){var y=this._pbf;y.pos=this._geometry;for(var _=y.readVarint()+y.pos,I=1,U=0,$=0,oe=0,he=1/0,De=-1/0,it=1/0,yt=-1/0;y.pos<_;){if(U<=0){var Lt=y.readVarint();I=Lt&7,U=Lt>>3}if(U--,I===1||I===2)$+=y.readSVarint(),oe+=y.readSVarint(),$De&&(De=$),oeyt&&(yt=oe);else if(I!==7)throw new Error("unknown command "+I)}return[he,it,De,yt]},yy.prototype.toGeoJSON=function(y,_,I){var U=this.extent*Math.pow(2,I),$=this.extent*y,oe=this.extent*_,he=this.loadGeometry(),De=yy.types[this.type],it,yt;function Lt(hr){for(var Rr=0;Rr>3;_=U===1?y.readString():U===2?y.readFloat():U===3?y.readDouble():U===4?y.readVarint64():U===5?y.readVarint():U===6?y.readSVarint():U===7?y.readBoolean():null}return _}wS.prototype.feature=function(y){if(y<0||y>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[y];var _=this._pbf.readVarint()+this._pbf.pos;return new bS(this._pbf,_,this.extent,this._keys,this._values)};var XC=aq;function aq(y,_){this.layers=y.readFields(oq,{},_)}function oq(y,_,I){if(y===3){var U=new gg(I,I.readVarint()+I.pos);U.length&&(_[U.name]=U)}}var ZC=XC,F1=bS,YC=gg,mg={VectorTile:ZC,VectorTileFeature:F1,VectorTileLayer:YC},KC=mg.VectorTileFeature.types,Kw=500,z1=Math.pow(2,13);function dm(y,_,I,U,$,oe,he,De){y.emplaceBack(_,I,Math.floor(U*z1)*2+he,$*z1*2,oe*z1*2,Math.round(De))}var Vp=function(_){this.zoom=_.zoom,this.overscaling=_.overscaling,this.layers=_.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=_.index,this.hasPattern=!1,this.layoutVertexArray=new Ii,this.indexArray=new pn,this.programConfigurations=new ci(_.layers,_.zoom),this.segments=new io,this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};Vp.prototype.populate=function(_,I,U){this.features=[],this.hasPattern=Yw("fill-extrusion",this.layers,I);for(var $=0,oe=_;$=1){var xn=Hi[bn-1];if(!sq(rn,xn)){hr.vertexLength+4>io.MAX_VERTEX_ARRAY_LENGTH&&(hr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var In=rn.sub(xn)._perp()._unit(),Xn=xn.dist(rn);wi+Xn>32768&&(wi=0),dm(this.layoutVertexArray,rn.x,rn.y,In.x,In.y,0,0,wi),dm(this.layoutVertexArray,rn.x,rn.y,In.x,In.y,0,1,wi),wi+=Xn,dm(this.layoutVertexArray,xn.x,xn.y,In.x,In.y,0,0,wi),dm(this.layoutVertexArray,xn.x,xn.y,In.x,In.y,0,1,wi);var ga=hr.vertexLength;this.indexArray.emplaceBack(ga,ga+2,ga+1),this.indexArray.emplaceBack(ga+1,ga+2,ga+3),hr.vertexLength+=4,hr.primitiveLength+=2}}}}if(hr.vertexLength+yt>io.MAX_VERTEX_ARRAY_LENGTH&&(hr=this.segments.prepareSegment(yt,this.layoutVertexArray,this.indexArray)),KC[_.type]==="Polygon"){for(var ha=[],eo=[],za=hr.vertexLength,Za=0,Jo=it;ZaEi)||y.y===_.y&&(y.y<0||y.y>Ei)}function lq(y){return y.every(function(_){return _.x<0})||y.every(function(_){return _.x>Ei})||y.every(function(_){return _.y<0})||y.every(function(_){return _.y>Ei})}var q1=new Or({"fill-extrusion-opacity":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new bt(Rn["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ot(Rn["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new bt(Rn["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new bt(Rn["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),ld={paint:q1},vm=function(y){function _(I){y.call(this,I,ld)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.createBucket=function(U){return new Vp(U)},_.prototype.queryRadius=function(){return Pv(this.paint.get("fill-extrusion-translate"))},_.prototype.is3D=function(){return!0},_.prototype.queryIntersectsFeature=function(U,$,oe,he,De,it,yt,Lt){var sr=Jv(U,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),it.angle,yt),gr=this.paint.get("fill-extrusion-height").evaluate($,oe),hr=this.paint.get("fill-extrusion-base").evaluate($,oe),Rr=uq(sr,Lt,it,0),ni=AS(he,hr,gr,Lt),Hi=ni[0],wi=ni[1];return JC(Hi,wi,Rr)},_}(vi);function _y(y,_){return y.x*_.x+y.y*_.y}function TS(y,_){if(y.length===1){for(var I=0,U=_[I++],$;!$||U.equals($);)if($=_[I++],!$)return 1/0;for(;I<_.length;I++){var oe=_[I],he=y[0],De=$.sub(U),it=oe.sub(U),yt=he.sub(U),Lt=_y(De,De),sr=_y(De,it),gr=_y(it,it),hr=_y(yt,De),Rr=_y(yt,it),ni=Lt*gr-sr*sr,Hi=(gr*hr-sr*Rr)/ni,wi=(Lt*Rr-sr*hr)/ni,bn=1-Hi-wi,rn=U.z*bn+$.z*Hi+oe.z*wi;if(isFinite(rn))return rn}return 1/0}else{for(var xn=1/0,In=0,Xn=_;In=2&&_[yt-1].equals(_[yt-2]);)yt--;for(var Lt=0;Lt0;if(ha&&bn>Lt){var za=hr.dist(Rr);if(za>2*sr){var Za=hr.sub(hr.sub(Rr)._mult(sr/za)._round());this.updateDistance(Rr,Za),this.addCurrentVertex(Za,Hi,0,0,gr),Rr=Za}}var Jo=Rr&&ni,to=Jo?U:it?"butt":$;if(Jo&&to==="round"&&(Xnoe&&(to="bevel"),to==="bevel"&&(Xn>2&&(to="flipbevel"),Xn100)rn=wi.mult(-1);else{var ao=Xn*Hi.add(wi).mag()/Hi.sub(wi).mag();rn._perp()._mult(ao*(eo?-1:1))}this.addCurrentVertex(hr,rn,0,0,gr),this.addCurrentVertex(hr,rn.mult(-1),0,0,gr)}else if(to==="bevel"||to==="fakeround"){var _s=-Math.sqrt(Xn*Xn-1),jo=eo?_s:0,El=eo?0:_s;if(Rr&&this.addCurrentVertex(hr,Hi,jo,El,gr),to==="fakeround")for(var Iu=Math.round(ga*180/Math.PI/MS),kl=1;kl2*sr){var ch=hr.add(ni.sub(hr)._mult(sr/$h)._round());this.updateDistance(hr,ch),this.addCurrentVertex(ch,wi,0,0,gr),hr=ch}}}}},sh.prototype.addCurrentVertex=function(_,I,U,$,oe,he){he===void 0&&(he=!1);var De=I.x+I.y*U,it=I.y-I.x*U,yt=-I.x+I.y*$,Lt=-I.y-I.x*$;this.addHalfVertex(_,De,it,he,!1,U,oe),this.addHalfVertex(_,yt,Lt,he,!0,-$,oe),this.distance>fb/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(_,I,U,$,oe,he))},sh.prototype.addHalfVertex=function(_,I,U,$,oe,he,De){var it=_.x,yt=_.y,Lt=this.lineClips?this.scaledDistance*(fb-1):this.scaledDistance,sr=Lt*$w;if(this.layoutVertexArray.emplaceBack((it<<1)+($?1:0),(yt<<1)+(oe?1:0),Math.round(Jw*I)+128,Math.round(Jw*U)+128,(he===0?0:he<0?-1:1)+1|(sr&63)<<2,sr>>6),this.lineClips){var gr=this.scaledDistance-this.lineClips.start,hr=this.lineClips.end-this.lineClips.start,Rr=gr/hr;this.layoutVertexArray2.emplaceBack(Rr,this.lineClipsArray.length)}var ni=De.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,ni),De.primitiveLength++),oe?this.e2=ni:this.e1=ni},sh.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},sh.prototype.updateDistance=function(_,I){this.distance+=_.dist(I),this.updateScaledDistance()},X("LineBucket",sh,{omit:["layers","patternFeatures"]});var ES=new Or({"line-cap":new Me(Rn.layout_line["line-cap"]),"line-join":new bt(Rn.layout_line["line-join"]),"line-miter-limit":new Me(Rn.layout_line["line-miter-limit"]),"line-round-limit":new Me(Rn.layout_line["line-round-limit"]),"line-sort-key":new bt(Rn.layout_line["line-sort-key"])}),kS=new Or({"line-opacity":new bt(Rn.paint_line["line-opacity"]),"line-color":new bt(Rn.paint_line["line-color"]),"line-translate":new Me(Rn.paint_line["line-translate"]),"line-translate-anchor":new Me(Rn.paint_line["line-translate-anchor"]),"line-width":new bt(Rn.paint_line["line-width"]),"line-gap-width":new bt(Rn.paint_line["line-gap-width"]),"line-offset":new bt(Rn.paint_line["line-offset"]),"line-blur":new bt(Rn.paint_line["line-blur"]),"line-dasharray":new Lr(Rn.paint_line["line-dasharray"]),"line-pattern":new Ot(Rn.paint_line["line-pattern"]),"line-gradient":new Vr(Rn.paint_line["line-gradient"])}),Qw={paint:kS,layout:ES},fq=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.possiblyEvaluate=function(U,$){return $=new Un(Math.floor($.zoom),{now:$.now,fadeDuration:$.fadeDuration,zoomHistory:$.zoomHistory,transition:$.transition}),y.prototype.possiblyEvaluate.call(this,U,$)},_.prototype.evaluate=function(U,$,oe,he){return $=x({},$,{zoom:Math.floor($.zoom)}),y.prototype.evaluate.call(this,U,$,oe,he)},_}(bt),R=new fq(Qw.paint.properties["line-width"].specification);R.useIntegerZoom=!0;var A=function(y){function _(I){y.call(this,I,Qw),this.gradientVersion=0}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._handleSpecialPaintPropertyUpdate=function(U){if(U==="line-gradient"){var $=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=$._styleExpression.expression instanceof _u,this.gradientVersion=(this.gradientVersion+1)%d}},_.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},_.prototype.recalculate=function(U,$){y.prototype.recalculate.call(this,U,$),this.paint._values["line-floorwidth"]=R.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,U)},_.prototype.createBucket=function(U){return new sh(U)},_.prototype.queryRadius=function(U){var $=U,oe=F(Ad("line-width",this,$),Ad("line-gap-width",this,$)),he=Ad("line-offset",this,$);return oe/2+Math.abs(he)+Pv(this.paint.get("line-translate"))},_.prototype.queryIntersectsFeature=function(U,$,oe,he,De,it,yt){var Lt=Jv(U,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),it.angle,yt),sr=yt/2*F(this.paint.get("line-width").evaluate($,oe),this.paint.get("line-gap-width").evaluate($,oe)),gr=this.paint.get("line-offset").evaluate($,oe);return gr&&(he=W(he,gr*yt)),ou(Lt,he,sr)},_.prototype.isTileClipped=function(){return!0},_}(vi);function F(y,_){return _>0?_+2*y:y}function W(y,_){for(var I=[],U=new u(0,0),$=0;$":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};function ln(y){for(var _="",I=0;I>1,Lt=-7,sr=I?$-1:0,gr=I?-1:1,hr=y[_+sr];for(sr+=gr,oe=hr&(1<<-Lt)-1,hr>>=-Lt,Lt+=De;Lt>0;oe=oe*256+y[_+sr],sr+=gr,Lt-=8);for(he=oe&(1<<-Lt)-1,oe>>=-Lt,Lt+=U;Lt>0;he=he*256+y[_+sr],sr+=gr,Lt-=8);if(oe===0)oe=1-yt;else{if(oe===it)return he?NaN:(hr?-1:1)*(1/0);he=he+Math.pow(2,U),oe=oe-yt}return(hr?-1:1)*he*Math.pow(2,oe-U)},ro=function(y,_,I,U,$,oe){var he,De,it,yt=oe*8-$-1,Lt=(1<>1,gr=$===23?Math.pow(2,-24)-Math.pow(2,-77):0,hr=U?0:oe-1,Rr=U?1:-1,ni=_<0||_===0&&1/_<0?1:0;for(_=Math.abs(_),isNaN(_)||_===1/0?(De=isNaN(_)?1:0,he=Lt):(he=Math.floor(Math.log(_)/Math.LN2),_*(it=Math.pow(2,-he))<1&&(he--,it*=2),he+sr>=1?_+=gr/it:_+=gr*Math.pow(2,1-sr),_*it>=2&&(he++,it/=2),he+sr>=Lt?(De=0,he=Lt):he+sr>=1?(De=(_*it-1)*Math.pow(2,$),he=he+sr):(De=_*Math.pow(2,sr-1)*Math.pow(2,$),he=0));$>=8;y[I+hr]=De&255,hr+=Rr,De/=256,$-=8);for(he=he<<$|De,yt+=$;yt>0;y[I+hr]=he&255,hr+=Rr,he/=256,yt-=8);y[I+hr-Rr]|=ni*128},Vo={read:pa,write:ro},Xa=la;function la(y){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(y)?y:new Uint8Array(y||0),this.pos=0,this.type=0,this.length=this.buf.length}la.Varint=0,la.Fixed64=1,la.Bytes=2,la.Fixed32=5;var Mo=65536*65536,fo=1/Mo,lo=12,Wn=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");la.prototype={destroy:function(){this.buf=null},readFields:function(y,_,I){for(I=I||this.length;this.pos>3,oe=this.pos;this.type=U&7,y($,_,this),this.pos===oe&&this.skip(U)}return _},readMessage:function(y,_){return this.readFields(y,_,this.readVarint()+this.pos)},readFixed32:function(){var y=Yh(this.buf,this.pos);return this.pos+=4,y},readSFixed32:function(){var y=Fv(this.buf,this.pos);return this.pos+=4,y},readFixed64:function(){var y=Yh(this.buf,this.pos)+Yh(this.buf,this.pos+4)*Mo;return this.pos+=8,y},readSFixed64:function(){var y=Yh(this.buf,this.pos)+Fv(this.buf,this.pos+4)*Mo;return this.pos+=8,y},readFloat:function(){var y=Vo.read(this.buf,this.pos,!0,23,4);return this.pos+=4,y},readDouble:function(){var y=Vo.read(this.buf,this.pos,!0,52,8);return this.pos+=8,y},readVarint:function(y){var _=this.buf,I,U;return U=_[this.pos++],I=U&127,U<128||(U=_[this.pos++],I|=(U&127)<<7,U<128)||(U=_[this.pos++],I|=(U&127)<<14,U<128)||(U=_[this.pos++],I|=(U&127)<<21,U<128)?I:(U=_[this.pos],I|=(U&15)<<28,Ro(I,y,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var y=this.readVarint();return y%2===1?(y+1)/-2:y/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var y=this.readVarint()+this.pos,_=this.pos;return this.pos=y,y-_>=lo&&Wn?ru(this.buf,_,y):uv(this.buf,_,y)},readBytes:function(){var y=this.readVarint()+this.pos,_=this.buf.subarray(this.pos,y);return this.pos=y,_},readPackedVarint:function(y,_){if(this.type!==la.Bytes)return y.push(this.readVarint(_));var I=uo(this);for(y=y||[];this.pos127;);else if(_===la.Bytes)this.pos=this.readVarint()+this.pos;else if(_===la.Fixed32)this.pos+=4;else if(_===la.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+_)},writeTag:function(y,_){this.writeVarint(y<<3|_)},realloc:function(y){for(var _=this.length||16;_268435455||y<0){Ju(y,this);return}this.realloc(4),this.buf[this.pos++]=y&127|(y>127?128:0),!(y<=127)&&(this.buf[this.pos++]=(y>>>=7)&127|(y>127?128:0),!(y<=127)&&(this.buf[this.pos++]=(y>>>=7)&127|(y>127?128:0),!(y<=127)&&(this.buf[this.pos++]=y>>>7&127)))},writeSVarint:function(y){this.writeVarint(y<0?-y*2-1:y*2)},writeBoolean:function(y){this.writeVarint(!!y)},writeString:function(y){y=String(y),this.realloc(y.length*4),this.pos++;var _=this.pos;this.pos=pc(this.buf,y,this.pos);var I=this.pos-_;I>=128&&Qv(_,I,this),this.pos=_-1,this.writeVarint(I),this.pos+=I},writeFloat:function(y){this.realloc(4),Vo.write(this.buf,y,this.pos,!0,23,4),this.pos+=4},writeDouble:function(y){this.realloc(8),Vo.write(this.buf,y,this.pos,!0,52,8),this.pos+=8},writeBytes:function(y){var _=y.length;this.writeVarint(_),this.realloc(_);for(var I=0;I<_;I++)this.buf[this.pos++]=y[I]},writeRawMessage:function(y,_){this.pos++;var I=this.pos;y(_,this);var U=this.pos-I;U>=128&&Qv(I,U,this),this.pos=I-1,this.writeVarint(U),this.pos+=U},writeMessage:function(y,_,I){this.writeTag(y,la.Bytes),this.writeRawMessage(_,I)},writePackedVarint:function(y,_){_.length&&this.writeMessage(y,ud,_)},writePackedSVarint:function(y,_){_.length&&this.writeMessage(y,Ch,_)},writePackedBoolean:function(y,_){_.length&&this.writeMessage(y,jd,_)},writePackedFloat:function(y,_){_.length&&this.writeMessage(y,Gd,_)},writePackedDouble:function(y,_){_.length&&this.writeMessage(y,Hd,_)},writePackedFixed32:function(y,_){_.length&&this.writeMessage(y,Af,_)},writePackedSFixed32:function(y,_){_.length&&this.writeMessage(y,Lh,_)},writePackedFixed64:function(y,_){_.length&&this.writeMessage(y,Ed,_)},writePackedSFixed64:function(y,_){_.length&&this.writeMessage(y,cd,_)},writeBytesField:function(y,_){this.writeTag(y,la.Bytes),this.writeBytes(_)},writeFixed32Field:function(y,_){this.writeTag(y,la.Fixed32),this.writeFixed32(_)},writeSFixed32Field:function(y,_){this.writeTag(y,la.Fixed32),this.writeSFixed32(_)},writeFixed64Field:function(y,_){this.writeTag(y,la.Fixed64),this.writeFixed64(_)},writeSFixed64Field:function(y,_){this.writeTag(y,la.Fixed64),this.writeSFixed64(_)},writeVarintField:function(y,_){this.writeTag(y,la.Varint),this.writeVarint(_)},writeSVarintField:function(y,_){this.writeTag(y,la.Varint),this.writeSVarint(_)},writeStringField:function(y,_){this.writeTag(y,la.Bytes),this.writeString(_)},writeFloatField:function(y,_){this.writeTag(y,la.Fixed32),this.writeFloat(_)},writeDoubleField:function(y,_){this.writeTag(y,la.Fixed64),this.writeDouble(_)},writeBooleanField:function(y,_){this.writeVarintField(y,!!_)}};function Ro(y,_,I){var U=I.buf,$,oe;if(oe=U[I.pos++],$=(oe&112)>>4,oe<128||(oe=U[I.pos++],$|=(oe&127)<<3,oe<128)||(oe=U[I.pos++],$|=(oe&127)<<10,oe<128)||(oe=U[I.pos++],$|=(oe&127)<<17,oe<128)||(oe=U[I.pos++],$|=(oe&127)<<24,oe<128)||(oe=U[I.pos++],$|=(oe&1)<<31,oe<128))return $o(y,$,_);throw new Error("Expected varint not more than 10 bytes")}function uo(y){return y.type===la.Bytes?y.readVarint()+y.pos:y.pos+1}function $o(y,_,I){return I?_*4294967296+(y>>>0):(_>>>0)*4294967296+(y>>>0)}function Ju(y,_){var I,U;if(y>=0?(I=y%4294967296|0,U=y/4294967296|0):(I=~(-y%4294967296),U=~(-y/4294967296),I^4294967295?I=I+1|0:(I=0,U=U+1|0)),y>=18446744073709552e3||y<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");_.realloc(10),Ou(I,U,_),kh(U,_)}function Ou(y,_,I){I.buf[I.pos++]=y&127|128,y>>>=7,I.buf[I.pos++]=y&127|128,y>>>=7,I.buf[I.pos++]=y&127|128,y>>>=7,I.buf[I.pos++]=y&127|128,y>>>=7,I.buf[I.pos]=y&127}function kh(y,_){var I=(y&7)<<4;_.buf[_.pos++]|=I|((y>>>=3)?128:0),y&&(_.buf[_.pos++]=y&127|((y>>>=7)?128:0),y&&(_.buf[_.pos++]=y&127|((y>>>=7)?128:0),y&&(_.buf[_.pos++]=y&127|((y>>>=7)?128:0),y&&(_.buf[_.pos++]=y&127|((y>>>=7)?128:0),y&&(_.buf[_.pos++]=y&127)))))}function Qv(y,_,I){var U=_<=16383?1:_<=2097151?2:_<=268435455?3:Math.floor(Math.log(_)/(Math.LN2*7));I.realloc(U);for(var $=I.pos-1;$>=y;$--)I.buf[$+U]=I.buf[$]}function ud(y,_){for(var I=0;I>>8,y[I+2]=_>>>16,y[I+3]=_>>>24}function Fv(y,_){return(y[_]|y[_+1]<<8|y[_+2]<<16)+(y[_+3]<<24)}function uv(y,_,I){for(var U="",$=_;$239?4:oe>223?3:oe>191?2:1;if($+De>I)break;var it,yt,Lt;De===1?oe<128&&(he=oe):De===2?(it=y[$+1],(it&192)===128&&(he=(oe&31)<<6|it&63,he<=127&&(he=null))):De===3?(it=y[$+1],yt=y[$+2],(it&192)===128&&(yt&192)===128&&(he=(oe&15)<<12|(it&63)<<6|yt&63,(he<=2047||he>=55296&&he<=57343)&&(he=null))):De===4&&(it=y[$+1],yt=y[$+2],Lt=y[$+3],(it&192)===128&&(yt&192)===128&&(Lt&192)===128&&(he=(oe&15)<<18|(it&63)<<12|(yt&63)<<6|Lt&63,(he<=65535||he>=1114112)&&(he=null))),he===null?(he=65533,De=1):he>65535&&(he-=65536,U+=String.fromCharCode(he>>>10&1023|55296),he=56320|he&1023),U+=String.fromCharCode(he),$+=De}return U}function ru(y,_,I){return Wn.decode(y.subarray(_,I))}function pc(y,_,I){for(var U=0,$,oe;U<_.length;U++){if($=_.charCodeAt(U),$>55295&&$<57344)if(oe)if($<56320){y[I++]=239,y[I++]=191,y[I++]=189,oe=$;continue}else $=oe-55296<<10|$-56320|65536,oe=null;else{$>56319||U+1===_.length?(y[I++]=239,y[I++]=191,y[I++]=189):oe=$;continue}else oe&&(y[I++]=239,y[I++]=191,y[I++]=189,oe=null);$<128?y[I++]=$:($<2048?y[I++]=$>>6|192:($<65536?y[I++]=$>>12|224:(y[I++]=$>>18|240,y[I++]=$>>12&63|128),y[I++]=$>>6&63|128),y[I++]=$&63|128)}return I}var $u=3;function zv(y,_,I){y===1&&I.readMessage(hf,_)}function hf(y,_,I){if(y===3){var U=I.readMessage(O1,{}),$=U.id,oe=U.bitmap,he=U.width,De=U.height,it=U.left,yt=U.top,Lt=U.advance;_.push({id:$,bitmap:new Dv({width:he+2*$u,height:De+2*$u},oe),metrics:{width:he,height:De,left:it,top:yt,advance:Lt}})}}function O1(y,_,I){y===1?_.id=I.readVarint():y===2?_.bitmap=I.readBytes():y===3?_.width=I.readVarint():y===4?_.height=I.readVarint():y===5?_.left=I.readSVarint():y===6?_.top=I.readSVarint():y===7&&(_.advance=I.readVarint())}function p0(y){return new Xa(y).readFields(zv,[])}var Gp=$u;function ep(y){for(var _=0,I=0,U=0,$=y;U<$.length;U+=1){var oe=$[U];_+=oe.w*oe.h,I=Math.max(I,oe.w)}y.sort(function(Hi,wi){return wi.h-Hi.h});for(var he=Math.max(Math.ceil(Math.sqrt(_/.95)),I),De=[{x:0,y:0,w:he,h:1/0}],it=0,yt=0,Lt=0,sr=y;Lt=0;hr--){var Rr=De[hr];if(!(gr.w>Rr.w||gr.h>Rr.h)){if(gr.x=Rr.x,gr.y=Rr.y,yt=Math.max(yt,gr.y+gr.h),it=Math.max(it,gr.x+gr.w),gr.w===Rr.w&&gr.h===Rr.h){var ni=De.pop();hr=0&&$>=_&&m0[this.text.charCodeAt($)];$--)U--;this.text=this.text.substring(_,U),this.sectionIndex=this.sectionIndex.slice(_,U)},Kh.prototype.substring=function(_,I){var U=new Kh;return U.text=this.text.substring(_,I),U.sectionIndex=this.sectionIndex.slice(_,I),U.sections=this.sections,U},Kh.prototype.toString=function(){return this.text},Kh.prototype.getMaxScale=function(){var _=this;return this.sectionIndex.reduce(function(I,U){return Math.max(I,_.sections[U].scale)},0)},Kh.prototype.addTextSection=function(_,I){this.text+=_.text,this.sections.push(xy.forText(_.scale,_.fontStack||I));for(var U=this.sections.length-1,$=0;$<_.text.length;++$)this.sectionIndex.push(U)},Kh.prototype.addImageSection=function(_){var I=_.image?_.image.name:"";if(I.length===0){ie("Can't add FormattedSection with an empty image.");return}var U=this.getNextImageSectionCharCode();if(!U){ie("Reached maximum number of images "+(g0-e3+2));return}this.text+=String.fromCharCode(U),this.sections.push(xy.forImage(I)),this.sectionIndex.push(this.sections.length-1)},Kh.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=g0?null:++this.imageSectionID:(this.imageSectionID=e3,this.imageSectionID)};function hq(y,_){for(var I=[],U=y.text,$=0,oe=0,he=_;oe=0,Lt=0,sr=0;sr0&&ch>eo&&(eo=ch)}else{var Cl=I[Za.fontStack],yl=Cl&&Cl[to];if(yl&&yl.rect)jo=yl.rect,_s=yl.metrics;else{var Qu=_[Za.fontStack],gc=Qu&&Qu[to];if(!gc)continue;_s=gc.metrics}ao=(In-Za.scale)*Tn}kl?(y.verticalizable=!0,ha.push({glyph:to,imageName:El,x:gr,y:hr+ao,vertical:kl,scale:Za.scale,fontStack:Za.fontStack,sectionIndex:Jo,metrics:_s,rect:jo}),gr+=Iu*Za.scale+yt):(ha.push({glyph:to,imageName:El,x:gr,y:hr+ao,vertical:kl,scale:Za.scale,fontStack:Za.fontStack,sectionIndex:Jo,metrics:_s,rect:jo}),gr+=_s.advance*Za.scale+yt)}if(ha.length!==0){var Xd=gr-yt;Rr=Math.max(Xd,Rr),gq(ha,0,ha.length-1,Hi,eo)}gr=0;var Zd=oe*In+eo;ga.lineOffset=Math.max(eo,Xn),hr+=Zd,ni=Math.max(Zd,ni),++wi}var Qh=hr-B1,hv=LS(he),dv=hv.horizontalAlign,Ph=hv.verticalAlign;kd(y.positionedLines,Hi,dv,Ph,Rr,ni,oe,Qh,$.length),y.top+=-Ph*Qh,y.bottom=y.top+Qh,y.left+=-dv*Rr,y.right=y.left+Rr}function gq(y,_,I,U,$){if(!(!U&&!$))for(var oe=y[I],he=oe.metrics.advance*oe.scale,De=(y[I].x+he)*U,it=_;it<=I;it++)y[it].x-=De,y[it].y+=$}function kd(y,_,I,U,$,oe,he,De,it){var yt=(_-I)*$,Lt=0;oe!==he?Lt=-De*U-B1:Lt=(-U*it+.5)*he;for(var sr=0,gr=y;sr-I/2;){if(he--,he<0)return!1;De-=y[he].dist(oe),oe=y[he]}De+=y[he].dist(y[he+1]),he++;for(var it=[],yt=0;DeU;)yt-=it.shift().angleDelta;if(yt>$)return!1;he++,De+=sr.dist(gr)}return!0}function GQ(y){for(var _=0,I=0;Iyt){var Rr=(yt-it)/hr,ni=nl(sr.x,gr.x,Rr),Hi=nl(sr.y,gr.y,Rr),wi=new Wd(ni,Hi,gr.angleTo(sr),Lt);return wi._round(),!he||VQ(y,wi,De,he,_)?wi:void 0}it+=hr}}function Bet(y,_,I,U,$,oe,he,De,it){var yt=HQ(U,oe,he),Lt=jQ(U,$),sr=Lt*he,gr=y[0].x===0||y[0].x===it||y[0].y===0||y[0].y===it;_-sr<_/4&&(_=sr+_/4);var hr=oe*2,Rr=gr?_/2*De%_:(Lt/2+hr)*he*De%_;return WQ(y,Rr,_,yt,I,sr,gr,!1,it)}function WQ(y,_,I,U,$,oe,he,De,it){for(var yt=oe/2,Lt=GQ(y),sr=0,gr=_-I,hr=[],Rr=0;Rr=0&&xn=0&&In=0&&gr+yt<=Lt){var Xn=new Wd(xn,In,bn,Rr);Xn._round(),(!U||VQ(y,Xn,oe,U,$))&&hr.push(Xn)}}sr+=wi}return!De&&!hr.length&&!he&&(hr=WQ(y,sr/2,I,U,$,oe,he,!0,it)),hr}function XQ(y,_,I,U,$){for(var oe=[],he=0;he=U&&sr.x>=U)&&(Lt.x>=U?Lt=new u(U,Lt.y+(sr.y-Lt.y)*((U-Lt.x)/(sr.x-Lt.x)))._round():sr.x>=U&&(sr=new u(U,Lt.y+(sr.y-Lt.y)*((U-Lt.x)/(sr.x-Lt.x)))._round()),!(Lt.y>=$&&sr.y>=$)&&(Lt.y>=$?Lt=new u(Lt.x+(sr.x-Lt.x)*(($-Lt.y)/(sr.y-Lt.y)),$)._round():sr.y>=$&&(sr=new u(Lt.x+(sr.x-Lt.x)*(($-Lt.y)/(sr.y-Lt.y)),$)._round()),(!it||!Lt.equals(it[it.length-1]))&&(it=[Lt],oe.push(it)),it.push(sr)))))}return oe}var i3=Gc;function ZQ(y,_,I,U){var $=[],oe=y.image,he=oe.pixelRatio,De=oe.paddedRect.w-2*i3,it=oe.paddedRect.h-2*i3,yt=y.right-y.left,Lt=y.bottom-y.top,sr=oe.stretchX||[[0,De]],gr=oe.stretchY||[[0,it]],hr=function(Cl,yl){return Cl+yl[1]-yl[0]},Rr=sr.reduce(hr,0),ni=gr.reduce(hr,0),Hi=De-Rr,wi=it-ni,bn=0,rn=Rr,xn=0,In=ni,Xn=0,ga=Hi,ha=0,eo=wi;if(oe.content&&U){var za=oe.content;bn=a6(sr,0,za[0]),xn=a6(gr,0,za[1]),rn=a6(sr,za[0],za[2]),In=a6(gr,za[1],za[3]),Xn=za[0]-bn,ha=za[1]-xn,ga=za[2]-za[0]-rn,eo=za[3]-za[1]-In}var Za=function(Cl,yl,Qu,gc){var Sf=o6(Cl.stretch-bn,rn,yt,y.left),Ff=s6(Cl.fixed-Xn,ga,Cl.stretch,Rr),$h=o6(yl.stretch-xn,In,Lt,y.top),ch=s6(yl.fixed-ha,eo,yl.stretch,ni),Xd=o6(Qu.stretch-bn,rn,yt,y.left),Zd=s6(Qu.fixed-Xn,ga,Qu.stretch,Rr),Qh=o6(gc.stretch-xn,In,Lt,y.top),hv=s6(gc.fixed-ha,eo,gc.stretch,ni),dv=new u(Sf,$h),Ph=new u(Xd,$h),vv=new u(Xd,Qh),bp=new u(Sf,Qh),Ty=new u(Ff/he,ch/he),V1=new u(Zd/he,hv/he),G1=_*Math.PI/180;if(G1){var H1=Math.sin(G1),f3=Math.cos(G1),y0=[f3,-H1,H1,f3];dv._matMult(y0),Ph._matMult(y0),bp._matMult(y0),vv._matMult(y0)}var d6=Cl.stretch+Cl.fixed,Aq=Qu.stretch+Qu.fixed,v6=yl.stretch+yl.fixed,Sq=gc.stretch+gc.fixed,Hp={x:oe.paddedRect.x+i3+d6,y:oe.paddedRect.y+i3+v6,w:Aq-d6,h:Sq-v6},h3=ga/he/yt,p6=eo/he/Lt;return{tl:dv,tr:Ph,bl:bp,br:vv,tex:Hp,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Ty,pixelOffsetBR:V1,minFontScaleX:h3,minFontScaleY:p6,isSDF:I}};if(!U||!oe.stretchX&&!oe.stretchY)$.push(Za({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:De+1},{fixed:0,stretch:it+1}));else for(var Jo=YQ(sr,Hi,Rr),to=YQ(gr,wi,ni),ao=0;ao0&&(Rr=Math.max(10,Rr),this.circleDiameter=Rr)}else{var ni=he.top*De-it,Hi=he.bottom*De+it,wi=he.left*De-it,bn=he.right*De+it,rn=he.collisionPadding;if(rn&&(wi-=rn[0]*De,ni-=rn[1]*De,bn+=rn[2]*De,Hi+=rn[3]*De),Lt){var xn=new u(wi,ni),In=new u(bn,ni),Xn=new u(wi,Hi),ga=new u(bn,Hi),ha=Lt*Math.PI/180;xn._rotate(ha),In._rotate(ha),Xn._rotate(ha),ga._rotate(ha),wi=Math.min(xn.x,In.x,Xn.x,ga.x),bn=Math.max(xn.x,In.x,Xn.x,ga.x),ni=Math.min(xn.y,In.y,Xn.y,ga.y),Hi=Math.max(xn.y,In.y,Xn.y,ga.y)}_.emplaceBack(I.x,I.y,wi,ni,bn,Hi,U,$,oe)}this.boxEndIndex=_.length},n3=function(_,I){if(_===void 0&&(_=[]),I===void 0&&(I=Uet),this.data=_,this.length=this.data.length,this.compare=I,this.length>0)for(var U=(this.length>>1)-1;U>=0;U--)this._down(U)};n3.prototype.push=function(_){this.data.push(_),this.length++,this._up(this.length-1)},n3.prototype.pop=function(){if(this.length!==0){var _=this.data[0],I=this.data.pop();return this.length--,this.length>0&&(this.data[0]=I,this._down(0)),_}},n3.prototype.peek=function(){return this.data[0]},n3.prototype._up=function(_){for(var I=this,U=I.data,$=I.compare,oe=U[_];_>0;){var he=_-1>>1,De=U[he];if($(oe,De)>=0)break;U[_]=De,_=he}U[_]=oe},n3.prototype._down=function(_){for(var I=this,U=I.data,$=I.compare,oe=this.length>>1,he=U[_];_=0)break;U[_]=it,_=De}U[_]=he};function Uet(y,_){return y<_?-1:y>_?1:0}function Vet(y,_,I){_===void 0&&(_=1),I===void 0&&(I=!1);for(var U=1/0,$=1/0,oe=-1/0,he=-1/0,De=y[0],it=0;itoe)&&(oe=yt.x),(!it||yt.y>he)&&(he=yt.y)}var Lt=oe-U,sr=he-$,gr=Math.min(Lt,sr),hr=gr/2,Rr=new n3([],Get);if(gr===0)return new u(U,$);for(var ni=U;niwi.d||!wi.d)&&(wi=rn,I&&console.log("found best %d after %d probes",Math.round(1e4*rn.d)/1e4,bn)),!(rn.max-wi.d<=_)&&(hr=rn.h/2,Rr.push(new a3(rn.p.x-hr,rn.p.y-hr,hr,y)),Rr.push(new a3(rn.p.x+hr,rn.p.y-hr,hr,y)),Rr.push(new a3(rn.p.x-hr,rn.p.y+hr,hr,y)),Rr.push(new a3(rn.p.x+hr,rn.p.y+hr,hr,y)),bn+=4)}return I&&(console.log("num probes: "+bn),console.log("best distance: "+wi.d)),wi.p}function Get(y,_){return _.max-y.max}function a3(y,_,I,U){this.p=new u(y,_),this.h=I,this.d=Het(this.p,U),this.max=this.d+this.h*Math.SQRT2}function Het(y,_){for(var I=!1,U=1/0,$=0;$<_.length;$++)for(var oe=_[$],he=0,De=oe.length,it=De-1;hey.y!=Lt.y>y.y&&y.x<(Lt.x-yt.x)*(y.y-yt.y)/(Lt.y-yt.y)+yt.x&&(I=!I),U=Math.min(U,hg(y,yt,Lt))}return(I?1:-1)*Math.sqrt(U)}function jet(y){for(var _=0,I=0,U=0,$=y[0],oe=0,he=$.length,De=he-1;oe=Ei||y0.y<0||y0.y>=Ei||Zet(y,y0,f3,I,U,$,to,y.layers[0],y.collisionBoxArray,_.index,_.sourceLayerIndex,y.index,wi,In,ha,it,rn,Xn,eo,hr,_,oe,yt,Lt,he)};if(za==="line")for(var _s=0,jo=XQ(_.geometry,0,0,Ei,Ei);_s1){var $h=Oet(Ff,ga,I.vertical||Rr,U,ni,bn);$h&&ao(Ff,$h)}}else if(_.type==="Polygon")for(var ch=0,Xd=Zw(_.geometry,0);chN1&&ie(y.layerIds[0]+': Value for "text-size" is >= '+PS+'. Reduce your "text-size".')):Hi.kind==="composite"&&(wi=[Cd*hr.compositeTextSizes[0].evaluate(he,{},Rr),Cd*hr.compositeTextSizes[1].evaluate(he,{},Rr)],(wi[0]>N1||wi[1]>N1)&&ie(y.layerIds[0]+': Value for "text-size" is >= '+PS+'. Reduce your "text-size".')),y.addSymbols(y.text,ni,wi,De,oe,he,yt,_,it.lineStartIndex,it.lineLength,gr,Rr);for(var bn=0,rn=Lt;bnN1&&ie(y.layerIds[0]+': Value for "icon-size" is >= '+PS+'. Reduce your "icon-size".')):dv.kind==="composite"&&(Ph=[Cd*In.compositeIconSizes[0].evaluate(xn,{},ga),Cd*In.compositeIconSizes[1].evaluate(xn,{},ga)],(Ph[0]>N1||Ph[1]>N1)&&ie(y.layerIds[0]+': Value for "icon-size" is >= '+PS+'. Reduce your "icon-size".')),y.addSymbols(y.icon,Qh,Ph,rn,bn,xn,!1,_,za.lineStartIndex,za.lineLength,-1,ga),kl=y.icon.placedSymbolArray.length-1,hv&&(jo=hv.length*4,y.addSymbols(y.icon,hv,Ph,rn,bn,xn,cv.vertical,_,za.lineStartIndex,za.lineLength,-1,ga),Cl=y.icon.placedSymbolArray.length-1)}for(var vv in U.horizontal){var bp=U.horizontal[vv];if(!Za){Qu=K(bp.text);var Ty=De.layout.get("text-rotate").evaluate(xn,{},ga);Za=new l6(it,_,yt,Lt,sr,bp,gr,hr,Rr,Ty)}var V1=bp.positionedLines.length===1;if(El+=JQ(y,_,bp,oe,De,Rr,xn,ni,za,U.vertical?cv.horizontal:cv.horizontalOnly,V1?Object.keys(U.horizontal):[vv],yl,kl,In,ga),V1)break}U.vertical&&(Iu+=JQ(y,_,U.vertical,oe,De,Rr,xn,ni,za,cv.vertical,["vertical"],yl,Cl,In,ga));var G1=Za?Za.boxStartIndex:y.collisionBoxArray.length,H1=Za?Za.boxEndIndex:y.collisionBoxArray.length,f3=to?to.boxStartIndex:y.collisionBoxArray.length,y0=to?to.boxEndIndex:y.collisionBoxArray.length,d6=Jo?Jo.boxStartIndex:y.collisionBoxArray.length,Aq=Jo?Jo.boxEndIndex:y.collisionBoxArray.length,v6=ao?ao.boxStartIndex:y.collisionBoxArray.length,Sq=ao?ao.boxEndIndex:y.collisionBoxArray.length,Hp=-1,h3=function(DS,vee){return DS&&DS.circleDiameter?Math.max(DS.circleDiameter,vee):vee};Hp=h3(Za,Hp),Hp=h3(to,Hp),Hp=h3(Jo,Hp),Hp=h3(ao,Hp);var p6=Hp>-1?1:0;p6&&(Hp*=ha/Tn),y.glyphOffsetArray.length>=Pu.MAX_GLYPHS&&ie("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),xn.sortKey!==void 0&&y.addToSortKeyRanges(y.symbolInstances.length,xn.sortKey),y.symbolInstances.emplaceBack(_.x,_.y,yl.right>=0?yl.right:-1,yl.center>=0?yl.center:-1,yl.left>=0?yl.left:-1,yl.vertical||-1,kl,Cl,Qu,G1,H1,f3,y0,d6,Aq,v6,Sq,yt,El,Iu,_s,jo,p6,0,gr,gc,Sf,Hp)}function Yet(y,_,I,U){var $=y.compareText;if(!(_ in $))$[_]=[];else for(var oe=$[_],he=oe.length-1;he>=0;he--)if(U.dist(oe[he])0)&&(he.value.kind!=="constant"||he.value.value.length>0),Lt=it.value.kind!=="constant"||!!it.value.value||Object.keys(it.parameters).length>0,sr=oe.get("symbol-sort-key");if(this.features=[],!(!yt&&!Lt)){for(var gr=I.iconDependencies,hr=I.glyphDependencies,Rr=I.availableImages,ni=new Un(this.zoom),Hi=0,wi=_;Hi=0;for(var Iu=0,kl=eo.sections;Iu=0;it--)he[it]={x:I[it].x,y:I[it].y,tileUnitDistanceFromAnchor:oe},it>0&&(oe+=I[it-1].dist(I[it]));for(var yt=0;yt0},Pu.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Pu.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Pu.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Pu.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Pu.prototype.addIndicesForPlacedSymbol=function(_,I){for(var U=_.placedSymbolArray.get(I),$=U.vertexStartIndex+U.numGlyphs*4,oe=U.vertexStartIndex;oe<$;oe+=4)_.indexArray.emplaceBack(oe,oe+1,oe+2),_.indexArray.emplaceBack(oe+1,oe+2,oe+3)},Pu.prototype.getSortedSymbolIndexes=function(_){if(this.sortedAngle===_&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var I=Math.sin(_),U=Math.cos(_),$=[],oe=[],he=[],De=0;De1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(_),this.sortedAngle=_,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var U=0,$=this.symbolInstanceIndexes;U<$.length;U+=1){var oe=$[U],he=this.symbolInstances.get(oe);this.featureSortOrder.push(he.featureIndex),[he.rightJustifiedTextSymbolIndex,he.centerJustifiedTextSymbolIndex,he.leftJustifiedTextSymbolIndex].forEach(function(De,it,yt){De>=0&&yt.indexOf(De)===it&&I.addIndicesForPlacedSymbol(I.text,De)}),he.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,he.verticalPlacedTextSymbolIndex),he.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,he.placedIconSymbolIndex),he.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,he.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},X("SymbolBucket",Pu,{omit:["layers","collisionBoxArray","features","compareText"]}),Pu.MAX_GLYPHS=65535,Pu.addDynamicAttributes=_q;function Qet(y,_){return _.replace(/{([^{}]+)}/g,function(I,U){return U in y?String(y[U]):""})}var ett=new Or({"symbol-placement":new Me(Rn.layout_symbol["symbol-placement"]),"symbol-spacing":new Me(Rn.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Me(Rn.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new bt(Rn.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Me(Rn.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Me(Rn.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Me(Rn.layout_symbol["icon-ignore-placement"]),"icon-optional":new Me(Rn.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Me(Rn.layout_symbol["icon-rotation-alignment"]),"icon-size":new bt(Rn.layout_symbol["icon-size"]),"icon-text-fit":new Me(Rn.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Me(Rn.layout_symbol["icon-text-fit-padding"]),"icon-image":new bt(Rn.layout_symbol["icon-image"]),"icon-rotate":new bt(Rn.layout_symbol["icon-rotate"]),"icon-padding":new Me(Rn.layout_symbol["icon-padding"]),"icon-keep-upright":new Me(Rn.layout_symbol["icon-keep-upright"]),"icon-offset":new bt(Rn.layout_symbol["icon-offset"]),"icon-anchor":new bt(Rn.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Me(Rn.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Me(Rn.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Me(Rn.layout_symbol["text-rotation-alignment"]),"text-field":new bt(Rn.layout_symbol["text-field"]),"text-font":new bt(Rn.layout_symbol["text-font"]),"text-size":new bt(Rn.layout_symbol["text-size"]),"text-max-width":new bt(Rn.layout_symbol["text-max-width"]),"text-line-height":new Me(Rn.layout_symbol["text-line-height"]),"text-letter-spacing":new bt(Rn.layout_symbol["text-letter-spacing"]),"text-justify":new bt(Rn.layout_symbol["text-justify"]),"text-radial-offset":new bt(Rn.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Me(Rn.layout_symbol["text-variable-anchor"]),"text-anchor":new bt(Rn.layout_symbol["text-anchor"]),"text-max-angle":new Me(Rn.layout_symbol["text-max-angle"]),"text-writing-mode":new Me(Rn.layout_symbol["text-writing-mode"]),"text-rotate":new bt(Rn.layout_symbol["text-rotate"]),"text-padding":new Me(Rn.layout_symbol["text-padding"]),"text-keep-upright":new Me(Rn.layout_symbol["text-keep-upright"]),"text-transform":new bt(Rn.layout_symbol["text-transform"]),"text-offset":new bt(Rn.layout_symbol["text-offset"]),"text-allow-overlap":new Me(Rn.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Me(Rn.layout_symbol["text-ignore-placement"]),"text-optional":new Me(Rn.layout_symbol["text-optional"])}),ttt=new Or({"icon-opacity":new bt(Rn.paint_symbol["icon-opacity"]),"icon-color":new bt(Rn.paint_symbol["icon-color"]),"icon-halo-color":new bt(Rn.paint_symbol["icon-halo-color"]),"icon-halo-width":new bt(Rn.paint_symbol["icon-halo-width"]),"icon-halo-blur":new bt(Rn.paint_symbol["icon-halo-blur"]),"icon-translate":new Me(Rn.paint_symbol["icon-translate"]),"icon-translate-anchor":new Me(Rn.paint_symbol["icon-translate-anchor"]),"text-opacity":new bt(Rn.paint_symbol["text-opacity"]),"text-color":new bt(Rn.paint_symbol["text-color"],{runtimeType:Ol,getOverride:function(y){return y.textColor},hasOverride:function(y){return!!y.textColor}}),"text-halo-color":new bt(Rn.paint_symbol["text-halo-color"]),"text-halo-width":new bt(Rn.paint_symbol["text-halo-width"]),"text-halo-blur":new bt(Rn.paint_symbol["text-halo-blur"]),"text-translate":new Me(Rn.paint_symbol["text-translate"]),"text-translate-anchor":new Me(Rn.paint_symbol["text-translate-anchor"])}),xq={paint:ttt,layout:ett},l3=function(_){this.type=_.property.overrides?_.property.overrides.runtimeType:ac,this.defaultValue=_};l3.prototype.evaluate=function(_){if(_.formattedSection){var I=this.defaultValue.property.overrides;if(I&&I.hasOverride(_.formattedSection))return I.getOverride(_.formattedSection)}return _.feature&&_.featureState?this.defaultValue.evaluate(_.feature,_.featureState):this.defaultValue.property.specification.default},l3.prototype.eachChild=function(_){if(!this.defaultValue.isConstant()){var I=this.defaultValue.value;_(I._styleExpression.expression)}},l3.prototype.outputDefined=function(){return!1},l3.prototype.serialize=function(){return null},X("FormatSectionOverride",l3,{omit:["defaultValue"]});var rtt=function(y){function _(I){y.call(this,I,xq)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.recalculate=function(U,$){if(y.prototype.recalculate.call(this,U,$),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 oe=this.layout.get("text-writing-mode");if(oe){for(var he=[],De=0,it=oe;De",targetMapId:$,sourceMapId:he.mapId})}}},u3.prototype.receive=function(_){var I=_.data,U=I.id;if(U&&!(I.targetMapId&&this.mapId!==I.targetMapId))if(I.type===""){delete this.tasks[U];var $=this.cancelCallbacks[U];delete this.cancelCallbacks[U],$&&$()}else Ce()||I.mustQueue?(this.tasks[U]=I,this.taskQueue.push(U),this.invoker.trigger()):this.processTask(U,I)},u3.prototype.process=function(){if(this.taskQueue.length){var _=this.taskQueue.shift(),I=this.tasks[_];delete this.tasks[_],this.taskQueue.length&&this.invoker.trigger(),I&&this.processTask(_,I)}},u3.prototype.processTask=function(_,I){var U=this;if(I.type===""){var $=this.callbacks[_];delete this.callbacks[_],$&&(I.error?$(Ye(I.error)):$(null,Ye(I.data)))}else{var oe=!1,he=Se(this.globalScope)?void 0:[],De=I.hasCallback?function(gr,hr){oe=!0,delete U.cancelCallbacks[_],U.target.postMessage({id:_,type:"",sourceMapId:U.mapId,error:gr?Ve(gr):null,data:Ve(hr,he)},he)}:function(gr){oe=!0},it=null,yt=Ye(I.data);if(this.parent[I.type])it=this.parent[I.type](I.sourceMapId,yt,De);else if(this.parent.getWorkerSource){var Lt=I.type.split("."),sr=this.parent.getWorkerSource(I.sourceMapId,Lt[0],yt.source);it=sr[Lt[1]](yt,De)}else De(new Error("Could not find function "+I.type));!oe&&it&&it.cancel&&(this.cancelCallbacks[_]=it.cancel)}},u3.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function dtt(y,_,I){_=Math.pow(2,I)-_-1;var U=iee(y*256,_*256,I),$=iee((y+1)*256,(_+1)*256,I);return U[0]+","+U[1]+","+$[0]+","+$[1]}function iee(y,_,I){var U=2*Math.PI*6378137/256/Math.pow(2,I),$=y*U-2*Math.PI*6378137/2,oe=_*U-2*Math.PI*6378137/2;return[$,oe]}var lh=function(_,I){_&&(I?this.setSouthWest(_).setNorthEast(I):_.length===4?this.setSouthWest([_[0],_[1]]).setNorthEast([_[2],_[3]]):this.setSouthWest(_[0]).setNorthEast(_[1]))};lh.prototype.setNorthEast=function(_){return this._ne=_ instanceof Hc?new Hc(_.lng,_.lat):Hc.convert(_),this},lh.prototype.setSouthWest=function(_){return this._sw=_ instanceof Hc?new Hc(_.lng,_.lat):Hc.convert(_),this},lh.prototype.extend=function(_){var I=this._sw,U=this._ne,$,oe;if(_ instanceof Hc)$=_,oe=_;else if(_ instanceof lh){if($=_._sw,oe=_._ne,!$||!oe)return this}else{if(Array.isArray(_))if(_.length===4||_.every(Array.isArray)){var he=_;return this.extend(lh.convert(he))}else{var De=_;return this.extend(Hc.convert(De))}return this}return!I&&!U?(this._sw=new Hc($.lng,$.lat),this._ne=new Hc(oe.lng,oe.lat)):(I.lng=Math.min($.lng,I.lng),I.lat=Math.min($.lat,I.lat),U.lng=Math.max(oe.lng,U.lng),U.lat=Math.max(oe.lat,U.lat)),this},lh.prototype.getCenter=function(){return new Hc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},lh.prototype.getSouthWest=function(){return this._sw},lh.prototype.getNorthEast=function(){return this._ne},lh.prototype.getNorthWest=function(){return new Hc(this.getWest(),this.getNorth())},lh.prototype.getSouthEast=function(){return new Hc(this.getEast(),this.getSouth())},lh.prototype.getWest=function(){return this._sw.lng},lh.prototype.getSouth=function(){return this._sw.lat},lh.prototype.getEast=function(){return this._ne.lng},lh.prototype.getNorth=function(){return this._ne.lat},lh.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},lh.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},lh.prototype.isEmpty=function(){return!(this._sw&&this._ne)},lh.prototype.contains=function(_){var I=Hc.convert(_),U=I.lng,$=I.lat,oe=this._sw.lat<=$&&$<=this._ne.lat,he=this._sw.lng<=U&&U<=this._ne.lng;return this._sw.lng>this._ne.lng&&(he=this._sw.lng>=U&&U>=this._ne.lng),oe&&he},lh.convert=function(_){return!_||_ instanceof lh?_:new lh(_)};var nee=63710088e-1,Hc=function(_,I){if(isNaN(_)||isNaN(I))throw new Error("Invalid LngLat object: ("+_+", "+I+")");if(this.lng=+_,this.lat=+I,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Hc.prototype.wrap=function(){return new Hc(k(this.lng,-180,180),this.lat)},Hc.prototype.toArray=function(){return[this.lng,this.lat]},Hc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Hc.prototype.distanceTo=function(_){var I=Math.PI/180,U=this.lat*I,$=_.lat*I,oe=Math.sin(U)*Math.sin($)+Math.cos(U)*Math.cos($)*Math.cos((_.lng-this.lng)*I),he=nee*Math.acos(Math.min(oe,1));return he},Hc.prototype.toBounds=function(_){_===void 0&&(_=0);var I=40075017,U=360*_/I,$=U/Math.cos(Math.PI/180*this.lat);return new lh(new Hc(this.lng-$,this.lat-U),new Hc(this.lng+$,this.lat+U))},Hc.convert=function(_){if(_ instanceof Hc)return _;if(Array.isArray(_)&&(_.length===2||_.length===3))return new Hc(Number(_[0]),Number(_[1]));if(!Array.isArray(_)&&typeof _=="object"&&_!==null)return new Hc(Number("lng"in _?_.lng:_.lon),Number(_.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 aee=2*Math.PI*nee;function oee(y){return aee*Math.cos(y*Math.PI/180)}function see(y){return(180+y)/360}function lee(y){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+y*Math.PI/360)))/360}function uee(y,_){return y/oee(_)}function vtt(y){return y*360-180}function wq(y){var _=180-y*360;return 360/Math.PI*Math.atan(Math.exp(_*Math.PI/180))-90}function ptt(y,_){return y*oee(wq(_))}function gtt(y){return 1/Math.cos(y*Math.PI/180)}var vb=function(_,I,U){U===void 0&&(U=0),this.x=+_,this.y=+I,this.z=+U};vb.fromLngLat=function(_,I){I===void 0&&(I=0);var U=Hc.convert(_);return new vb(see(U.lng),lee(U.lat),uee(I,U.lat))},vb.prototype.toLngLat=function(){return new Hc(vtt(this.x),wq(this.y))},vb.prototype.toAltitude=function(){return ptt(this.z,this.y)},vb.prototype.meterInMercatorCoordinateUnits=function(){return 1/aee*gtt(wq(this.y))};var pb=function(_,I,U){this.z=_,this.x=I,this.y=U,this.key=RS(0,_,_,I,U)};pb.prototype.equals=function(_){return this.z===_.z&&this.x===_.x&&this.y===_.y},pb.prototype.url=function(_,I){var U=dtt(this.x,this.y,this.z),$=mtt(this.z,this.x,this.y);return _[(this.x+this.y)%_.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(I==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",$).replace("{bbox-epsg-3857}",U)},pb.prototype.getTilePoint=function(_){var I=Math.pow(2,this.z);return new u((_.x*I-this.x)*Ei,(_.y*I-this.y)*Ei)},pb.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var cee=function(_,I){this.wrap=_,this.canonical=I,this.key=RS(_,I.z,I.z,I.x,I.y)},uh=function(_,I,U,$,oe){this.overscaledZ=_,this.wrap=I,this.canonical=new pb(U,+$,+oe),this.key=RS(I,_,U,$,oe)};uh.prototype.equals=function(_){return this.overscaledZ===_.overscaledZ&&this.wrap===_.wrap&&this.canonical.equals(_.canonical)},uh.prototype.scaledTo=function(_){var I=this.canonical.z-_;return _>this.canonical.z?new uh(_,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new uh(_,this.wrap,_,this.canonical.x>>I,this.canonical.y>>I)},uh.prototype.calculateScaledKey=function(_,I){var U=this.canonical.z-_;return _>this.canonical.z?RS(this.wrap*+I,_,this.canonical.z,this.canonical.x,this.canonical.y):RS(this.wrap*+I,_,_,this.canonical.x>>U,this.canonical.y>>U)},uh.prototype.isChildOf=function(_){if(_.wrap!==this.wrap)return!1;var I=this.canonical.z-_.canonical.z;return _.overscaledZ===0||_.overscaledZ>I&&_.canonical.y===this.canonical.y>>I},uh.prototype.children=function(_){if(this.overscaledZ>=_)return[new uh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var I=this.canonical.z+1,U=this.canonical.x*2,$=this.canonical.y*2;return[new uh(I,this.wrap,I,U,$),new uh(I,this.wrap,I,U+1,$),new uh(I,this.wrap,I,U,$+1),new uh(I,this.wrap,I,U+1,$+1)]},uh.prototype.isLessThan=function(_){return this.wrap<_.wrap?!0:this.wrap>_.wrap?!1:this.overscaledZ<_.overscaledZ?!0:this.overscaledZ>_.overscaledZ?!1:this.canonical.x<_.canonical.x?!0:this.canonical.x>_.canonical.x?!1:this.canonical.y<_.canonical.y},uh.prototype.wrapped=function(){return new uh(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},uh.prototype.unwrapTo=function(_){return new uh(this.overscaledZ,_,this.canonical.z,this.canonical.x,this.canonical.y)},uh.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},uh.prototype.toUnwrapped=function(){return new cee(this.wrap,this.canonical)},uh.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},uh.prototype.getTilePoint=function(_){return this.canonical.getTilePoint(new vb(_.x-this.wrap,_.y))};function RS(y,_,I,U,$){y*=2,y<0&&(y=y*-1-1);var oe=1<0;oe--)$=1<=this.dim+1||I<-1||I>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(I+1)*this.stride+(_+1)},by.prototype._unpackMapbox=function(_,I,U){return(_*256*256+I*256+U)/10-1e4},by.prototype._unpackTerrarium=function(_,I,U){return _*256+I+U/256-32768},by.prototype.getPixels=function(){return new Eh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},by.prototype.backfillBorder=function(_,I,U){if(this.dim!==_.dim)throw new Error("dem dimension mismatch");var $=I*this.dim,oe=I*this.dim+this.dim,he=U*this.dim,De=U*this.dim+this.dim;switch(I){case-1:$=oe-1;break;case 1:oe=$+1;break}switch(U){case-1:he=De-1;break;case 1:De=he+1;break}for(var it=-I*this.dim,yt=-U*this.dim,Lt=he;Lt=0&&sr[3]>=0&&it.insert(De,sr[0],sr[1],sr[2],sr[3])}},wy.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new mg.VectorTile(new Xa(this.rawTileData)).layers,this.sourceLayerCoder=new f6(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},wy.prototype.query=function(_,I,U,$){var oe=this;this.loadVTLayers();for(var he=_.params||{},De=Ei/_.tileSize/_.scale,it=xe(he.filter),yt=_.queryGeometry,Lt=_.queryPadding*De,sr=hee(yt),gr=this.grid.query(sr.minX-Lt,sr.minY-Lt,sr.maxX+Lt,sr.maxY+Lt),hr=hee(_.cameraQueryGeometry),Rr=this.grid3D.query(hr.minX-Lt,hr.minY-Lt,hr.maxX+Lt,hr.maxY+Lt,function(Xn,ga,ha,eo){return mp(_.cameraQueryGeometry,Xn-Lt,ga-Lt,ha+Lt,eo+Lt)}),ni=0,Hi=Rr;ni$)oe=!1;else if(!I)oe=!0;else if(this.expirationTime=Ha.maxzoom)&&Ha.visibility!=="none"){h(jn,this.zoom,ir);var vo=Zi[Ha.id]=Ha.createBucket({index:Ri.bucketLayerIDs.length,layers:jn,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ba,sourceID:this.source});vo.populate(ua,en,this.tileID.canonical),Ri.bucketLayerIDs.push(jn.map(function(ki){return ki.id}))}}}}var Gn,Ct,Sr,Jr,hi=i.mapObject(en.glyphDependencies,function(ki){return Object.keys(ki).map(Number)});Object.keys(hi).length?wr.send("getGlyphs",{uid:this.uid,stacks:hi},function(ki,_n){Gn||(Gn=ki,Ct=_n,En.call(ti))}):Ct={};var hn=Object.keys(en.iconDependencies);hn.length?wr.send("getImages",{icons:hn,source:this.source,tileID:this.tileID,type:"icons"},function(ki,_n){Gn||(Gn=ki,Sr=_n,En.call(ti))}):Sr={};var Sn=Object.keys(en.patternDependencies);Sn.length?wr.send("getImages",{icons:Sn,source:this.source,tileID:this.tileID,type:"patterns"},function(ki,_n){Gn||(Gn=ki,Jr=_n,En.call(ti))}):Jr={},En.call(this);function En(){if(Gn)return Xr(Gn);if(Ct&&Sr&&Jr){var ki=new c(Ct),_n=new i.ImageAtlas(Sr,Jr);for(var ya in Zi){var ea=Zi[ya];ea instanceof i.SymbolBucket?(h(ea.layers,this.zoom,ir),i.performSymbolLayout(ea,Ct,ki.positions,Sr,_n.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):ea.hasPattern&&(ea instanceof i.LineBucket||ea instanceof i.FillBucket||ea instanceof i.FillExtrusionBucket)&&(h(ea.layers,this.zoom,ir),ea.addFeatures(en,this.tileID.canonical,_n.patternPositions))}this.status="done",Xr(null,{buckets:i.values(Zi).filter(function(Ma){return!Ma.isEmpty()}),featureIndex:Ri,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ki.image,imageAtlas:_n,glyphMap:this.returnDependencies?Ct:null,iconMap:this.returnDependencies?Sr:null,glyphPositions:this.returnDependencies?ki.positions:null})}}};function h(Gt,wt,tr){for(var ir=new i.EvaluationParameters(wt),wr=0,Xr=Gt;wr=0!=!!wt&&Gt.reverse()}var L=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,x=function(wt){this._feature=wt,this.extent=i.EXTENT,this.type=wt.type,this.properties=wt.tags,"id"in wt&&!isNaN(wt.id)&&(this.id=parseInt(wt.id,10))};x.prototype.loadGeometry=function(){if(this._feature.type===1){for(var wt=[],tr=0,ir=this._feature.geometry;tr>31}function Ce(Gt,wt){for(var tr=Gt.loadGeometry(),ir=Gt.type,wr=0,Xr=0,ti=tr.length,$r=0;$r>1;Se(Gt,wt,ti,ir,wr,Xr%2),re(Gt,wt,tr,ir,ti-1,Xr+1),re(Gt,wt,tr,ti+1,wr,Xr+1)}}function Se(Gt,wt,tr,ir,wr,Xr){for(;wr>ir;){if(wr-ir>600){var ti=wr-ir+1,$r=tr-ir+1,Ri=Math.log(ti),Zi=.5*Math.exp(2*Ri/3),en=.5*Math.sqrt(Ri*Zi*(ti-Zi)/ti)*($r-ti/2<0?-1:1),fn=Math.max(ir,Math.floor(tr-$r*Zi/ti+en)),yn=Math.min(wr,Math.floor(tr+(ti-$r)*Zi/ti+en));Se(Gt,wt,tr,fn,yn,Xr)}var Mn=wt[2*tr+Xr],Ba=ir,ua=wr;for(ke(Gt,wt,ir,tr),wt[2*wr+Xr]>Mn&&ke(Gt,wt,ir,wr);BaMn;)ua--}wt[2*ir+Xr]===Mn?ke(Gt,wt,ir,ua):(ua++,ke(Gt,wt,ua,wr)),ua<=tr&&(ir=ua+1),tr<=ua&&(wr=ua-1)}}function ke(Gt,wt,tr,ir){be(Gt,tr,ir),be(wt,2*tr,2*ir),be(wt,2*tr+1,2*ir+1)}function be(Gt,wt,tr){var ir=Gt[wt];Gt[wt]=Gt[tr],Gt[tr]=ir}function Be(Gt,wt,tr,ir,wr,Xr,ti){for(var $r=[0,Gt.length-1,0],Ri=[],Zi,en;$r.length;){var fn=$r.pop(),yn=$r.pop(),Mn=$r.pop();if(yn-Mn<=ti){for(var Ba=Mn;Ba<=yn;Ba++)Zi=wt[2*Ba],en=wt[2*Ba+1],Zi>=tr&&Zi<=wr&&en>=ir&&en<=Xr&&Ri.push(Gt[Ba]);continue}var ua=Math.floor((Mn+yn)/2);Zi=wt[2*ua],en=wt[2*ua+1],Zi>=tr&&Zi<=wr&&en>=ir&&en<=Xr&&Ri.push(Gt[ua]);var ma=(fn+1)%2;(fn===0?tr<=Zi:ir<=en)&&($r.push(Mn),$r.push(ua-1),$r.push(ma)),(fn===0?wr>=Zi:Xr>=en)&&($r.push(ua+1),$r.push(yn),$r.push(ma))}return Ri}function Le(Gt,wt,tr,ir,wr,Xr){for(var ti=[0,Gt.length-1,0],$r=[],Ri=wr*wr;ti.length;){var Zi=ti.pop(),en=ti.pop(),fn=ti.pop();if(en-fn<=Xr){for(var yn=fn;yn<=en;yn++)me(wt[2*yn],wt[2*yn+1],tr,ir)<=Ri&&$r.push(Gt[yn]);continue}var Mn=Math.floor((fn+en)/2),Ba=wt[2*Mn],ua=wt[2*Mn+1];me(Ba,ua,tr,ir)<=Ri&&$r.push(Gt[Mn]);var ma=(Zi+1)%2;(Zi===0?tr-wr<=Ba:ir-wr<=ua)&&(ti.push(fn),ti.push(Mn-1),ti.push(ma)),(Zi===0?tr+wr>=Ba:ir+wr>=ua)&&(ti.push(Mn+1),ti.push(en),ti.push(ma))}return $r}function me(Gt,wt,tr,ir){var wr=Gt-tr,Xr=wt-ir;return wr*wr+Xr*Xr}var Pe=function(Gt){return Gt[0]},ce=function(Gt){return Gt[1]},He=function(wt,tr,ir,wr,Xr){tr===void 0&&(tr=Pe),ir===void 0&&(ir=ce),wr===void 0&&(wr=64),Xr===void 0&&(Xr=Float64Array),this.nodeSize=wr,this.points=wt;for(var ti=wt.length<65536?Uint16Array:Uint32Array,$r=this.ids=new ti(wt.length),Ri=this.coords=new Xr(wt.length*2),Zi=0;Zi=wr;en--){var fn=+Date.now();Ri=this._cluster(Ri,en),this.trees[en]=new He(Ri,Ae,rt,ti,Float32Array),ir&&console.log("z%d: %d clusters in %dms",en,Ri.length,+Date.now()-fn)}return ir&&console.timeEnd("total time"),this},mt.prototype.getClusters=function(wt,tr){var ir=((wt[0]+180)%360+360)%360-180,wr=Math.max(-90,Math.min(90,wt[1])),Xr=wt[2]===180?180:((wt[2]+180)%360+360)%360-180,ti=Math.max(-90,Math.min(90,wt[3]));if(wt[2]-wt[0]>=360)ir=-180,Xr=180;else if(ir>Xr){var $r=this.getClusters([ir,wr,180,ti],tr),Ri=this.getClusters([-180,wr,Xr,ti],tr);return $r.concat(Ri)}for(var Zi=this.trees[this._limitZoom(tr)],en=Zi.range(Vt(ir),rr(ti),Vt(Xr),rr(wr)),fn=[],yn=0,Mn=en;yntr&&(ua+=Xo.numPoints||1)}if(ua>=Ri){for(var da=fn.x*Ba,jn=fn.y*Ba,Ha=$r&&Ba>1?this._map(fn,!0):null,vo=(en<<5)+(tr+1)+this.points.length,Gn=0,Ct=Mn;Gn1)for(var hn=0,Sn=Mn;hn>5},mt.prototype._getOriginZoom=function(wt){return(wt-this.points.length)%32},mt.prototype._map=function(wt,tr){if(wt.numPoints)return tr?Ue({},wt.properties):wt.properties;var ir=this.points[wt.index].properties,wr=this.options.map(ir);return tr&&wr===ir?Ue({},wr):wr};function Ht(Gt,wt,tr,ir,wr){return{x:Gt,y:wt,zoom:1/0,id:tr,parentId:-1,numPoints:ir,properties:wr}}function at(Gt,wt){var tr=Gt.geometry.coordinates,ir=tr[0],wr=tr[1];return{x:Vt(ir),y:rr(wr),zoom:1/0,index:wt,parentId:-1}}function ct(Gt){return{type:"Feature",id:Gt.id,properties:ar(Gt),geometry:{type:"Point",coordinates:[tt(Gt.x),je(Gt.y)]}}}function ar(Gt){var wt=Gt.numPoints,tr=wt>=1e4?Math.round(wt/1e3)+"k":wt>=1e3?Math.round(wt/100)/10+"k":wt;return Ue(Ue({},Gt.properties),{cluster:!0,cluster_id:Gt.id,point_count:wt,point_count_abbreviated:tr})}function Vt(Gt){return Gt/360+.5}function rr(Gt){var wt=Math.sin(Gt*Math.PI/180),tr=.5-.25*Math.log((1+wt)/(1-wt))/Math.PI;return tr<0?0:tr>1?1:tr}function tt(Gt){return(Gt-.5)*360}function je(Gt){var wt=(180-Gt*360)*Math.PI/180;return 360*Math.atan(Math.exp(wt))/Math.PI-90}function Ue(Gt,wt){for(var tr in wt)Gt[tr]=wt[tr];return Gt}function Ae(Gt){return Gt.x}function rt(Gt){return Gt.y}function St(Gt,wt,tr,ir){for(var wr=ir,Xr=tr-wt>>1,ti=tr-wt,$r,Ri=Gt[wt],Zi=Gt[wt+1],en=Gt[tr],fn=Gt[tr+1],yn=wt+3;ynwr)$r=yn,wr=Mn;else if(Mn===wr){var Ba=Math.abs(yn-Xr);Bair&&($r-wt>3&&St(Gt,wt,$r,ir),Gt[$r+2]=wr,tr-$r>3&&St(Gt,$r,tr,ir))}function Tt(Gt,wt,tr,ir,wr,Xr){var ti=wr-tr,$r=Xr-ir;if(ti!==0||$r!==0){var Ri=((Gt-tr)*ti+(wt-ir)*$r)/(ti*ti+$r*$r);Ri>1?(tr=wr,ir=Xr):Ri>0&&(tr+=ti*Ri,ir+=$r*Ri)}return ti=Gt-tr,$r=wt-ir,ti*ti+$r*$r}function dt(Gt,wt,tr,ir){var wr={id:typeof Gt=="undefined"?null:Gt,type:wt,geometry:tr,tags:ir,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return Et(wr),wr}function Et(Gt){var wt=Gt.geometry,tr=Gt.type;if(tr==="Point"||tr==="MultiPoint"||tr==="LineString")pt(Gt,wt);else if(tr==="Polygon"||tr==="MultiLineString")for(var ir=0;ir0&&(ir?ti+=(wr*Zi-Ri*Xr)/2:ti+=Math.sqrt(Math.pow(Ri-wr,2)+Math.pow(Zi-Xr,2))),wr=Ri,Xr=Zi}var en=wt.length-3;wt[2]=1,St(wt,0,en,tr),wt[en+2]=1,wt.size=Math.abs(ti),wt.start=0,wt.end=wt.size}function ei(Gt,wt,tr,ir){for(var wr=0;wr1?1:tr}function gt(Gt,wt,tr,ir,wr,Xr,ti,$r){if(tr/=wt,ir/=wt,Xr>=tr&&ti=ir)return null;for(var Ri=[],Zi=0;Zi=tr&&Ba=ir)continue;var ua=[];if(yn==="Point"||yn==="MultiPoint")Ge(fn,ua,tr,ir,wr);else if(yn==="LineString")Je(fn,ua,tr,ir,wr,!1,$r.lineMetrics);else if(yn==="MultiLineString")et(fn,ua,tr,ir,wr,!1);else if(yn==="Polygon")et(fn,ua,tr,ir,wr,!0);else if(yn==="MultiPolygon")for(var ma=0;ma=tr&&ti<=ir&&(wt.push(Gt[Xr]),wt.push(Gt[Xr+1]),wt.push(Gt[Xr+2]))}}function Je(Gt,wt,tr,ir,wr,Xr,ti){for(var $r=We(Gt),Ri=wr===0?At:Kt,Zi=Gt.start,en,fn,yn=0;yntr&&(fn=Ri($r,Mn,Ba,ma,Wa,tr),ti&&($r.start=Zi+en*fn)):Fa>ir?Xo=tr&&(fn=Ri($r,Mn,Ba,ma,Wa,tr),da=!0),Xo>ir&&Fa<=ir&&(fn=Ri($r,Mn,Ba,ma,Wa,ir),da=!0),!Xr&&da&&(ti&&($r.end=Zi+en*fn),wt.push($r),$r=We(Gt)),ti&&(Zi+=en)}var jn=Gt.length-3;Mn=Gt[jn],Ba=Gt[jn+1],ua=Gt[jn+2],Fa=wr===0?Mn:Ba,Fa>=tr&&Fa<=ir&&xt($r,Mn,Ba,ua),jn=$r.length-3,Xr&&jn>=3&&($r[jn]!==$r[0]||$r[jn+1]!==$r[1])&&xt($r,$r[0],$r[1],$r[2]),$r.length&&wt.push($r)}function We(Gt){var wt=[];return wt.size=Gt.size,wt.start=Gt.start,wt.end=Gt.end,wt}function et(Gt,wt,tr,ir,wr,Xr){for(var ti=0;titi.maxX&&(ti.maxX=en),fn>ti.maxY&&(ti.maxY=fn)}return ti}function Pi(Gt,wt,tr,ir){var wr=wt.geometry,Xr=wt.type,ti=[];if(Xr==="Point"||Xr==="MultiPoint")for(var $r=0;$r0&&wt.size<(wr?ti:ir)){tr.numPoints+=wt.length/3;return}for(var $r=[],Ri=0;Riti)&&(tr.numSimplified++,$r.push(wt[Ri]),$r.push(wt[Ri+1])),tr.numPoints++;wr&&mi($r,Xr),Gt.push($r)}function mi(Gt,wt){for(var tr=0,ir=0,wr=Gt.length,Xr=wr-2;ir0===wt)for(ir=0,wr=Gt.length;ir24)throw new Error("maxZoom should be in the 0-24 range");if(wt.promoteId&&wt.generateId)throw new Error("promoteId and generateId cannot be used together.");var ir=jt(Gt,wt);this.tiles={},this.tileCoords=[],tr&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",wt.indexMaxZoom,wt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),ir=Qt(ir,wt),ir.length&&this.splitTile(ir,0,0,0),tr&&(ir.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)))}Fn.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Fn.prototype.splitTile=function(Gt,wt,tr,ir,wr,Xr,ti){for(var $r=[Gt,wt,tr,ir],Ri=this.options,Zi=Ri.debug;$r.length;){ir=$r.pop(),tr=$r.pop(),wt=$r.pop(),Gt=$r.pop();var en=1<1&&console.time("creation"),yn=this.tiles[fn]=_i(Gt,wt,tr,ir,Ri),this.tileCoords.push({z:wt,x:tr,y:ir}),Zi)){Zi>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",wt,tr,ir,yn.numFeatures,yn.numPoints,yn.numSimplified),console.timeEnd("creation"));var Mn="z"+wt;this.stats[Mn]=(this.stats[Mn]||0)+1,this.total++}if(yn.source=Gt,wr){if(wt===Ri.maxZoom||wt===wr)continue;var Ba=1<1&&console.time("clipping");var ua=.5*Ri.buffer/Ri.extent,ma=.5-ua,Wa=.5+ua,Fa=1+ua,Xo,da,jn,Ha,vo,Gn;Xo=da=jn=Ha=null,vo=gt(Gt,en,tr-ua,tr+Wa,0,yn.minX,yn.maxX,Ri),Gn=gt(Gt,en,tr+ma,tr+Fa,0,yn.minX,yn.maxX,Ri),Gt=null,vo&&(Xo=gt(vo,en,ir-ua,ir+Wa,1,yn.minY,yn.maxY,Ri),da=gt(vo,en,ir+ma,ir+Fa,1,yn.minY,yn.maxY,Ri),vo=null),Gn&&(jn=gt(Gn,en,ir-ua,ir+Wa,1,yn.minY,yn.maxY,Ri),Ha=gt(Gn,en,ir+ma,ir+Fa,1,yn.minY,yn.maxY,Ri),Gn=null),Zi>1&&console.timeEnd("clipping"),$r.push(Xo||[],wt+1,tr*2,ir*2),$r.push(da||[],wt+1,tr*2,ir*2+1),$r.push(jn||[],wt+1,tr*2+1,ir*2),$r.push(Ha||[],wt+1,tr*2+1,ir*2+1)}}},Fn.prototype.getTile=function(Gt,wt,tr){var ir=this.options,wr=ir.extent,Xr=ir.debug;if(Gt<0||Gt>24)return null;var ti=1<1&&console.log("drilling down to z%d-%d-%d",Gt,wt,tr);for(var Ri=Gt,Zi=wt,en=tr,fn;!fn&&Ri>0;)Ri--,Zi=Math.floor(Zi/2),en=Math.floor(en/2),fn=this.tiles[An(Ri,Zi,en)];return!fn||!fn.source?null:(Xr>1&&console.log("found parent tile z%d-%d-%d",Ri,Zi,en),Xr>1&&console.time("drilling down"),this.splitTile(fn.source,Ri,Zi,en,Gt,wt,tr),Xr>1&&console.timeEnd("drilling down"),this.tiles[$r]?Ir(this.tiles[$r],wr):null)};function An(Gt,wt,tr){return((1<=0?0:Y.button},o.remove=function(Y){Y.parentNode&&Y.parentNode.removeChild(Y)};function m(Y,D,J){var O,K,de,ne=i.browser.devicePixelRatio>1?"@2x":"",we=i.getJSON(D.transformRequest(D.normalizeSpriteURL(Y,ne,".json"),i.ResourceType.SpriteJSON),function(Yt,cr){we=null,de||(de=Yt,O=cr,ht())}),Oe=i.getImage(D.transformRequest(D.normalizeSpriteURL(Y,ne,".png"),i.ResourceType.SpriteImage),function(Yt,cr){Oe=null,de||(de=Yt,K=cr,ht())});function ht(){if(de)J(de);else if(O&&K){var Yt=i.browser.getImageData(K),cr={};for(var Nt in O){var Ne=O[Nt],$e=Ne.width,st=Ne.height,It=Ne.x,Bt=Ne.y,Ft=Ne.sdf,Ut=Ne.pixelRatio,zt=Ne.stretchX,_t=Ne.stretchY,Dt=Ne.content,vt=new i.RGBAImage({width:$e,height:st});i.RGBAImage.copy(Yt,vt,{x:It,y:Bt},{x:0,y:0},{width:$e,height:st}),cr[Nt]={data:vt,pixelRatio:Ut,sdf:Ft,stretchX:zt,stretchY:_t,content:Dt}}J(null,cr)}}return{cancel:function(){we&&(we.cancel(),we=null),Oe&&(Oe.cancel(),Oe=null)}}}function b(Y){var D=Y.userImage;if(D&&D.render){var J=D.render();if(J)return Y.data.replace(new Uint8Array(D.data.buffer)),!0}return!1}var p=1,k=function(Y){function D(){Y.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 Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.isLoaded=function(){return this.loaded},D.prototype.setLoaded=function(O){if(this.loaded!==O&&(this.loaded=O,O)){for(var K=0,de=this.requestors;K=0?1.2:1))}C.prototype.draw=function(Y){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(Y,this.buffer,this.middle);for(var D=this.ctx.getImageData(0,0,this.size,this.size),J=new Uint8ClampedArray(this.size*this.size),O=0;O65535){Yt(new Error("glyphs > 65535 not supported"));return}if(Ne.ranges[st]){Yt(null,{stack:cr,id:Nt,glyph:$e});return}var It=Ne.requests[st];It||(It=Ne.requests[st]=[],P.loadGlyphRange(cr,st,O.url,O.requestManager,function(Bt,Ft){if(Ft){for(var Ut in Ft)O._doesCharSupportLocalGlyph(+Ut)||(Ne.glyphs[+Ut]=Ft[+Ut]);Ne.ranges[st]=!0}for(var zt=0,_t=It;zt<_t.length;zt+=1){var Dt=_t[zt];Dt(Bt,Ft)}delete Ne.requests[st]})),It.push(function(Bt,Ft){Bt?Yt(Bt):Ft&&Yt(null,{stack:cr,id:Nt,glyph:Ft[Nt]||null})})},function(ht,Yt){if(ht)J(ht);else if(Yt){for(var cr={},Nt=0,Ne=Yt;Nt1&&(ht=D[++Oe]);var cr=Math.abs(Yt-ht.left),Nt=Math.abs(Yt-ht.right),Ne=Math.min(cr,Nt),$e=void 0,st=de/O*(K+1);if(ht.isDash){var It=K-Math.abs(st);$e=Math.sqrt(Ne*Ne+It*It)}else $e=K-Math.sqrt(Ne*Ne+st*st);this.data[we+Yt]=Math.max(0,Math.min(255,$e+128))}},G.prototype.addRegularDash=function(D){for(var J=D.length-1;J>=0;--J){var O=D[J],K=D[J+1];O.zeroLength?D.splice(J,1):K&&K.isDash===O.isDash&&(K.left=O.left,D.splice(J,1))}var de=D[0],ne=D[D.length-1];de.isDash===ne.isDash&&(de.left=ne.left-this.width,ne.right=de.right+this.width);for(var we=this.width*this.nextRow,Oe=0,ht=D[Oe],Yt=0;Yt1&&(ht=D[++Oe]);var cr=Math.abs(Yt-ht.left),Nt=Math.abs(Yt-ht.right),Ne=Math.min(cr,Nt),$e=ht.isDash?Ne:-Ne;this.data[we+Yt]=Math.max(0,Math.min(255,$e+128))}},G.prototype.addDash=function(D,J){var O=J?7:0,K=2*O+1;if(this.nextRow+K>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var de=0,ne=0;ne=O.minX&&D.x=O.minY&&D.y0&&(Yt[new i.OverscaledTileID(O.overscaledZ,we,K.z,ne,K.y-1).key]={backfilled:!1},Yt[new i.OverscaledTileID(O.overscaledZ,O.wrap,K.z,K.x,K.y-1).key]={backfilled:!1},Yt[new i.OverscaledTileID(O.overscaledZ,ht,K.z,Oe,K.y-1).key]={backfilled:!1}),K.y+10&&(de.resourceTiming=O._resourceTiming,O._resourceTiming=[]),O.fire(new i.Event("data",de))})},D.prototype.onAdd=function(O){this.map=O,this.load()},D.prototype.setData=function(O){var K=this;return this._data=O,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(de){if(de){K.fire(new i.ErrorEvent(de));return}var ne={dataType:"source",sourceDataType:"content"};K._collectResourceTiming&&K._resourceTiming&&K._resourceTiming.length>0&&(ne.resourceTiming=K._resourceTiming,K._resourceTiming=[]),K.fire(new i.Event("data",ne))}),this},D.prototype.getClusterExpansionZoom=function(O,K){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:O,source:this.id},K),this},D.prototype.getClusterChildren=function(O,K){return this.actor.send("geojson.getClusterChildren",{clusterId:O,source:this.id},K),this},D.prototype.getClusterLeaves=function(O,K,de,ne){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:O,limit:K,offset:de},ne),this},D.prototype._updateWorkerData=function(O){var K=this;this._loaded=!1;var de=i.extend({},this.workerOptions),ne=this._data;typeof ne=="string"?(de.request=this.map._requestManager.transformRequest(i.browser.resolveURL(ne),i.ResourceType.Source),de.request.collectResourceTiming=this._collectResourceTiming):de.data=JSON.stringify(ne),this.actor.send(this.type+".loadData",de,function(we,Oe){K._removed||Oe&&Oe.abandoned||(K._loaded=!0,Oe&&Oe.resourceTiming&&Oe.resourceTiming[K.id]&&(K._resourceTiming=Oe.resourceTiming[K.id].slice(0)),K.actor.send(K.type+".coalesce",{source:de.source},null),O(we))})},D.prototype.loaded=function(){return this._loaded},D.prototype.loadTile=function(O,K){var de=this,ne=O.actor?"reloadTile":"loadTile";O.actor=this.actor;var we={type:this.type,uid:O.uid,tileID:O.tileID,zoom:O.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};O.request=this.actor.send(ne,we,function(Oe,ht){return delete O.request,O.unloadVectorData(),O.aborted?K(null):Oe?K(Oe):(O.loadVectorData(ht,de.map.painter,ne==="reloadTile"),K(null))})},D.prototype.abortTile=function(O){O.request&&(O.request.cancel(),delete O.request),O.aborted=!0},D.prototype.unloadTile=function(O){O.unloadVectorData(),this.actor.send("removeTile",{uid:O.uid,type:this.type,source:this.id})},D.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},D.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},D.prototype.hasTransition=function(){return!1},D}(i.Evented),Ee=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Ce=function(Y){function D(J,O,K,de){Y.call(this),this.id=J,this.dispatcher=K,this.coordinates=O.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(de),this.options=O}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(O,K){var de=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(ne,we){de._loaded=!0,ne?de.fire(new i.ErrorEvent(ne)):we&&(de.image=we,O&&(de.coordinates=O),K&&K(),de._finishLoading())})},D.prototype.loaded=function(){return this._loaded},D.prototype.updateImage=function(O){var K=this;return!this.image||!O.url?this:(this.options.url=O.url,this.load(O.coordinates,function(){K.texture=null}),this)},D.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},D.prototype.onAdd=function(O){this.map=O,this.load()},D.prototype.setCoordinates=function(O){var K=this;this.coordinates=O;var de=O.map(i.MercatorCoordinate.fromLngLat);this.tileID=ge(de),this.minzoom=this.maxzoom=this.tileID.z;var ne=de.map(function(we){return K.tileID.getTilePoint(we)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(ne[0].x,ne[0].y,0,0),this._boundsArray.emplaceBack(ne[1].x,ne[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(ne[3].x,ne[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(ne[2].x,ne[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},D.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var O=this.map.painter.context,K=O.gl;this.boundsBuffer||(this.boundsBuffer=O.createVertexBuffer(this._boundsArray,Ee.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(O,this.image,K.RGBA),this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE));for(var de in this.tiles){var ne=this.tiles[de];ne.state!=="loaded"&&(ne.state="loaded",ne.texture=this.texture)}}},D.prototype.loadTile=function(O,K){this.tileID&&this.tileID.equals(O.tileID.canonical)?(this.tiles[String(O.tileID.wrap)]=O,O.buckets={},K(null)):(O.state="errored",K(null))},D.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},D.prototype.hasTransition=function(){return!1},D}(i.Evented);function ge(Y){for(var D=1/0,J=1/0,O=-1/0,K=-1/0,de=0,ne=Y;deK.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+K.start(0)+" and "+K.end(0)+"-second mark."))):this.video.currentTime=O}},D.prototype.getVideo=function(){return this.video},D.prototype.onAdd=function(O){this.map||(this.map=O,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},D.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var O=this.map.painter.context,K=O.gl;this.boundsBuffer||(this.boundsBuffer=O.createVertexBuffer(this._boundsArray,Ee.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE),K.texSubImage2D(K.TEXTURE_2D,0,0,0,K.RGBA,K.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(O,this.video,K.RGBA),this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE));for(var de in this.tiles){var ne=this.tiles[de];ne.state!=="loaded"&&(ne.state="loaded",ne.texture=this.texture)}}},D.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},D.prototype.hasTransition=function(){return this.video&&!this.video.paused},D}(Ce),Se=function(Y){function D(J,O,K,de){Y.call(this,J,O,K,de),O.coordinates?(!Array.isArray(O.coordinates)||O.coordinates.length!==4||O.coordinates.some(function(ne){return!Array.isArray(ne)||ne.length!==2||ne.some(function(we){return typeof we!="number"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'missing required property "coordinates"'))),O.animate&&typeof O.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'optional "animate" property must be a boolean value'))),O.canvas?typeof O.canvas!="string"&&!(O.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,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."+J,null,'missing required property "canvas"'))),this.options=O,this.animate=O.animate!==void 0?O.animate:!0}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.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()},D.prototype.getCanvas=function(){return this.canvas},D.prototype.onAdd=function(O){this.map=O,this.load(),this.canvas&&this.animate&&this.play()},D.prototype.onRemove=function(){this.pause()},D.prototype.prepare=function(){var O=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,O=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,O=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var K=this.map.painter.context,de=K.gl;this.boundsBuffer||(this.boundsBuffer=K.createVertexBuffer(this._boundsArray,Ee.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(O||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture(K,this.canvas,de.RGBA,{premultiply:!0});for(var ne in this.tiles){var we=this.tiles[ne];we.state!=="loaded"&&(we.state="loaded",we.texture=this.texture)}}},D.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},D.prototype.hasTransition=function(){return this._playing},D.prototype._hasInvalidDimensions=function(){for(var O=0,K=[this.canvas.width,this.canvas.height];Othis.max){var we=this._getAndRemoveByKey(this.order[0]);we&&this.onRemove(we)}return this},at.prototype.has=function(D){return D.wrapped().key in this.data},at.prototype.getAndRemove=function(D){return this.has(D)?this._getAndRemoveByKey(D.wrapped().key):null},at.prototype._getAndRemoveByKey=function(D){var J=this.data[D].shift();return J.timeout&&clearTimeout(J.timeout),this.data[D].length===0&&delete this.data[D],this.order.splice(this.order.indexOf(D),1),J.value},at.prototype.getByKey=function(D){var J=this.data[D];return J?J[0].value:null},at.prototype.get=function(D){if(!this.has(D))return null;var J=this.data[D.wrapped().key][0];return J.value},at.prototype.remove=function(D,J){if(!this.has(D))return this;var O=D.wrapped().key,K=J===void 0?0:this.data[O].indexOf(J),de=this.data[O][K];return this.data[O].splice(K,1),de.timeout&&clearTimeout(de.timeout),this.data[O].length===0&&delete this.data[O],this.onRemove(de.value),this.order.splice(this.order.indexOf(O),1),this},at.prototype.setMaxSize=function(D){for(this.max=D;this.order.length>this.max;){var J=this._getAndRemoveByKey(this.order[0]);J&&this.onRemove(J)}return this},at.prototype.filter=function(D){var J=[];for(var O in this.data)for(var K=0,de=this.data[O];K1||(Math.abs(cr)>1&&(Math.abs(cr+Ne)===1?cr+=Ne:Math.abs(cr-Ne)===1&&(cr-=Ne)),!(!Yt.dem||!ht.dem)&&(ht.dem.backfillBorder(Yt.dem,cr,Nt),ht.neighboringTiles&&ht.neighboringTiles[$e]&&(ht.neighboringTiles[$e].backfilled=!0)))}},D.prototype.getTile=function(O){return this.getTileByID(O.key)},D.prototype.getTileByID=function(O){return this._tiles[O]},D.prototype._retainLoadedChildren=function(O,K,de,ne){for(var we in this._tiles){var Oe=this._tiles[we];if(!(ne[we]||!Oe.hasData()||Oe.tileID.overscaledZ<=K||Oe.tileID.overscaledZ>de)){for(var ht=Oe.tileID;Oe&&Oe.tileID.overscaledZ>K+1;){var Yt=Oe.tileID.scaledTo(Oe.tileID.overscaledZ-1);Oe=this._tiles[Yt.key],Oe&&Oe.hasData()&&(ht=Yt)}for(var cr=ht;cr.overscaledZ>K;)if(cr=cr.scaledTo(cr.overscaledZ-1),O[cr.key]){ne[ht.key]=ht;break}}}},D.prototype.findLoadedParent=function(O,K){if(O.key in this._loadedParentTiles){var de=this._loadedParentTiles[O.key];return de&&de.tileID.overscaledZ>=K?de:null}for(var ne=O.overscaledZ-1;ne>=K;ne--){var we=O.scaledTo(ne),Oe=this._getLoadedTile(we);if(Oe)return Oe}},D.prototype._getLoadedTile=function(O){var K=this._tiles[O.key];if(K&&K.hasData())return K;var de=this._cache.getByKey(O.wrapped().key);return de},D.prototype.updateCacheSize=function(O){var K=Math.ceil(O.width/this._source.tileSize)+1,de=Math.ceil(O.height/this._source.tileSize)+1,ne=K*de,we=5,Oe=Math.floor(ne*we),ht=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Oe):Oe;this._cache.setMaxSize(ht)},D.prototype.handleWrapJump=function(O){var K=this._prevLng===void 0?O:this._prevLng,de=O-K,ne=de/360,we=Math.round(ne);if(this._prevLng=O,we){var Oe={};for(var ht in this._tiles){var Yt=this._tiles[ht];Yt.tileID=Yt.tileID.unwrapTo(Yt.tileID.wrap+we),Oe[Yt.tileID.key]=Yt}this._tiles=Oe;for(var cr in this._timers)clearTimeout(this._timers[cr]),delete this._timers[cr];for(var Nt in this._tiles){var Ne=this._tiles[Nt];this._setTileReloadTimer(Nt,Ne)}}},D.prototype.update=function(O){var K=this;if(this.transform=O,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(O),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var de;this.used?this._source.tileID?de=O.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Br){return new i.OverscaledTileID(Br.canonical.z,Br.wrap,Br.canonical.z,Br.canonical.x,Br.canonical.y)}):(de=O.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(de=de.filter(function(Br){return K._source.hasTile(Br)}))):de=[];var ne=O.coveringZoomLevel(this._source),we=Math.max(ne-D.maxOverzooming,this._source.minzoom),Oe=Math.max(ne+D.maxUnderzooming,this._source.minzoom),ht=this._updateRetainedTiles(de,ne);if(Ri(this._source.type)){for(var Yt={},cr={},Nt=Object.keys(ht),Ne=0,$e=Nt;Ne<$e.length;Ne+=1){var st=$e[Ne],It=ht[st],Bt=this._tiles[st];if(!(!Bt||Bt.fadeEndTime&&Bt.fadeEndTime<=i.browser.now())){var Ft=this.findLoadedParent(It,we);Ft&&(this._addTile(Ft.tileID),Yt[Ft.tileID.key]=Ft.tileID),cr[st]=It}}this._retainLoadedChildren(cr,ne,Oe,ht);for(var Ut in Yt)ht[Ut]||(this._coveredTiles[Ut]=!0,ht[Ut]=Yt[Ut])}for(var zt in ht)this._tiles[zt].clearFadeHold();for(var _t=i.keysDifference(this._tiles,ht),Dt=0,vt=_t;Dtthis._source.maxzoom){var Ft=It.children(this._source.maxzoom)[0],Ut=this.getTile(Ft);if(Ut&&Ut.hasData()){de[Ft.key]=Ft;continue}}else{var zt=It.children(this._source.maxzoom);if(de[zt[0].key]&&de[zt[1].key]&&de[zt[2].key]&&de[zt[3].key])continue}for(var _t=Bt.wasRequested(),Dt=It.overscaledZ-1;Dt>=we;--Dt){var vt=It.scaledTo(Dt);if(ne[vt.key]||(ne[vt.key]=!0,Bt=this.getTile(vt),!Bt&&_t&&(Bt=this._addTile(vt)),Bt&&(de[vt.key]=vt,_t=Bt.wasRequested(),Bt.hasData())))break}}}return de},D.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var O in this._tiles){for(var K=[],de=void 0,ne=this._tiles[O].tileID;ne.overscaledZ>0;){if(ne.key in this._loadedParentTiles){de=this._loadedParentTiles[ne.key];break}K.push(ne.key);var we=ne.scaledTo(ne.overscaledZ-1);if(de=this._getLoadedTile(we),de)break;ne=we}for(var Oe=0,ht=K;Oe0)&&(K.hasData()&&K.state!=="reloading"?this._cache.add(K.tileID,K,K.getExpiryTimeout()):(K.aborted=!0,this._abortTile(K),this._unloadTile(K))))},D.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var O in this._tiles)this._removeTile(O);this._cache.reset()},D.prototype.tilesIn=function(O,K,de){var ne=this,we=[],Oe=this.transform;if(!Oe)return we;for(var ht=de?Oe.getCameraQueryGeometry(O):O,Yt=O.map(function(Dt){return Oe.pointCoordinate(Dt)}),cr=ht.map(function(Dt){return Oe.pointCoordinate(Dt)}),Nt=this.getIds(),Ne=1/0,$e=1/0,st=-1/0,It=-1/0,Bt=0,Ft=cr;Bt=0&&Di[1].y+Br>=0){var ci=Yt.map(function(gn){return lr.getTilePoint(gn)}),bi=cr.map(function(gn){return lr.getTilePoint(gn)});we.push({tile:vt,tileID:lr,queryGeometry:ci,cameraQueryGeometry:bi,scale:_r})}}},_t=0;_t=i.browser.now())return!0}return!1},D.prototype.setFeatureState=function(O,K,de){O=O||"_geojsonTileLayer",this._state.updateState(O,K,de)},D.prototype.removeFeatureState=function(O,K,de){O=O||"_geojsonTileLayer",this._state.removeFeatureState(O,K,de)},D.prototype.getFeatureState=function(O,K){return O=O||"_geojsonTileLayer",this._state.getState(O,K)},D.prototype.setDependencies=function(O,K,de){var ne=this._tiles[O];ne&&ne.setDependencies(K,de)},D.prototype.reloadTilesForDependencies=function(O,K){for(var de in this._tiles){var ne=this._tiles[de];ne.hasDependency(O,K)&&this._reloadTile(de,"reloading")}this._cache.filter(function(we){return!we.hasDependency(O,K)})},D}(i.Evented);ti.maxOverzooming=10,ti.maxUnderzooming=3;function $r(Y,D){var J=Math.abs(Y.wrap*2)-+(Y.wrap<0),O=Math.abs(D.wrap*2)-+(D.wrap<0);return Y.overscaledZ-D.overscaledZ||O-J||D.canonical.y-Y.canonical.y||D.canonical.x-Y.canonical.x}function Ri(Y){return Y==="raster"||Y==="image"||Y==="video"}function Zi(){return new i.window.Worker(io.workerUrl)}var en="mapboxgl_preloaded_worker_pool",fn=function(){this.active={}};fn.prototype.acquire=function(D){if(!this.workers)for(this.workers=[];this.workers.length0?(K-ne)/we:0;return this.points[de].mult(1-Oe).add(this.points[J].mult(Oe))};var ki=function(D,J,O){var K=this.boxCells=[],de=this.circleCells=[];this.xCellCount=Math.ceil(D/O),this.yCellCount=Math.ceil(J/O);for(var ne=0;nethis.width||K<0||J>this.height)return de?!1:[];var we=[];if(D<=0&&J<=0&&this.width<=O&&this.height<=K){if(de)return!0;for(var Oe=0;Oe0:we}},ki.prototype._queryCircle=function(D,J,O,K,de){var ne=D-O,we=D+O,Oe=J-O,ht=J+O;if(we<0||ne>this.width||ht<0||Oe>this.height)return K?!1:[];var Yt=[],cr={hitTest:K,circle:{x:D,y:J,radius:O},seenUids:{box:{},circle:{}}};return this._forEachCell(ne,Oe,we,ht,this._queryCellCircle,Yt,cr,de),K?Yt.length>0:Yt},ki.prototype.query=function(D,J,O,K,de){return this._query(D,J,O,K,!1,de)},ki.prototype.hitTest=function(D,J,O,K,de){return this._query(D,J,O,K,!0,de)},ki.prototype.hitTestCircle=function(D,J,O,K){return this._queryCircle(D,J,O,!0,K)},ki.prototype._queryCell=function(D,J,O,K,de,ne,we,Oe){var ht=we.seenUids,Yt=this.boxCells[de];if(Yt!==null)for(var cr=this.bboxes,Nt=0,Ne=Yt;Nt=cr[st+0]&&K>=cr[st+1]&&(!Oe||Oe(this.boxKeys[$e]))){if(we.hitTest)return ne.push(!0),!0;ne.push({key:this.boxKeys[$e],x1:cr[st],y1:cr[st+1],x2:cr[st+2],y2:cr[st+3]})}}}var It=this.circleCells[de];if(It!==null)for(var Bt=this.circles,Ft=0,Ut=It;Ftwe*we+Oe*Oe},ki.prototype._circleAndRectCollide=function(D,J,O,K,de,ne,we){var Oe=(ne-K)/2,ht=Math.abs(D-(K+Oe));if(ht>Oe+O)return!1;var Yt=(we-de)/2,cr=Math.abs(J-(de+Yt));if(cr>Yt+O)return!1;if(ht<=Oe||cr<=Yt)return!0;var Nt=ht-Oe,Ne=cr-Yt;return Nt*Nt+Ne*Ne<=O*O};function _n(Y,D,J,O,K){var de=i.create();return D?(i.scale(de,de,[1/K,1/K,1]),J||i.rotateZ(de,de,O.angle)):i.multiply(de,O.labelPlaneMatrix,Y),de}function ya(Y,D,J,O,K){if(D){var de=i.clone(Y);return i.scale(de,de,[K,K,1]),J||i.rotateZ(de,de,-O.angle),de}else return O.glCoordMatrix}function ea(Y,D){var J=[Y.x,Y.y,0,1];zl(J,J,D);var O=J[3];return{point:new i.Point(J[0]/O,J[1]/O),signedDistanceFromCamera:O}}function Ma(Y,D){return .5+.5*(Y/D)}function _o(Y,D){var J=Y[0]/Y[3],O=Y[1]/Y[3],K=J>=-D[0]&&J<=D[0]&&O>=-D[1]&&O<=D[1];return K}function No(Y,D,J,O,K,de,ne,we){var Oe=O?Y.textSizeData:Y.iconSizeData,ht=i.evaluateSizeForZoom(Oe,J.transform.zoom),Yt=[256/J.width*2+1,256/J.height*2+1],cr=O?Y.text.dynamicLayoutVertexArray:Y.icon.dynamicLayoutVertexArray;cr.clear();for(var Nt=Y.lineVertexArray,Ne=O?Y.text.placedSymbolArray:Y.icon.placedSymbolArray,$e=J.transform.width/J.transform.height,st=!1,It=0;Itde)return{useVertical:!0}}return(Y===i.WritingMode.vertical?D.yJ.x)?{needsFlipping:!0}:null}function ko(Y,D,J,O,K,de,ne,we,Oe,ht,Yt,cr,Nt,Ne){var $e=D/24,st=Y.lineOffsetX*$e,It=Y.lineOffsetY*$e,Bt;if(Y.numGlyphs>1){var Ft=Y.glyphStartIndex+Y.numGlyphs,Ut=Y.lineStartIndex,zt=Y.lineStartIndex+Y.lineLength,_t=po($e,we,st,It,J,Yt,cr,Y,Oe,de,Nt);if(!_t)return{notEnoughRoom:!0};var Dt=ea(_t.first.point,ne).point,vt=ea(_t.last.point,ne).point;if(O&&!J){var lr=Lo(Y.writingMode,Dt,vt,Ne);if(lr)return lr}Bt=[_t.first];for(var _r=Y.glyphStartIndex+1;_r0?bi.point:Ds(cr,ci,Br,1,K),tn=Lo(Y.writingMode,Br,gn,Ne);if(tn)return tn}var Ei=Fs($e*we.getoffsetX(Y.glyphStartIndex),st,It,J,Yt,cr,Y.segment,Y.lineStartIndex,Y.lineStartIndex+Y.lineLength,Oe,de,Nt);if(!Ei)return{notEnoughRoom:!0};Bt=[Ei]}for(var Oi=0,Gi=Bt;Oi0?1:-1,$e=0;O&&(Ne*=-1,$e=Math.PI),Ne<0&&($e+=Math.PI);for(var st=Ne>0?we+ne:we+ne+1,It=K,Bt=K,Ft=0,Ut=0,zt=Math.abs(Nt),_t=[];Ft+Ut<=zt;){if(st+=Ne,st=Oe)return null;if(Bt=It,_t.push(It),It=cr[st],It===void 0){var Dt=new i.Point(ht.getx(st),ht.gety(st)),vt=ea(Dt,Yt);if(vt.signedDistanceFromCamera>0)It=cr[st]=vt.point;else{var lr=st-Ne,_r=Ft===0?de:new i.Point(ht.getx(lr),ht.gety(lr));It=Ds(_r,Dt,Bt,zt-Ft+1,Yt)}}Ft+=Ut,Ut=Bt.dist(It)}var Br=(zt-Ft)/Ut,Di=It.sub(Bt),ci=Di.mult(Br)._add(Bt);ci._add(Di._unit()._perp()._mult(J*Ne));var bi=$e+Math.atan2(It.y-Bt.y,It.x-Bt.x);return _t.push(ci),{point:ci,angle:bi,path:_t}}var ll=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ul(Y,D){for(var J=0;J=1;on--)Gi.push(Ei.path[on]);for(var zn=1;zn0){for(var so=Gi[0].clone(),Yo=Gi[0].clone(),ms=1;ms=bi.x&&Yo.x<=gn.x&&so.y>=bi.y&&Yo.y<=gn.y?ts=[Gi]:Yo.xgn.x||Yo.ygn.y?ts=[]:ts=i.clipLine([Gi],bi.x,bi.y,gn.x,gn.y)}for(var ou=0,Cv=ts;ou=this.screenRightBoundary||Kthis.screenBottomBoundary},il.prototype.isInsideGrid=function(D,J,O,K){return O>=0&&D=0&&J0){var zt;return this.prevPlacement&&this.prevPlacement.variableOffsets[Nt.crossTileID]&&this.prevPlacement.placements[Nt.crossTileID]&&this.prevPlacement.placements[Nt.crossTileID].text&&(zt=this.prevPlacement.variableOffsets[Nt.crossTileID].anchor),this.variableOffsets[Nt.crossTileID]={textOffset:It,width:O,height:K,anchor:D,textBoxScale:de,prevAnchor:zt},this.markUsedJustification(Ne,D,Nt,$e),Ne.allowVerticalPlacement&&(this.markUsedOrientation(Ne,$e,Nt),this.placedOrientations[Nt.crossTileID]=$e),{shift:Bt,placedGlyphBoxes:Ft}}},bs.prototype.placeLayerBucketPart=function(D,J,O){var K=this,de=D.parameters,ne=de.bucket,we=de.layout,Oe=de.posMatrix,ht=de.textLabelPlaneMatrix,Yt=de.labelToScreenMatrix,cr=de.textPixelRatio,Nt=de.holdingForFade,Ne=de.collisionBoxArray,$e=de.partiallyEvaluatedTextSize,st=de.collisionGroup,It=we.get("text-optional"),Bt=we.get("icon-optional"),Ft=we.get("text-allow-overlap"),Ut=we.get("icon-allow-overlap"),zt=we.get("text-rotation-alignment")==="map",_t=we.get("text-pitch-alignment")==="map",Dt=we.get("icon-text-fit")!=="none",vt=we.get("symbol-z-order")==="viewport-y",lr=Ft&&(Ut||!ne.hasIconData()||Bt),_r=Ut&&(Ft||!ne.hasTextData()||It);!ne.collisionArrays&&Ne&&ne.deserializeCollisionBoxes(Ne);var Br=function(Ei,Oi){if(!J[Ei.crossTileID]){if(Nt){K.placements[Ei.crossTileID]=new zs(!1,!1,!1);return}var Gi=!1,on=!1,zn=!0,Ja=null,co={box:null,offscreen:null},ts={box:null,offscreen:null},so=null,Yo=null,ms=null,ou=0,Cv=0,Lv=0;Oi.textFeatureIndex?ou=Oi.textFeatureIndex:Ei.useRuntimeCollisionCircles&&(ou=Ei.featureIndex),Oi.verticalTextFeatureIndex&&(Cv=Oi.verticalTextFeatureIndex);var wd=Oi.textBox;if(wd){var Kv=function(vc){var tu=i.WritingMode.horizontal;if(ne.allowVerticalPlacement&&!vc&&K.prevPlacement){var Sd=K.prevPlacement.placedOrientations[Ei.crossTileID];Sd&&(K.placedOrientations[Ei.crossTileID]=Sd,tu=Sd,K.markUsedOrientation(ne,tu,Ei))}return tu},hg=function(vc,tu){if(ne.allowVerticalPlacement&&Ei.numVerticalGlyphVertices>0&&Oi.verticalTextBox)for(var Sd=0,py=ne.writingModes;Sd0&&(Vd=Vd.filter(function(vc){return vc!==Ad.anchor}),Vd.unshift(Ad.anchor))}var Pv=function(vc,tu,Sd){for(var py=vc.x2-vc.x1,L1=vc.y2-vc.y1,wu=Ei.textBoxScale,Kx=Dt&&!Ut?tu:null,lm={box:[],offscreen:!1},Bw=Ft?Vd.length*2:Vd.length,Rv=0;Rv=Vd.length,Jx=K.attemptAnchorPlacement(um,vc,py,L1,wu,zt,_t,cr,Oe,st,Nw,Ei,ne,Sd,Kx);if(Jx&&(lm=Jx.placedGlyphBoxes,lm&&lm.box&&lm.box.length)){Gi=!0,Ja=Jx.shift;break}}return lm},Jv=function(){return Pv(wd,Oi.iconBox,i.WritingMode.horizontal)},Iv=function(){var vc=Oi.verticalTextBox,tu=co&&co.box&&co.box.length;return ne.allowVerticalPlacement&&!tu&&Ei.numVerticalGlyphVertices>0&&vc?Pv(vc,Oi.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};hg(Jv,Iv),co&&(Gi=co.box,zn=co.offscreen);var hy=Kv(co&&co.box);if(!Gi&&K.prevPlacement){var dg=K.prevPlacement.variableOffsets[Ei.crossTileID];dg&&(K.variableOffsets[Ei.crossTileID]=dg,K.markUsedJustification(ne,dg.anchor,Ei,hy))}}else{var gp=function(vc,tu){var Sd=K.collisionIndex.placeCollisionBox(vc,Ft,cr,Oe,st.predicate);return Sd&&Sd.box&&Sd.box.length&&(K.markUsedOrientation(ne,tu,Ei),K.placedOrientations[Ei.crossTileID]=tu),Sd},Td=function(){return gp(wd,i.WritingMode.horizontal)},mp=function(){var vc=Oi.verticalTextBox;return ne.allowVerticalPlacement&&Ei.numVerticalGlyphVertices>0&&vc?gp(vc,i.WritingMode.vertical):{box:null,offscreen:null}};hg(Td,mp),Kv(co&&co.box&&co.box.length)}}if(so=co,Gi=so&&so.box&&so.box.length>0,zn=so&&so.offscreen,Ei.useRuntimeCollisionCircles){var oh=ne.text.placedSymbolArray.get(Ei.centerJustifiedTextSymbolIndex),vg=i.evaluateSizeForFeature(ne.textSizeData,$e,oh),dy=we.get("text-padding"),Zh=Ei.collisionCircleDiameter;Yo=K.collisionIndex.placeCollisionCircles(Ft,oh,ne.lineVertexArray,ne.glyphOffsetArray,vg,Oe,ht,Yt,O,_t,st.predicate,Zh,dy),Gi=Ft||Yo.circles.length>0&&!Yo.collisionDetected,zn=zn&&Yo.offscreen}if(Oi.iconFeatureIndex&&(Lv=Oi.iconFeatureIndex),Oi.iconBox){var am=function(vc){var tu=Dt&&Ja?nc(vc,Ja.x,Ja.y,zt,_t,K.transform.angle):vc;return K.collisionIndex.placeCollisionBox(tu,Ut,cr,Oe,st.predicate)};ts&&ts.box&&ts.box.length&&Oi.verticalIconBox?(ms=am(Oi.verticalIconBox),on=ms.box.length>0):(ms=am(Oi.iconBox),on=ms.box.length>0),zn=zn&&ms.offscreen}var k1=It||Ei.numHorizontalGlyphVertices===0&&Ei.numVerticalGlyphVertices===0,C1=Bt||Ei.numIconVertices===0;if(!k1&&!C1?on=Gi=on&&Gi:C1?k1||(on=on&&Gi):Gi=on&&Gi,Gi&&so&&so.box&&(ts&&ts.box&&Cv?K.collisionIndex.insertCollisionBox(so.box,we.get("text-ignore-placement"),ne.bucketInstanceId,Cv,st.ID):K.collisionIndex.insertCollisionBox(so.box,we.get("text-ignore-placement"),ne.bucketInstanceId,ou,st.ID)),on&&ms&&K.collisionIndex.insertCollisionBox(ms.box,we.get("icon-ignore-placement"),ne.bucketInstanceId,Lv,st.ID),Yo&&(Gi&&K.collisionIndex.insertCollisionCircles(Yo.circles,we.get("text-ignore-placement"),ne.bucketInstanceId,ou,st.ID),O)){var vy=ne.bucketInstanceId,om=K.collisionCircleArrays[vy];om===void 0&&(om=K.collisionCircleArrays[vy]=new Io);for(var sm=0;sm=0;--ci){var bi=Di[ci];Br(ne.symbolInstances.get(bi),ne.collisionArrays[bi])}else for(var gn=D.symbolInstanceStart;gn=0&&(ne>=0&&Yt!==ne?D.text.placedSymbolArray.get(Yt).crossTileID=0:D.text.placedSymbolArray.get(Yt).crossTileID=O.crossTileID)}},bs.prototype.markUsedOrientation=function(D,J,O){for(var K=J===i.WritingMode.horizontal||J===i.WritingMode.horizontalOnly?J:0,de=J===i.WritingMode.vertical?J:0,ne=[O.leftJustifiedTextSymbolIndex,O.centerJustifiedTextSymbolIndex,O.rightJustifiedTextSymbolIndex],we=0,Oe=ne;we0||_t>0,Br=Ut.numIconVertices>0,Di=K.placedOrientations[Ut.crossTileID],ci=Di===i.WritingMode.vertical,bi=Di===i.WritingMode.horizontal||Di===i.WritingMode.horizontalOnly;if(_r){var gn=ac(lr.text),tn=ci?oa:gn;$e(D.text,zt,tn);var Ei=bi?oa:gn;$e(D.text,_t,Ei);var Oi=lr.text.isHidden();[Ut.rightJustifiedTextSymbolIndex,Ut.centerJustifiedTextSymbolIndex,Ut.leftJustifiedTextSymbolIndex].forEach(function(Lv){Lv>=0&&(D.text.placedSymbolArray.get(Lv).hidden=Oi||ci?1:0)}),Ut.verticalPlacedTextSymbolIndex>=0&&(D.text.placedSymbolArray.get(Ut.verticalPlacedTextSymbolIndex).hidden=Oi||bi?1:0);var Gi=K.variableOffsets[Ut.crossTileID];Gi&&K.markUsedJustification(D,Gi.anchor,Ut,Di);var on=K.placedOrientations[Ut.crossTileID];on&&(K.markUsedJustification(D,"left",Ut,on),K.markUsedOrientation(D,on,Ut))}if(Br){var zn=ac(lr.icon),Ja=!(Nt&&Ut.verticalPlacedIconSymbolIndex&&ci);if(Ut.placedIconSymbolIndex>=0){var co=Ja?zn:oa;$e(D.icon,Ut.numIconVertices,co),D.icon.placedSymbolArray.get(Ut.placedIconSymbolIndex).hidden=lr.icon.isHidden()}if(Ut.verticalPlacedIconSymbolIndex>=0){var ts=Ja?oa:zn;$e(D.icon,Ut.numVerticalIconVertices,ts),D.icon.placedSymbolArray.get(Ut.verticalPlacedIconSymbolIndex).hidden=lr.icon.isHidden()}}if(D.hasIconCollisionBoxData()||D.hasTextCollisionBoxData()){var so=D.collisionArrays[Ft];if(so){var Yo=new i.Point(0,0);if(so.textBox||so.verticalTextBox){var ms=!0;if(ht){var ou=K.variableOffsets[Dt];ou?(Yo=Su(ou.anchor,ou.width,ou.height,ou.textOffset,ou.textBoxScale),Yt&&Yo._rotate(cr?K.transform.angle:-K.transform.angle)):ms=!1}so.textBox&&Rn(D.textCollisionBox.collisionVertexArray,lr.text.placed,!ms||ci,Yo.x,Yo.y),so.verticalTextBox&&Rn(D.textCollisionBox.collisionVertexArray,lr.text.placed,!ms||bi,Yo.x,Yo.y)}var Cv=!!(!bi&&so.verticalIconBox);so.iconBox&&Rn(D.iconCollisionBox.collisionVertexArray,lr.icon.placed,Cv,Nt?Yo.x:0,Nt?Yo.y:0),so.verticalIconBox&&Rn(D.iconCollisionBox.collisionVertexArray,lr.icon.placed,!Cv,Nt?Yo.x:0,Nt?Yo.y:0)}}},It=0;ItD},bs.prototype.setStale=function(){this.stale=!0};function Rn(Y,D,J,O,K){Y.emplaceBack(D?1:0,J?1:0,O||0,K||0),Y.emplaceBack(D?1:0,J?1:0,O||0,K||0),Y.emplaceBack(D?1:0,J?1:0,O||0,K||0),Y.emplaceBack(D?1:0,J?1:0,O||0,K||0)}var _a=Math.pow(2,25),Vu=Math.pow(2,24),ql=Math.pow(2,17),xo=Math.pow(2,16),Kl=Math.pow(2,9),Ns=Math.pow(2,8),Hl=Math.pow(2,1);function ac(Y){if(Y.opacity===0&&!Y.placed)return 0;if(Y.opacity===1&&Y.placed)return 4294967295;var D=Y.placed?1:0,J=Math.floor(Y.opacity*127);return J*_a+D*Vu+J*ql+D*xo+J*Kl+D*Ns+J*Hl+D}var oa=0,qo=function(D){this._sortAcrossTiles=D.layout.get("symbol-z-order")!=="viewport-y"&&D.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};qo.prototype.continuePlacement=function(D,J,O,K,de){for(var ne=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var we=D[this._currentPlacementIndex],Oe=J[we],ht=this.placement.collisionIndex.transform.zoom;if(Oe.type==="symbol"&&(!Oe.minzoom||Oe.minzoom<=ht)&&(!Oe.maxzoom||Oe.maxzoom>ht)){this._inProgressLayer||(this._inProgressLayer=new qo(Oe));var Yt=this._inProgressLayer.continuePlacement(O[Oe.source],this.placement,this._showCollisionBoxes,Oe,ne);if(Yt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Oo.prototype.commit=function(D){return this.placement.commit(D),this.placement};var Ol=512/i.EXTENT/2,Pc=function(D,J,O){this.tileID=D,this.indexedSymbolInstances={},this.bucketInstanceId=O;for(var K=0;KD.overscaledZ)for(var ht in Oe){var Yt=Oe[ht];Yt.tileID.isChildOf(D)&&Yt.findMatches(J.symbolInstances,D,ne)}else{var cr=D.scaledTo(Number(we)),Nt=Oe[cr.key];Nt&&Nt.findMatches(J.symbolInstances,D,ne)}}for(var Ne=0;Ne0)throw new Error("Unimplemented: "+ne.map(function(we){return we.command}).join(", ")+".");return de.forEach(function(we){we.command!=="setTransition"&&K[we.command].apply(K,we.args)}),this.stylesheet=O,!0},D.prototype.addImage=function(O,K){if(this.getImage(O))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(O,K),this._afterImageUpdated(O)},D.prototype.updateImage=function(O,K){this.imageManager.updateImage(O,K)},D.prototype.getImage=function(O){return this.imageManager.getImage(O)},D.prototype.removeImage=function(O){if(!this.getImage(O))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(O),this._afterImageUpdated(O)},D.prototype._afterImageUpdated=function(O){this._availableImages=this.imageManager.listImages(),this._changedImages[O]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new i.Event("data",{dataType:"style"}))},D.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},D.prototype.addSource=function(O,K,de){var ne=this;if(de===void 0&&(de={}),this._checkLoaded(),this.sourceCaches[O]!==void 0)throw new Error("There is already a source with this ID");if(!K.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(K).join(", ")+".");var we=["vector","raster","geojson","video","image"],Oe=we.indexOf(K.type)>=0;if(!(Oe&&this._validate(i.validateStyle.source,"sources."+O,K,null,de))){this.map&&this.map._collectResourceTiming&&(K.collectResourceTiming=!0);var ht=this.sourceCaches[O]=new ti(O,K,this.dispatcher);ht.style=this,ht.setEventedParent(this,function(){return{isSourceLoaded:ne.loaded(),source:ht.serialize(),sourceId:O}}),ht.onAdd(this.map),this._changed=!0}},D.prototype.removeSource=function(O){if(this._checkLoaded(),this.sourceCaches[O]===void 0)throw new Error("There is no source with this ID");for(var K in this._layers)if(this._layers[K].source===O)return this.fire(new i.ErrorEvent(new Error('Source "'+O+'" cannot be removed while layer "'+K+'" is using it.')));var de=this.sourceCaches[O];delete this.sourceCaches[O],delete this._updatedSources[O],de.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:O})),de.setEventedParent(null),de.clearTiles(),de.onRemove&&de.onRemove(this.map),this._changed=!0},D.prototype.setGeoJSONSourceData=function(O,K){this._checkLoaded();var de=this.sourceCaches[O].getSource();de.setData(K),this._changed=!0},D.prototype.getSource=function(O){return this.sourceCaches[O]&&this.sourceCaches[O].getSource()},D.prototype.addLayer=function(O,K,de){de===void 0&&(de={}),this._checkLoaded();var ne=O.id;if(this.getLayer(ne)){this.fire(new i.ErrorEvent(new Error('Layer with id "'+ne+'" already exists on this map')));return}var we;if(O.type==="custom"){if(pl(this,i.validateCustomStyleLayer(O)))return;we=i.createStyleLayer(O)}else{if(typeof O.source=="object"&&(this.addSource(ne,O.source),O=i.clone$1(O),O=i.extend(O,{source:ne})),this._validate(i.validateStyle.layer,"layers."+ne,O,{arrayIndex:-1},de))return;we=i.createStyleLayer(O),this._validateLayer(we),we.setEventedParent(this,{layer:{id:ne}}),this._serializedLayers[we.id]=we.serialize()}var Oe=K?this._order.indexOf(K):this._order.length;if(K&&Oe===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+K+'" does not exist on this map.')));return}if(this._order.splice(Oe,0,ne),this._layerOrderChanged=!0,this._layers[ne]=we,this._removedLayers[ne]&&we.source&&we.type!=="custom"){var ht=this._removedLayers[ne];delete this._removedLayers[ne],ht.type!==we.type?this._updatedSources[we.source]="clear":(this._updatedSources[we.source]="reload",this.sourceCaches[we.source].pause())}this._updateLayer(we),we.onAdd&&we.onAdd(this.map)},D.prototype.moveLayer=function(O,K){this._checkLoaded(),this._changed=!0;var de=this._layers[O];if(!de){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be moved.")));return}if(O!==K){var ne=this._order.indexOf(O);this._order.splice(ne,1);var we=K?this._order.indexOf(K):this._order.length;if(K&&we===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+K+'" does not exist on this map.')));return}this._order.splice(we,0,O),this._layerOrderChanged=!0}},D.prototype.removeLayer=function(O){this._checkLoaded();var K=this._layers[O];if(!K){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be removed.")));return}K.setEventedParent(null);var de=this._order.indexOf(O);this._order.splice(de,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[O]=K,delete this._layers[O],delete this._serializedLayers[O],delete this._updatedLayers[O],delete this._updatedPaintProps[O],K.onRemove&&K.onRemove(this.map)},D.prototype.getLayer=function(O){return this._layers[O]},D.prototype.hasLayer=function(O){return O in this._layers},D.prototype.setLayerZoomRange=function(O,K,de){this._checkLoaded();var ne=this.getLayer(O);if(!ne){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot have zoom extent.")));return}ne.minzoom===K&&ne.maxzoom===de||(K!=null&&(ne.minzoom=K),de!=null&&(ne.maxzoom=de),this._updateLayer(ne))},D.prototype.setFilter=function(O,K,de){de===void 0&&(de={}),this._checkLoaded();var ne=this.getLayer(O);if(!ne){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be filtered.")));return}if(!i.deepEqual(ne.filter,K)){if(K==null){ne.filter=void 0,this._updateLayer(ne);return}this._validate(i.validateStyle.filter,"layers."+ne.id+".filter",K,null,de)||(ne.filter=i.clone$1(K),this._updateLayer(ne))}},D.prototype.getFilter=function(O){return i.clone$1(this.getLayer(O).filter)},D.prototype.setLayoutProperty=function(O,K,de,ne){ne===void 0&&(ne={}),this._checkLoaded();var we=this.getLayer(O);if(!we){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be styled.")));return}i.deepEqual(we.getLayoutProperty(K),de)||(we.setLayoutProperty(K,de,ne),this._updateLayer(we))},D.prototype.getLayoutProperty=function(O,K){var de=this.getLayer(O);if(!de){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style.")));return}return de.getLayoutProperty(K)},D.prototype.setPaintProperty=function(O,K,de,ne){ne===void 0&&(ne={}),this._checkLoaded();var we=this.getLayer(O);if(!we){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be styled.")));return}if(!i.deepEqual(we.getPaintProperty(K),de)){var Oe=we.setPaintProperty(K,de,ne);Oe&&this._updateLayer(we),this._changed=!0,this._updatedPaintProps[O]=!0}},D.prototype.getPaintProperty=function(O,K){return this.getLayer(O).getPaintProperty(K)},D.prototype.setFeatureState=function(O,K){this._checkLoaded();var de=O.source,ne=O.sourceLayer,we=this.sourceCaches[de];if(we===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+de+"' does not exist in the map's style.")));return}var Oe=we.getSource().type;if(Oe==="geojson"&&ne){this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Oe==="vector"&&!ne){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}O.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),we.setFeatureState(ne,O.id,K)},D.prototype.removeFeatureState=function(O,K){this._checkLoaded();var de=O.source,ne=this.sourceCaches[de];if(ne===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+de+"' does not exist in the map's style.")));return}var we=ne.getSource().type,Oe=we==="vector"?O.sourceLayer:void 0;if(we==="vector"&&!Oe){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(K&&typeof O.id!="string"&&typeof O.id!="number"){this.fire(new i.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}ne.removeFeatureState(Oe,O.id,K)},D.prototype.getFeatureState=function(O){this._checkLoaded();var K=O.source,de=O.sourceLayer,ne=this.sourceCaches[K];if(ne===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+K+"' does not exist in the map's style.")));return}var we=ne.getSource().type;if(we==="vector"&&!de){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return O.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),ne.getFeatureState(de,O.id)},D.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},D.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(O){return O.serialize()}),layers:this._serializeLayers(this._order)},function(O){return O!==void 0})},D.prototype._updateLayer=function(O){this._updatedLayers[O.id]=!0,O.source&&!this._updatedSources[O.source]&&this.sourceCaches[O.source].getSource().type!=="raster"&&(this._updatedSources[O.source]="reload",this.sourceCaches[O.source].pause()),this._changed=!0},D.prototype._flattenAndSortRenderedFeatures=function(O){for(var K=this,de=function(bi){return K._layers[bi].type==="fill-extrusion"},ne={},we=[],Oe=this._order.length-1;Oe>=0;Oe--){var ht=this._order[Oe];if(de(ht)){ne[ht]=Oe;for(var Yt=0,cr=O;Yt=0;Ft--){var Ut=this._order[Ft];if(de(Ut))for(var zt=we.length-1;zt>=0;zt--){var _t=we[zt].feature;if(ne[_t.layer.id] 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`,Bl=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Ah=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 +? a_pos +: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,Qf=`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,_f="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",Yc=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; +#define PI 3.141592653589793 +void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,eh="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",th=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,ju=` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,jf=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,cc=` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,sf=`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Nl=` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`,Kc=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Rc=` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`,gs=`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Wf="uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}",Wh=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,rh=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`,lf=`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,Sh=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`,Mu=`#define SDF_PX 8.0 +#define SDF 1.0 +#define ICON 0.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,ih=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,js=Us(Cf,sc),Eu=Us(jh,Lf),Dc=Us(cs,af),ks=Us(Gf,$l),bc=Us(fl,lc),hu=Us(Fu,Es),_u=Us(Hs,Go),nl=Us(ps,uc),nh=Us(xl,Gu),Mh=Us(Os,od),zu=Us(Po,sd),Fc=Us(Ko,Pa),wc=Us(of,Hu),bd=Us(bl,Hf),xf=Us(Ic,yf),Pf=Us(Bl,Ah),qu=Us(Qf,_f),bf=Us(Yc,eh),jl=Us(th,ju),uf=Us(jf,cc),Xh=Us(sf,Nl),If=Us(Kc,Rc),Cs=Us(gs,Wf),du=Us(Wh,rh),ku=Us(lf,Sh),Xf=Us(Mu,ih);function Us(Y,D){var J=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,O=D.match(/attribute ([\w]+) ([\w]+)/g),K=Y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),de=D.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ne=de?de.concat(K):K,we={};return Y=Y.replace(J,function(Oe,ht,Yt,cr,Nt){return we[Nt]=!0,ht==="define"?` +#ifndef HAS_UNIFORM_u_`+Nt+` +varying `+Yt+" "+cr+" "+Nt+`; +#else +uniform `+Yt+" "+cr+" u_"+Nt+`; +#endif +`:` +#ifdef HAS_UNIFORM_u_`+Nt+` + `+Yt+" "+cr+" "+Nt+" = u_"+Nt+`; +#endif +`}),D=D.replace(J,function(Oe,ht,Yt,cr,Nt){var Ne=cr==="float"?"vec2":"vec4",$e=Nt.match(/color/)?"color":Ne;return we[Nt]?ht==="define"?` +#ifndef HAS_UNIFORM_u_`+Nt+` +uniform lowp float u_`+Nt+`_t; +attribute `+Yt+" "+Ne+" a_"+Nt+`; +varying `+Yt+" "+cr+" "+Nt+`; +#else +uniform `+Yt+" "+cr+" u_"+Nt+`; +#endif +`:$e==="vec4"?` +#ifndef HAS_UNIFORM_u_`+Nt+` + `+Nt+" = a_"+Nt+`; +#else + `+Yt+" "+cr+" "+Nt+" = u_"+Nt+`; +#endif +`:` +#ifndef HAS_UNIFORM_u_`+Nt+` + `+Nt+" = unpack_mix_"+$e+"(a_"+Nt+", u_"+Nt+`_t); +#else + `+Yt+" "+cr+" "+Nt+" = u_"+Nt+`; +#endif +`:ht==="define"?` +#ifndef HAS_UNIFORM_u_`+Nt+` +uniform lowp float u_`+Nt+`_t; +attribute `+Yt+" "+Ne+" a_"+Nt+`; +#else +uniform `+Yt+" "+cr+" u_"+Nt+`; +#endif +`:$e==="vec4"?` +#ifndef HAS_UNIFORM_u_`+Nt+` + `+Yt+" "+cr+" "+Nt+" = a_"+Nt+`; +#else + `+Yt+" "+cr+" "+Nt+" = u_"+Nt+`; +#endif +`:` +#ifndef HAS_UNIFORM_u_`+Nt+` + `+Yt+" "+cr+" "+Nt+" = unpack_mix_"+$e+"(a_"+Nt+", u_"+Nt+`_t); +#else + `+Yt+" "+cr+" "+Nt+" = u_"+Nt+`; +#endif +`}),{fragmentSource:Y,vertexSource:D,staticAttributes:O,staticUniforms:ne}}var wf=Object.freeze({__proto__:null,prelude:js,background:Eu,backgroundPattern:Dc,circle:ks,clippingMask:bc,heatmap:hu,heatmapTexture:_u,collisionBox:nl,collisionCircle:nh,debug:Mh,fill:zu,fillOutline:Fc,fillOutlinePattern:wc,fillPattern:bd,fillExtrusion:xf,fillExtrusionPattern:Pf,hillshadePrepare:qu,hillshade:bf,line:jl,lineGradient:uf,linePattern:Xh,lineSDF:If,raster:Cs,symbolIcon:du,symbolSDF:ku,symbolTextAndIcon:Xf}),zc=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};zc.prototype.bind=function(D,J,O,K,de,ne,we,Oe){this.context=D;for(var ht=this.boundPaintVertexBuffers.length!==K.length,Yt=0;!ht&&Yt>16,we>>16],u_pixel_coord_lower:[ne&65535,we&65535]}}function cf(Y,D,J,O){var K=J.imageManager.getPattern(Y.from.toString()),de=J.imageManager.getPattern(Y.to.toString()),ne=J.imageManager.getPixelSize(),we=ne.width,Oe=ne.height,ht=Math.pow(2,O.tileID.overscaledZ),Yt=O.tileSize*Math.pow(2,J.transform.tileZoom)/ht,cr=Yt*(O.tileID.canonical.x+O.tileID.wrap*ht),Nt=Yt*O.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:K.tl,u_pattern_br_a:K.br,u_pattern_tl_b:de.tl,u_pattern_br_b:de.br,u_texsize:[we,Oe],u_mix:D.t,u_pattern_size_a:K.displaySize,u_pattern_size_b:de.displaySize,u_scale_a:D.fromScale,u_scale_b:D.toScale,u_tile_units_to_pixels:1/As(O,1,J.transform.tileZoom),u_pixel_coord_upper:[cr>>16,Nt>>16],u_pixel_coord_lower:[cr&65535,Nt&65535]}}var Zf=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_lightpos:new i.Uniform3f(Y,D.u_lightpos),u_lightintensity:new i.Uniform1f(Y,D.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,D.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,D.u_vertical_gradient),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},Wl=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_lightpos:new i.Uniform3f(Y,D.u_lightpos),u_lightintensity:new i.Uniform1f(Y,D.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,D.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,D.u_vertical_gradient),u_height_factor:new i.Uniform1f(Y,D.u_height_factor),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},ah=function(Y,D,J,O){var K=D.style.light,de=K.properties.get("position"),ne=[de.x,de.y,de.z],we=i.create$1();K.properties.get("anchor")==="viewport"&&i.fromRotation(we,-D.transform.angle),i.transformMat3(ne,ne,we);var Oe=K.properties.get("color");return{u_matrix:Y,u_lightpos:ne,u_lightintensity:K.properties.get("intensity"),u_lightcolor:[Oe.r,Oe.g,Oe.b],u_vertical_gradient:+J,u_opacity:O}},Zu=function(Y,D,J,O,K,de,ne){return i.extend(ah(Y,D,J,O),Xu(de,D,ne),{u_height_factor:-Math.pow(2,K.overscaledZ)/ne.tileSize/8})},qc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Tc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},wl=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world)}},vu=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},Oc=function(Y){return{u_matrix:Y}},ff=function(Y,D,J,O){return i.extend(Oc(Y),Xu(J,D,O))},fc=function(Y,D){return{u_matrix:Y,u_world:D}},Bc=function(Y,D,J,O,K){return i.extend(ff(Y,D,J,O),{u_world:K})},kt=function(Y,D){return{u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(Y,D.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(Y,D.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Zt=function(Y,D,J,O){var K=Y.transform,de,ne;if(O.paint.get("circle-pitch-alignment")==="map"){var we=As(J,1,K.zoom);de=!0,ne=[we,we]}else de=!1,ne=K.pixelsToGLUnits;return{u_camera_to_center_distance:K.cameraToCenterDistance,u_scale_with_map:+(O.paint.get("circle-pitch-scale")==="map"),u_matrix:Y.translatePosMatrix(D.posMatrix,J,O.paint.get("circle-translate"),O.paint.get("circle-translate-anchor")),u_pitch_with_map:+de,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:ne}},Er=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(Y,D.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(Y,D.u_extrude_scale),u_overscale_factor:new i.Uniform1f(Y,D.u_overscale_factor)}},xr=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_inv_matrix:new i.UniformMatrix4f(Y,D.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(Y,D.u_viewport_size)}},Kr=function(Y,D,J){var O=As(J,1,D.zoom),K=Math.pow(2,D.zoom-J.tileID.overscaledZ),de=J.tileID.overscaleFactor();return{u_matrix:Y,u_camera_to_center_distance:D.cameraToCenterDistance,u_pixels_to_tile_units:O,u_extrude_scale:[D.pixelsToGLUnits[0]/(O*K),D.pixelsToGLUnits[1]/(O*K)],u_overscale_factor:de}},Mi=function(Y,D,J){return{u_matrix:Y,u_inv_matrix:D,u_camera_to_center_distance:J.cameraToCenterDistance,u_viewport_size:[J.width,J.height]}},Wi=function(Y,D){return{u_color:new i.UniformColor(Y,D.u_color),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_overlay:new i.Uniform1i(Y,D.u_overlay),u_overlay_scale:new i.Uniform1f(Y,D.u_overlay_scale)}},dn=function(Y,D,J){return J===void 0&&(J=1),{u_matrix:Y,u_color:D,u_overlay:0,u_overlay_scale:J}},wn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},On=function(Y){return{u_matrix:Y}},Yi=function(Y,D){return{u_extrude_scale:new i.Uniform1f(Y,D.u_extrude_scale),u_intensity:new i.Uniform1f(Y,D.u_intensity),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},$i=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world),u_image:new i.Uniform1i(Y,D.u_image),u_color_ramp:new i.Uniform1i(Y,D.u_color_ramp),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},an=function(Y,D,J,O){return{u_matrix:Y,u_extrude_scale:As(D,1,J),u_intensity:O}},Fi=function(Y,D,J,O){var K=i.create();i.ortho(K,0,Y.width,Y.height,0,0,1);var de=Y.context.gl;return{u_matrix:K,u_world:[de.drawingBufferWidth,de.drawingBufferHeight],u_image:J,u_color_ramp:O,u_opacity:D.paint.get("heatmap-opacity")}},ta=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_latrange:new i.Uniform2f(Y,D.u_latrange),u_light:new i.Uniform2f(Y,D.u_light),u_shadow:new i.UniformColor(Y,D.u_shadow),u_highlight:new i.UniformColor(Y,D.u_highlight),u_accent:new i.UniformColor(Y,D.u_accent)}},Ca=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_dimension:new i.Uniform2f(Y,D.u_dimension),u_zoom:new i.Uniform1f(Y,D.u_zoom),u_unpack:new i.Uniform4f(Y,D.u_unpack)}},Ra=function(Y,D,J){var O=J.paint.get("hillshade-shadow-color"),K=J.paint.get("hillshade-highlight-color"),de=J.paint.get("hillshade-accent-color"),ne=J.paint.get("hillshade-illumination-direction")*(Math.PI/180);J.paint.get("hillshade-illumination-anchor")==="viewport"&&(ne-=Y.transform.angle);var we=!Y.options.moving;return{u_matrix:Y.transform.calculatePosMatrix(D.tileID.toUnwrapped(),we),u_image:0,u_latrange:Ua(Y,D.tileID),u_light:[J.paint.get("hillshade-exaggeration"),ne],u_shadow:O,u_highlight:K,u_accent:de}},La=function(Y,D){var J=D.stride,O=i.create();return i.ortho(O,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(O,O,[0,-i.EXTENT,0]),{u_matrix:O,u_image:1,u_dimension:[J,J],u_zoom:Y.overscaledZ,u_unpack:D.getUnpackVector()}};function Ua(Y,D){var J=Math.pow(2,D.canonical.z),O=D.canonical.y;return[new i.MercatorCoordinate(0,O/J).toLngLat().lat,new i.MercatorCoordinate(0,(O+1)/J).toLngLat().lat]}var Zn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels)}},Dn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_image:new i.Uniform1i(Y,D.u_image),u_image_height:new i.Uniform1f(Y,D.u_image_height)}},Ka=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_image:new i.Uniform1i(Y,D.u_image),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},bo=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(Y,D.u_patternscale_a),u_patternscale_b:new i.Uniform2f(Y,D.u_patternscale_b),u_sdfgamma:new i.Uniform1f(Y,D.u_sdfgamma),u_image:new i.Uniform1i(Y,D.u_image),u_tex_y_a:new i.Uniform1f(Y,D.u_tex_y_a),u_tex_y_b:new i.Uniform1f(Y,D.u_tex_y_b),u_mix:new i.Uniform1f(Y,D.u_mix)}},Zo=function(Y,D,J){var O=Y.transform;return{u_matrix:ml(Y,D,J),u_ratio:1/As(D,1,O.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/O.pixelsToGLUnits[0],1/O.pixelsToGLUnits[1]]}},Ss=function(Y,D,J,O){return i.extend(Zo(Y,D,J),{u_image:0,u_image_height:O})},as=function(Y,D,J,O){var K=Y.transform,de=Ho(D,K);return{u_matrix:ml(Y,D,J),u_texsize:D.imageAtlasTexture.size,u_ratio:1/As(D,1,K.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[de,O.fromScale,O.toScale],u_fade:O.t,u_units_to_pixels:[1/K.pixelsToGLUnits[0],1/K.pixelsToGLUnits[1]]}},ws=function(Y,D,J,O,K){var de=Y.transform,ne=Y.lineAtlas,we=Ho(D,de),Oe=J.layout.get("line-cap")==="round",ht=ne.getDash(O.from,Oe),Yt=ne.getDash(O.to,Oe),cr=ht.width*K.fromScale,Nt=Yt.width*K.toScale;return i.extend(Zo(Y,D,J),{u_patternscale_a:[we/cr,-ht.height/2],u_patternscale_b:[we/Nt,-Yt.height/2],u_sdfgamma:ne.width/(Math.min(cr,Nt)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:ht.y,u_tex_y_b:Yt.y,u_mix:K.t})};function Ho(Y,D){return 1/As(Y,1,D.tileZoom)}function ml(Y,D,J){return Y.translatePosMatrix(D.tileID.posMatrix,D,J.paint.get("line-translate"),J.paint.get("line-translate-anchor"))}var Ws=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_tl_parent:new i.Uniform2f(Y,D.u_tl_parent),u_scale_parent:new i.Uniform1f(Y,D.u_scale_parent),u_buffer_scale:new i.Uniform1f(Y,D.u_buffer_scale),u_fade_t:new i.Uniform1f(Y,D.u_fade_t),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_image0:new i.Uniform1i(Y,D.u_image0),u_image1:new i.Uniform1i(Y,D.u_image1),u_brightness_low:new i.Uniform1f(Y,D.u_brightness_low),u_brightness_high:new i.Uniform1f(Y,D.u_brightness_high),u_saturation_factor:new i.Uniform1f(Y,D.u_saturation_factor),u_contrast_factor:new i.Uniform1f(Y,D.u_contrast_factor),u_spin_weights:new i.Uniform3f(Y,D.u_spin_weights)}},Ls=function(Y,D,J,O,K){return{u_matrix:Y,u_tl_parent:D,u_scale_parent:J,u_buffer_scale:1,u_fade_t:O.mix,u_opacity:O.opacity*K.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:K.paint.get("raster-brightness-min"),u_brightness_high:K.paint.get("raster-brightness-max"),u_saturation_factor:ys(K.paint.get("raster-saturation")),u_contrast_factor:no(K.paint.get("raster-contrast")),u_spin_weights:va(K.paint.get("raster-hue-rotate"))}};function va(Y){Y*=Math.PI/180;var D=Math.sin(Y),J=Math.cos(Y);return[(2*J+1)/3,(-Math.sqrt(3)*D-J+1)/3,(Math.sqrt(3)*D-J+1)/3]}function no(Y){return Y>0?1/(1-Y):1+Y}function ys(Y){return Y>0?1-1/(1.001-Y):-Y}var rs=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texture:new i.Uniform1i(Y,D.u_texture)}},Ql=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texture:new i.Uniform1i(Y,D.u_texture),u_gamma_scale:new i.Uniform1f(Y,D.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,D.u_is_halo)}},Cu=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texsize_icon:new i.Uniform2f(Y,D.u_texsize_icon),u_texture:new i.Uniform1i(Y,D.u_texture),u_texture_icon:new i.Uniform1i(Y,D.u_texture_icon),u_gamma_scale:new i.Uniform1f(Y,D.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,D.u_is_halo)}},Yu=function(Y,D,J,O,K,de,ne,we,Oe,ht){var Yt=K.transform;return{u_is_size_zoom_constant:+(Y==="constant"||Y==="source"),u_is_size_feature_constant:+(Y==="constant"||Y==="camera"),u_size_t:D?D.uSizeT:0,u_size:D?D.uSize:0,u_camera_to_center_distance:Yt.cameraToCenterDistance,u_pitch:Yt.pitch/360*2*Math.PI,u_rotate_symbol:+J,u_aspect_ratio:Yt.width/Yt.height,u_fade_change:K.options.fadeDuration?K.symbolFadeChange:1,u_matrix:de,u_label_plane_matrix:ne,u_coord_matrix:we,u_is_text:+Oe,u_pitch_with_map:+O,u_texsize:ht,u_texture:0}},Nc=function(Y,D,J,O,K,de,ne,we,Oe,ht,Yt){var cr=K.transform;return i.extend(Yu(Y,D,J,O,K,de,ne,we,Oe,ht),{u_gamma_scale:O?Math.cos(cr._pitch)*cr.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+Yt})},pu=function(Y,D,J,O,K,de,ne,we,Oe,ht){return i.extend(Nc(Y,D,J,O,K,de,ne,we,!0,Oe,!0),{u_texsize_icon:ht,u_texture_icon:1})},Uc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_color:new i.UniformColor(Y,D.u_color)}},xu=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_image:new i.Uniform1i(Y,D.u_image),u_pattern_tl_a:new i.Uniform2f(Y,D.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(Y,D.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(Y,D.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(Y,D.u_pattern_br_b),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_mix:new i.Uniform1f(Y,D.u_mix),u_pattern_size_a:new i.Uniform2f(Y,D.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(Y,D.u_pattern_size_b),u_scale_a:new i.Uniform1f(Y,D.u_scale_a),u_scale_b:new i.Uniform1f(Y,D.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(Y,D.u_tile_units_to_pixels)}},Ac=function(Y,D,J){return{u_matrix:Y,u_opacity:D,u_color:J}},Va=function(Y,D,J,O,K,de){return i.extend(cf(O,de,J,K),{u_matrix:Y,u_opacity:D})},oo={fillExtrusion:Zf,fillExtrusionPattern:Wl,fill:qc,fillPattern:Tc,fillOutline:wl,fillOutlinePattern:vu,circle:kt,collisionBox:Er,collisionCircle:xr,debug:Wi,clippingMask:wn,heatmap:Yi,heatmapTexture:$i,hillshade:ta,hillshadePrepare:Ca,line:Zn,lineGradient:Dn,linePattern:Ka,lineSDF:bo,raster:Ws,symbolIcon:rs,symbolSDF:Ql,symbolTextAndIcon:Cu,background:Uc,backgroundPattern:xu},Vc;function hc(Y,D,J,O,K,de,ne){for(var we=Y.context,Oe=we.gl,ht=Y.useProgram("collisionBox"),Yt=[],cr=0,Nt=0,Ne=0;Ne0){var zt=i.create(),_t=Bt;i.mul(zt,It.placementInvProjMatrix,Y.transform.glCoordMatrix),i.mul(zt,zt,It.placementViewportMatrix),Yt.push({circleArray:Ut,circleOffset:Nt,transform:_t,invTransform:zt}),cr+=Ut.length/4,Nt=cr}Ft&&ht.draw(we,Oe.LINES,An.disabled,Vi.disabled,Y.colorModeForRenderPass(),wr.disabled,Kr(Bt,Y.transform,st),J.id,Ft.layoutVertexBuffer,Ft.indexBuffer,Ft.segments,null,Y.transform.zoom,null,null,Ft.collisionVertexBuffer)}}if(!(!ne||!Yt.length)){var Dt=Y.useProgram("collisionCircle"),vt=new i.StructArrayLayout2f1f2i16;vt.resize(cr*4),vt._trim();for(var lr=0,_r=0,Br=Yt;_r=0&&($e[It.associatedIconIndex]={shiftedAnchor:bi,angle:gn})}}if(Yt){Ne.clear();for(var Ei=Y.icon.placedSymbolArray,Oi=0;Oi0){var ne=i.browser.now(),we=(ne-Y.timeAdded)/de,Oe=D?(ne-D.timeAdded)/de:-1,ht=J.getSource(),Yt=K.coveringZoomLevel({tileSize:ht.tileSize,roundZoom:ht.roundZoom}),cr=!D||Math.abs(D.tileID.overscaledZ-Yt)>Math.abs(Y.tileID.overscaledZ-Yt),Nt=cr&&Y.refreshedUponExpiration?1:i.clamp(cr?we:1-Oe,0,1);return Y.refreshedUponExpiration&&we>=1&&(Y.refreshedUponExpiration=!1),D?{opacity:1,mix:1-Nt}:{opacity:Nt,mix:0}}else return{opacity:1,mix:0}}function nr(Y,D,J){var O=J.paint.get("background-color"),K=J.paint.get("background-opacity");if(K!==0){var de=Y.context,ne=de.gl,we=Y.transform,Oe=we.tileSize,ht=J.paint.get("background-pattern");if(!Y.isPatternMissing(ht)){var Yt=!ht&&O.a===1&&K===1&&Y.opaquePassEnabledForLayer()?"opaque":"translucent";if(Y.renderPass===Yt){var cr=Vi.disabled,Nt=Y.depthModeForSublayer(0,Yt==="opaque"?An.ReadWrite:An.ReadOnly),Ne=Y.colorModeForRenderPass(),$e=Y.useProgram(ht?"backgroundPattern":"background"),st=we.coveringTiles({tileSize:Oe});ht&&(de.activeTexture.set(ne.TEXTURE0),Y.imageManager.bind(Y.context));for(var It=J.getCrossfadeParameters(),Bt=0,Ft=st;Bt "+J.overscaledZ);var Bt=It+" "+Ne+"kb";$a(Y,Bt),ne.draw(O,K.TRIANGLES,we,Oe,wt.alphaBlended,wr.disabled,dn(de,i.Color.transparent,st),Yt,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments)}function $a(Y,D){Y.initDebugOverlayCanvas();var J=Y.debugOverlayCanvas,O=Y.context.gl,K=Y.debugOverlayCanvas.getContext("2d");K.clearRect(0,0,J.width,J.height),K.shadowColor="white",K.shadowBlur=2,K.lineWidth=1.5,K.strokeStyle="white",K.textBaseline="top",K.font="bold 36px Open Sans, sans-serif",K.fillText(D,5,5),K.strokeText(D,5,5),Y.debugOverlayTexture.update(J),Y.debugOverlayTexture.bind(O.LINEAR,O.CLAMP_TO_EDGE)}function Co(Y,D,J){var O=Y.context,K=J.implementation;if(Y.renderPass==="offscreen"){var de=K.prerender;de&&(Y.setCustomLayerDefaults(),O.setColorMode(Y.colorModeForRenderPass()),de.call(K,O.gl,Y.transform.customLayerMatrix()),O.setDirty(),Y.setBaseState())}else if(Y.renderPass==="translucent"){Y.setCustomLayerDefaults(),O.setColorMode(Y.colorModeForRenderPass()),O.setStencilMode(Vi.disabled);var ne=K.renderingMode==="3d"?new An(Y.context.gl.LEQUAL,An.ReadWrite,Y.depthRangeFor3D):Y.depthModeForSublayer(0,An.ReadOnly);O.setDepthMode(ne),K.render(O.gl,Y.transform.customLayerMatrix()),O.setDirty(),Y.setBaseState(),O.bindFramebuffer.set(null)}}var Qa={symbol:w,circle:ut,heatmap:Mt,line:Cr,fill:ve,"fill-extrusion":Ie,hillshade:Qe,raster:qt,background:nr,debug:Aa,custom:Co},mo=function(D,J){this.context=new Xr(D),this.transform=J,this._tileTextures={},this.setup(),this.numSublayers=ti.maxUnderzooming+ti.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Vf,this.gpuTimers={}};mo.prototype.resize=function(D,J){if(this.width=D*i.browser.devicePixelRatio,this.height=J*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var O=0,K=this.style._order;O256&&this.clearStencil(),O.setColorMode(wt.disabled),O.setDepthMode(An.disabled);var de=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ne=0,we=J;ne256&&this.clearStencil();var D=this.nextStencilID++,J=this.context.gl;return new Vi({func:J.NOTEQUAL,mask:255},D,255,J.KEEP,J.KEEP,J.REPLACE)},mo.prototype.stencilModeForClipping=function(D){var J=this.context.gl;return new Vi({func:J.EQUAL,mask:255},this._tileClippingMaskIDs[D.key],0,J.KEEP,J.KEEP,J.REPLACE)},mo.prototype.stencilConfigForOverlap=function(D){var J,O=this.context.gl,K=D.sort(function(ht,Yt){return Yt.overscaledZ-ht.overscaledZ}),de=K[K.length-1].overscaledZ,ne=K[0].overscaledZ-de+1;if(ne>1){this.currentStencilSource=void 0,this.nextStencilID+ne>256&&this.clearStencil();for(var we={},Oe=0;Oe=0;this.currentLayer--){var zt=this.style._layers[K[this.currentLayer]],_t=de[zt.source],Dt=Oe[zt.source];this._renderTileClippingMasks(zt,Dt),this.renderLayer(this,_t,zt,Dt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?J.pop():null},mo.prototype.isPatternMissing=function(D){if(!D)return!1;if(!D.from||!D.to)return!0;var J=this.imageManager.getPattern(D.from.toString()),O=this.imageManager.getPattern(D.to.toString());return!J||!O},mo.prototype.useProgram=function(D,J){this.cache=this.cache||{};var O=""+D+(J?J.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[O]||(this.cache[O]=new Rf(this.context,D,wf[D],J,oo[D],this._showOverdrawInspector)),this.cache[O]},mo.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()},mo.prototype.setBaseState=function(){var D=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(D.FUNC_ADD)},mo.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var D=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,D.RGBA)}},mo.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Bo=function(D,J){this.points=D,this.planes=J};Bo.fromInvProjectionMatrix=function(D,J,O){var K=[[-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]],de=Math.pow(2,O),ne=K.map(function(ht){return i.transformMat4([],ht,D)}).map(function(ht){return i.scale$1([],ht,1/ht[3]/J*de)}),we=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Oe=we.map(function(ht){var Yt=i.sub([],ne[ht[0]],ne[ht[1]]),cr=i.sub([],ne[ht[2]],ne[ht[1]]),Nt=i.normalize([],i.cross([],Yt,cr)),Ne=-i.dot(Nt,ne[ht[1]]);return Nt.concat(Ne)});return new Bo(ne,Oe)};var Ps=function(D,J){this.min=D,this.max=J,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};Ps.prototype.quadrant=function(D){for(var J=[D%2===0,D<2],O=i.clone$2(this.min),K=i.clone$2(this.max),de=0;de=0;if(ne===0)return 0;ne!==J.length&&(O=!1)}if(O)return 2;for(var Oe=0;Oe<3;Oe++){for(var ht=Number.MAX_VALUE,Yt=-Number.MAX_VALUE,cr=0;crthis.max[Oe]-this.min[Oe])return 0}return 1};var Ts=function(D,J,O,K){if(D===void 0&&(D=0),J===void 0&&(J=0),O===void 0&&(O=0),K===void 0&&(K=0),isNaN(D)||D<0||isNaN(J)||J<0||isNaN(O)||O<0||isNaN(K)||K<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=D,this.bottom=J,this.left=O,this.right=K};Ts.prototype.interpolate=function(D,J,O){return J.top!=null&&D.top!=null&&(this.top=i.number(D.top,J.top,O)),J.bottom!=null&&D.bottom!=null&&(this.bottom=i.number(D.bottom,J.bottom,O)),J.left!=null&&D.left!=null&&(this.left=i.number(D.left,J.left,O)),J.right!=null&&D.right!=null&&(this.right=i.number(D.right,J.right,O)),this},Ts.prototype.getCenter=function(D,J){var O=i.clamp((this.left+D-this.right)/2,0,D),K=i.clamp((this.top+J-this.bottom)/2,0,J);return new i.Point(O,K)},Ts.prototype.equals=function(D){return this.top===D.top&&this.bottom===D.bottom&&this.left===D.left&&this.right===D.right},Ts.prototype.clone=function(){return new Ts(this.top,this.bottom,this.left,this.right)},Ts.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var wo=function(D,J,O,K,de){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=de===void 0?!0:de,this._minZoom=D||0,this._maxZoom=J||22,this._minPitch=O==null?0:O,this._maxPitch=K==null?60:K,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 Ts,this._posMatrixCache={},this._alignedPosMatrixCache={}},To={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}};wo.prototype.clone=function(){var D=new wo(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return D.tileSize=this.tileSize,D.latRange=this.latRange,D.width=this.width,D.height=this.height,D._center=this._center,D.zoom=this.zoom,D.angle=this.angle,D._fov=this._fov,D._pitch=this._pitch,D._unmodified=this._unmodified,D._edgeInsets=this._edgeInsets.clone(),D._calcMatrices(),D},To.minZoom.get=function(){return this._minZoom},To.minZoom.set=function(Y){this._minZoom!==Y&&(this._minZoom=Y,this.zoom=Math.max(this.zoom,Y))},To.maxZoom.get=function(){return this._maxZoom},To.maxZoom.set=function(Y){this._maxZoom!==Y&&(this._maxZoom=Y,this.zoom=Math.min(this.zoom,Y))},To.minPitch.get=function(){return this._minPitch},To.minPitch.set=function(Y){this._minPitch!==Y&&(this._minPitch=Y,this.pitch=Math.max(this.pitch,Y))},To.maxPitch.get=function(){return this._maxPitch},To.maxPitch.set=function(Y){this._maxPitch!==Y&&(this._maxPitch=Y,this.pitch=Math.min(this.pitch,Y))},To.renderWorldCopies.get=function(){return this._renderWorldCopies},To.renderWorldCopies.set=function(Y){Y===void 0?Y=!0:Y===null&&(Y=!1),this._renderWorldCopies=Y},To.worldSize.get=function(){return this.tileSize*this.scale},To.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},To.size.get=function(){return new i.Point(this.width,this.height)},To.bearing.get=function(){return-this.angle/Math.PI*180},To.bearing.set=function(Y){var D=-i.wrap(Y,-180,180)*Math.PI/180;this.angle!==D&&(this._unmodified=!1,this.angle=D,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},To.pitch.get=function(){return this._pitch/Math.PI*180},To.pitch.set=function(Y){var D=i.clamp(Y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==D&&(this._unmodified=!1,this._pitch=D,this._calcMatrices())},To.fov.get=function(){return this._fov/Math.PI*180},To.fov.set=function(Y){Y=Math.max(.01,Math.min(60,Y)),this._fov!==Y&&(this._unmodified=!1,this._fov=Y/180*Math.PI,this._calcMatrices())},To.zoom.get=function(){return this._zoom},To.zoom.set=function(Y){var D=Math.min(Math.max(Y,this.minZoom),this.maxZoom);this._zoom!==D&&(this._unmodified=!1,this._zoom=D,this.scale=this.zoomScale(D),this.tileZoom=Math.floor(D),this.zoomFraction=D-this.tileZoom,this._constrain(),this._calcMatrices())},To.center.get=function(){return this._center},To.center.set=function(Y){Y.lat===this._center.lat&&Y.lng===this._center.lng||(this._unmodified=!1,this._center=Y,this._constrain(),this._calcMatrices())},To.padding.get=function(){return this._edgeInsets.toJSON()},To.padding.set=function(Y){this._edgeInsets.equals(Y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Y,1),this._calcMatrices())},To.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},wo.prototype.isPaddingEqual=function(D){return this._edgeInsets.equals(D)},wo.prototype.interpolatePadding=function(D,J,O){this._unmodified=!1,this._edgeInsets.interpolate(D,J,O),this._constrain(),this._calcMatrices()},wo.prototype.coveringZoomLevel=function(D){var J=(D.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/D.tileSize));return Math.max(0,J)},wo.prototype.getVisibleUnwrappedCoordinates=function(D){var J=[new i.UnwrappedTileID(0,D)];if(this._renderWorldCopies)for(var O=this.pointCoordinate(new i.Point(0,0)),K=this.pointCoordinate(new i.Point(this.width,0)),de=this.pointCoordinate(new i.Point(this.width,this.height)),ne=this.pointCoordinate(new i.Point(0,this.height)),we=Math.floor(Math.min(O.x,K.x,de.x,ne.x)),Oe=Math.floor(Math.max(O.x,K.x,de.x,ne.x)),ht=1,Yt=we-ht;Yt<=Oe+ht;Yt++)Yt!==0&&J.push(new i.UnwrappedTileID(Yt,D));return J},wo.prototype.coveringTiles=function(D){var J=this.coveringZoomLevel(D),O=J;if(D.minzoom!==void 0&&JD.maxzoom&&(J=D.maxzoom);var K=i.MercatorCoordinate.fromLngLat(this.center),de=Math.pow(2,J),ne=[de*K.x,de*K.y,0],we=Bo.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,J),Oe=D.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Oe=J);var ht=3,Yt=function(ci){return{aabb:new Ps([ci*de,0,0],[(ci+1)*de,de,0]),zoom:0,x:0,y:0,wrap:ci,fullyVisible:!1}},cr=[],Nt=[],Ne=J,$e=D.reparseOverscaled?O:J;if(this._renderWorldCopies)for(var st=1;st<=3;st++)cr.push(Yt(-st)),cr.push(Yt(st));for(cr.push(Yt(0));cr.length>0;){var It=cr.pop(),Bt=It.x,Ft=It.y,Ut=It.fullyVisible;if(!Ut){var zt=It.aabb.intersects(we);if(zt===0)continue;Ut=zt===2}var _t=It.aabb.distanceX(ne),Dt=It.aabb.distanceY(ne),vt=Math.max(Math.abs(_t),Math.abs(Dt)),lr=ht+(1<lr&&It.zoom>=Oe){Nt.push({tileID:new i.OverscaledTileID(It.zoom===Ne?$e:It.zoom,It.wrap,It.zoom,Bt,Ft),distanceSq:i.sqrLen([ne[0]-.5-Bt,ne[1]-.5-Ft])});continue}for(var _r=0;_r<4;_r++){var Br=(Bt<<1)+_r%2,Di=(Ft<<1)+(_r>>1);cr.push({aabb:It.aabb.quadrant(_r),zoom:It.zoom+1,x:Br,y:Di,wrap:It.wrap,fullyVisible:Ut})}}return Nt.sort(function(ci,bi){return ci.distanceSq-bi.distanceSq}).map(function(ci){return ci.tileID})},wo.prototype.resize=function(D,J){this.width=D,this.height=J,this.pixelsToGLUnits=[2/D,-2/J],this._constrain(),this._calcMatrices()},To.unmodified.get=function(){return this._unmodified},wo.prototype.zoomScale=function(D){return Math.pow(2,D)},wo.prototype.scaleZoom=function(D){return Math.log(D)/Math.LN2},wo.prototype.project=function(D){var J=i.clamp(D.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(D.lng)*this.worldSize,i.mercatorYfromLat(J)*this.worldSize)},wo.prototype.unproject=function(D){return new i.MercatorCoordinate(D.x/this.worldSize,D.y/this.worldSize).toLngLat()},To.point.get=function(){return this.project(this.center)},wo.prototype.setLocationAtPoint=function(D,J){var O=this.pointCoordinate(J),K=this.pointCoordinate(this.centerPoint),de=this.locationCoordinate(D),ne=new i.MercatorCoordinate(de.x-(O.x-K.x),de.y-(O.y-K.y));this.center=this.coordinateLocation(ne),this._renderWorldCopies&&(this.center=this.center.wrap())},wo.prototype.locationPoint=function(D){return this.coordinatePoint(this.locationCoordinate(D))},wo.prototype.pointLocation=function(D){return this.coordinateLocation(this.pointCoordinate(D))},wo.prototype.locationCoordinate=function(D){return i.MercatorCoordinate.fromLngLat(D)},wo.prototype.coordinateLocation=function(D){return D.toLngLat()},wo.prototype.pointCoordinate=function(D){var J=0,O=[D.x,D.y,0,1],K=[D.x,D.y,1,1];i.transformMat4(O,O,this.pixelMatrixInverse),i.transformMat4(K,K,this.pixelMatrixInverse);var de=O[3],ne=K[3],we=O[0]/de,Oe=K[0]/ne,ht=O[1]/de,Yt=K[1]/ne,cr=O[2]/de,Nt=K[2]/ne,Ne=cr===Nt?0:(J-cr)/(Nt-cr);return new i.MercatorCoordinate(i.number(we,Oe,Ne)/this.worldSize,i.number(ht,Yt,Ne)/this.worldSize)},wo.prototype.coordinatePoint=function(D){var J=[D.x*this.worldSize,D.y*this.worldSize,0,1];return i.transformMat4(J,J,this.pixelMatrix),new i.Point(J[0]/J[3],J[1]/J[3])},wo.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)))},wo.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]])},wo.prototype.setMaxBounds=function(D){D?(this.lngRange=[D.getWest(),D.getEast()],this.latRange=[D.getSouth(),D.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},wo.prototype.calculatePosMatrix=function(D,J){J===void 0&&(J=!1);var O=D.key,K=J?this._alignedPosMatrixCache:this._posMatrixCache;if(K[O])return K[O];var de=D.canonical,ne=this.worldSize/this.zoomScale(de.z),we=de.x+Math.pow(2,de.z)*D.wrap,Oe=i.identity(new Float64Array(16));return i.translate(Oe,Oe,[we*ne,de.y*ne,0]),i.scale(Oe,Oe,[ne/i.EXTENT,ne/i.EXTENT,1]),i.multiply(Oe,J?this.alignedProjMatrix:this.projMatrix,Oe),K[O]=new Float32Array(Oe),K[O]},wo.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},wo.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var D=-90,J=90,O=-180,K=180,de,ne,we,Oe,ht=this.size,Yt=this._unmodified;if(this.latRange){var cr=this.latRange;D=i.mercatorYfromLat(cr[1])*this.worldSize,J=i.mercatorYfromLat(cr[0])*this.worldSize,de=J-DJ&&(Oe=J-It)}if(this.lngRange){var Bt=Ne.x,Ft=ht.x/2;Bt-FtK&&(we=K-Ft)}(we!==void 0||Oe!==void 0)&&(this.center=this.unproject(new i.Point(we!==void 0?we:Ne.x,Oe!==void 0?Oe:Ne.y))),this._unmodified=Yt,this._constraining=!1}},wo.prototype._calcMatrices=function(){if(this.height){var D=this._fov/2,J=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(D)*this.height;var O=Math.PI/2+this._pitch,K=this._fov*(.5+J.y/this.height),de=Math.sin(K)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-O-K,.01,Math.PI-.01)),ne=this.point,we=ne.x,Oe=ne.y,ht=Math.cos(Math.PI/2-this._pitch)*de+this.cameraToCenterDistance,Yt=ht*1.01,cr=this.height/50,Nt=new Float64Array(16);i.perspective(Nt,this._fov,this.width/this.height,cr,Yt),Nt[8]=-J.x*2/this.width,Nt[9]=J.y*2/this.height,i.scale(Nt,Nt,[1,-1,1]),i.translate(Nt,Nt,[0,0,-this.cameraToCenterDistance]),i.rotateX(Nt,Nt,this._pitch),i.rotateZ(Nt,Nt,this.angle),i.translate(Nt,Nt,[-we,-Oe,0]),this.mercatorMatrix=i.scale([],Nt,[this.worldSize,this.worldSize,this.worldSize]),i.scale(Nt,Nt,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=Nt,this.invProjMatrix=i.invert([],this.projMatrix);var Ne=this.width%2/2,$e=this.height%2/2,st=Math.cos(this.angle),It=Math.sin(this.angle),Bt=we-Math.round(we)+st*Ne+It*$e,Ft=Oe-Math.round(Oe)+st*$e+It*Ne,Ut=new Float64Array(Nt);if(i.translate(Ut,Ut,[Bt>.5?Bt-1:Bt,Ft>.5?Ft-1:Ft,0]),this.alignedProjMatrix=Ut,Nt=i.create(),i.scale(Nt,Nt,[this.width/2,-this.height/2,1]),i.translate(Nt,Nt,[1,-1,0]),this.labelPlaneMatrix=Nt,Nt=i.create(),i.scale(Nt,Nt,[1,-1,1]),i.translate(Nt,Nt,[-1,-1,0]),i.scale(Nt,Nt,[2/this.width,2/this.height,1]),this.glCoordMatrix=Nt,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),Nt=i.invert(new Float64Array(16),this.pixelMatrix),!Nt)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Nt,this._posMatrixCache={},this._alignedPosMatrixCache={}}},wo.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var D=this.pointCoordinate(new i.Point(0,0)),J=[D.x*this.worldSize,D.y*this.worldSize,0,1],O=i.transformMat4(J,J,this.pixelMatrix);return O[3]/this.cameraToCenterDistance},wo.prototype.getCameraPoint=function(){var D=this._pitch,J=Math.tan(D)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,J))},wo.prototype.getCameraQueryGeometry=function(D){var J=this.getCameraPoint();if(D.length===1)return[D[0],J];for(var O=J.x,K=J.y,de=J.x,ne=J.y,we=0,Oe=D;we=3&&!D.some(function(O){return isNaN(O)})){var J=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(D[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+D[2],+D[1]],zoom:+D[0],bearing:J,pitch:+(D[4]||0)}),!0}return!1},Ul.prototype._updateHashUnthrottled=function(){var D=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,D)}catch(J){}};var Lu={linearity:.3,easing:i.bezier(0,0,.3,1)},au=i.extend({deceleration:2500,maxSpeed:1400},Lu),Js=i.extend({deceleration:20,maxSpeed:1400},Lu),eu=i.extend({deceleration:1e3,maxSpeed:360},Lu),dc=i.extend({deceleration:1e3,maxSpeed:90},Lu),Tl=function(D){this._map=D,this.clear()};Tl.prototype.clear=function(){this._inertiaBuffer=[]},Tl.prototype.record=function(D){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:D})},Tl.prototype._drainInertiaBuffer=function(){for(var D=this._inertiaBuffer,J=i.browser.now(),O=160;D.length>0&&J-D[0].time>O;)D.shift()},Tl.prototype._onMoveEnd=function(D){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var J={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},O=0,K=this._inertiaBuffer;O=this._clickTolerance||this._map.fire(new se(D.type,this._map,D))},Ve.prototype.dblclick=function(D){return this._firePreventable(new se(D.type,this._map,D))},Ve.prototype.mouseover=function(D){this._map.fire(new se(D.type,this._map,D))},Ve.prototype.mouseout=function(D){this._map.fire(new se(D.type,this._map,D))},Ve.prototype.touchstart=function(D){return this._firePreventable(new Te(D.type,this._map,D))},Ve.prototype.touchmove=function(D){this._map.fire(new Te(D.type,this._map,D))},Ve.prototype.touchend=function(D){this._map.fire(new Te(D.type,this._map,D))},Ve.prototype.touchcancel=function(D){this._map.fire(new Te(D.type,this._map,D))},Ve.prototype._firePreventable=function(D){if(this._map.fire(D),D.defaultPrevented)return{}},Ve.prototype.isEnabled=function(){return!0},Ve.prototype.isActive=function(){return!1},Ve.prototype.enable=function(){},Ve.prototype.disable=function(){};var Ye=function(D){this._map=D};Ye.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ye.prototype.mousemove=function(D){this._map.fire(new se(D.type,this._map,D))},Ye.prototype.mousedown=function(){this._delayContextMenu=!0},Ye.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new se("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ye.prototype.contextmenu=function(D){this._delayContextMenu?this._contextMenuEvent=D:this._map.fire(new se(D.type,this._map,D)),this._map.listens("contextmenu")&&D.preventDefault()},Ye.prototype.isEnabled=function(){return!0},Ye.prototype.isActive=function(){return!1},Ye.prototype.enable=function(){},Ye.prototype.disable=function(){};var Pt=function(D,J){this._map=D,this._el=D.getCanvasContainer(),this._container=D.getContainer(),this._clickTolerance=J.clickTolerance||1};Pt.prototype.isEnabled=function(){return!!this._enabled},Pt.prototype.isActive=function(){return!!this._active},Pt.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Pt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Pt.prototype.mousedown=function(D,J){this.isEnabled()&&D.shiftKey&&D.button===0&&(o.disableDrag(),this._startPos=this._lastPos=J,this._active=!0)},Pt.prototype.mousemoveWindow=function(D,J){if(this._active){var O=J;if(!(this._lastPos.equals(O)||!this._box&&O.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=D.timeStamp),O.length===this.numTouches&&(this.centroid=Xt(J),this.touches=ot(O,J)))},zr.prototype.touchmove=function(D,J,O){if(!(this.aborted||!this.centroid)){var K=ot(O,J);for(var de in this.touches){var ne=this.touches[de],we=K[de];(!we||we.dist(ne)>Ur)&&(this.aborted=!0)}}},zr.prototype.touchend=function(D,J,O){if((!this.centroid||D.timeStamp-this.startTime>pr)&&(this.aborted=!0),O.length===0){var K=!this.aborted&&this.centroid;if(this.reset(),K)return K}};var gi=function(D){this.singleTap=new zr(D),this.numTaps=D.numTaps,this.reset()};gi.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},gi.prototype.touchstart=function(D,J,O){this.singleTap.touchstart(D,J,O)},gi.prototype.touchmove=function(D,J,O){this.singleTap.touchmove(D,J,O)},gi.prototype.touchend=function(D,J,O){var K=this.singleTap.touchend(D,J,O);if(K){var de=D.timeStamp-this.lastTime0&&(this._active=!0);var K=ot(O,J),de=new i.Point(0,0),ne=new i.Point(0,0),we=0;for(var Oe in K){var ht=K[Oe],Yt=this._touches[Oe];Yt&&(de._add(ht),ne._add(ht.sub(Yt)),we++,K[Oe]=ht)}if(this._touches=K,!(weMath.abs(Y.x)}var Un=100,ja=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.reset=function(){Y.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},D.prototype._start=function(O){this._lastPoints=O,Xs(O[0].sub(O[1]))&&(this._valid=!1)},D.prototype._move=function(O,K,de){var ne=O[0].sub(this._lastPoints[0]),we=O[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ne,we,de.timeStamp),!!this._valid){this._lastPoints=O,this._active=!0;var Oe=(ne.y+we.y)/2,ht=-.5;return{pitchDelta:Oe*ht}}},D.prototype.gestureBeginsVertically=function(O,K,de){if(this._valid!==void 0)return this._valid;var ne=2,we=O.mag()>=ne,Oe=K.mag()>=ne;if(!(!we&&!Oe)){if(!we||!Oe)return this._firstMove===void 0&&(this._firstMove=de),de-this._firstMove0==K.y>0;return Xs(O)&&Xs(K)&&ht}},D}(na),Fo={panStep:100,bearingStep:15,pitchStep:10},Uo=function(){var D=Fo;this._panStep=D.panStep,this._bearingStep=D.bearingStep,this._pitchStep=D.pitchStep,this._rotationDisabled=!1};Uo.prototype.reset=function(){this._active=!1},Uo.prototype.keydown=function(D){var J=this;if(!(D.altKey||D.ctrlKey||D.metaKey)){var O=0,K=0,de=0,ne=0,we=0;switch(D.keyCode){case 61:case 107:case 171:case 187:O=1;break;case 189:case 109:case 173:O=-1;break;case 37:D.shiftKey?K=-1:(D.preventDefault(),ne=-1);break;case 39:D.shiftKey?K=1:(D.preventDefault(),ne=1);break;case 38:D.shiftKey?de=1:(D.preventDefault(),we=-1);break;case 40:D.shiftKey?de=-1:(D.preventDefault(),we=1);break;default:return}return this._rotationDisabled&&(K=0,de=0),{cameraAnimation:function(Oe){var ht=Oe.getZoom();Oe.easeTo({duration:300,easeId:"keyboardHandler",easing:$s,zoom:O?Math.round(ht)+O*(D.shiftKey?2:1):ht,bearing:Oe.getBearing()+K*J._bearingStep,pitch:Oe.getPitch()+de*J._pitchStep,offset:[-ne*J._panStep,-we*J._panStep],center:Oe.getCenter()},{originalEvent:D})}}}},Uo.prototype.enable=function(){this._enabled=!0},Uo.prototype.disable=function(){this._enabled=!1,this.reset()},Uo.prototype.isEnabled=function(){return this._enabled},Uo.prototype.isActive=function(){return this._active},Uo.prototype.disableRotation=function(){this._rotationDisabled=!0},Uo.prototype.enableRotation=function(){this._rotationDisabled=!1};function $s(Y){return Y*(2-Y)}var Sl=4.000244140625,bu=1/100,dl=1/450,Sc=2,Me=function(D,J){this._map=D,this._el=D.getCanvasContainer(),this._handler=J,this._delta=0,this._defaultZoomRate=bu,this._wheelZoomRate=dl,i.bindAll(["_onTimeout"],this)};Me.prototype.setZoomRate=function(D){this._defaultZoomRate=D},Me.prototype.setWheelZoomRate=function(D){this._wheelZoomRate=D},Me.prototype.isEnabled=function(){return!!this._enabled},Me.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Me.prototype.isZooming=function(){return!!this._zooming},Me.prototype.enable=function(D){this.isEnabled()||(this._enabled=!0,this._aroundCenter=D&&D.around==="center")},Me.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Me.prototype.wheel=function(D){if(this.isEnabled()){var J=D.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?D.deltaY*40:D.deltaY,O=i.browser.now(),K=O-(this._lastWheelEventTime||0);this._lastWheelEventTime=O,J!==0&&J%Sl===0?this._type="wheel":J!==0&&Math.abs(J)<4?this._type="trackpad":K>400?(this._type=null,this._lastValue=J,this._timeout=setTimeout(this._onTimeout,40,D)):this._type||(this._type=Math.abs(K*J)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,J+=this._lastValue)),D.shiftKey&&J&&(J=J/4),this._type&&(this._lastWheelEvent=D,this._delta-=J,this._active||this._start(D)),D.preventDefault()}},Me.prototype._onTimeout=function(D){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(D)},Me.prototype._start=function(D){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 J=o.mousePos(this._el,D);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(J)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Me.prototype.renderFrame=function(){var D=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var J=this._map.transform;if(this._delta!==0){var O=this._type==="wheel"&&Math.abs(this._delta)>Sl?this._wheelZoomRate:this._defaultZoomRate,K=Sc/(1+Math.exp(-Math.abs(this._delta*O)));this._delta<0&&K!==0&&(K=1/K);var de=typeof this._targetZoom=="number"?J.zoomScale(this._targetZoom):J.scale;this._targetZoom=Math.min(J.maxZoom,Math.max(J.minZoom,J.scaleZoom(de*K))),this._type==="wheel"&&(this._startZoom=J.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ne=typeof this._targetZoom=="number"?this._targetZoom:J.zoom,we=this._startZoom,Oe=this._easing,ht=!1,Yt;if(this._type==="wheel"&&we&&Oe){var cr=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),Nt=Oe(cr);Yt=i.number(we,ne,Nt),cr<1?this._frameId||(this._frameId=!0):ht=!0}else Yt=ne,ht=!0;return this._active=!0,ht&&(this._active=!1,this._finishTimeout=setTimeout(function(){D._zooming=!1,D._handler._triggerRenderFrame(),delete D._targetZoom,delete D._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ht,zoomDelta:Yt-J.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Me.prototype._smoothOutEasing=function(D){var J=i.ease;if(this._prevEase){var O=this._prevEase,K=(i.browser.now()-O.start)/O.duration,de=O.easing(K+.01)-O.easing(K),ne=.27/Math.sqrt(de*de+1e-4)*.01,we=Math.sqrt(.27*.27-ne*ne);J=i.bezier(ne,we,.25,1)}return this._prevEase={start:i.browser.now(),duration:D,easing:J},J},Me.prototype.reset=function(){this._active=!1};var bt=function(D,J){this._clickZoom=D,this._tapZoom=J};bt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},bt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},bt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},bt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Ot=function(){this.reset()};Ot.prototype.reset=function(){this._active=!1},Ot.prototype.dblclick=function(D,J){return D.preventDefault(),{cameraAnimation:function(O){O.easeTo({duration:300,zoom:O.getZoom()+(D.shiftKey?-1:1),around:O.unproject(J)},{originalEvent:D})}}},Ot.prototype.enable=function(){this._enabled=!0},Ot.prototype.disable=function(){this._enabled=!1,this.reset()},Ot.prototype.isEnabled=function(){return this._enabled},Ot.prototype.isActive=function(){return this._active};var Lr=function(){this._tap=new gi({numTouches:1,numTaps:1}),this.reset()};Lr.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Lr.prototype.touchstart=function(D,J,O){this._swipePoint||(this._tapTime&&D.timeStamp-this._tapTime>dr&&this.reset(),this._tapTime?O.length>0&&(this._swipePoint=J[0],this._swipeTouch=O[0].identifier):this._tap.touchstart(D,J,O))},Lr.prototype.touchmove=function(D,J,O){if(!this._tapTime)this._tap.touchmove(D,J,O);else if(this._swipePoint){if(O[0].identifier!==this._swipeTouch)return;var K=J[0],de=K.y-this._swipePoint.y;return this._swipePoint=K,D.preventDefault(),this._active=!0,{zoomDelta:de/128}}},Lr.prototype.touchend=function(D,J,O){if(this._tapTime)this._swipePoint&&O.length===0&&this.reset();else{var K=this._tap.touchend(D,J,O);K&&(this._tapTime=D.timeStamp)}},Lr.prototype.touchcancel=function(){this.reset()},Lr.prototype.enable=function(){this._enabled=!0},Lr.prototype.disable=function(){this._enabled=!1,this.reset()},Lr.prototype.isEnabled=function(){return this._enabled},Lr.prototype.isActive=function(){return this._active};var Vr=function(D,J,O){this._el=D,this._mousePan=J,this._touchPan=O};Vr.prototype.enable=function(D){this._inertiaOptions=D||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Vr.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Vr.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Vr.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Or=function(D,J,O){this._pitchWithRotate=D.pitchWithRotate,this._mouseRotate=J,this._mousePitch=O};Or.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Or.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Or.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Or.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Nr=function(D,J,O,K){this._el=D,this._touchZoom=J,this._touchRotate=O,this._tapDragZoom=K,this._rotationDisabled=!1,this._enabled=!0};Nr.prototype.enable=function(D){this._touchZoom.enable(D),this._rotationDisabled||this._touchRotate.enable(D),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Nr.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Nr.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Nr.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Nr.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Nr.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var vi=function(Y){return Y.zoom||Y.drag||Y.pitch||Y.rotate},Ni=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D}(i.Event);function qi(Y){return Y.panDelta&&Y.panDelta.mag()||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta}var Si=function(D,J){this._map=D,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Tl(D),this._bearingSnap=J.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(J),i.bindAll(["handleEvent","handleWindowEvent"],this);var O=this._el;this._listeners=[[O,"touchstart",{passive:!0}],[O,"touchmove",{passive:!1}],[O,"touchend",void 0],[O,"touchcancel",void 0],[O,"mousedown",void 0],[O,"mousemove",void 0],[O,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[O,"mouseover",void 0],[O,"mouseout",void 0],[O,"dblclick",void 0],[O,"click",void 0],[O,"keydown",{capture:!1}],[O,"keyup",void 0],[O,"wheel",{passive:!1}],[O,"contextmenu",void 0],[i.window,"blur",void 0]];for(var K=0,de=this._listeners;Kwe?Math.min(2,_t):Math.max(.5,_t),ci=Math.pow(Di,1-_r),bi=ne.unproject(Ut.add(zt.mult(_r*ci)).mult(Br));ne.setLocationAtPoint(ne.renderWorldCopies?bi.wrap():bi,It)}de._fireMoveEvents(K)},function(_r){de._afterEase(K,_r)},O),this},D.prototype._prepareEase=function(O,K,de){de===void 0&&(de={}),this._moving=!0,!K&&!de.moving&&this.fire(new i.Event("movestart",O)),this._zooming&&!de.zooming&&this.fire(new i.Event("zoomstart",O)),this._rotating&&!de.rotating&&this.fire(new i.Event("rotatestart",O)),this._pitching&&!de.pitching&&this.fire(new i.Event("pitchstart",O))},D.prototype._fireMoveEvents=function(O){this.fire(new i.Event("move",O)),this._zooming&&this.fire(new i.Event("zoom",O)),this._rotating&&this.fire(new i.Event("rotate",O)),this._pitching&&this.fire(new i.Event("pitch",O))},D.prototype._afterEase=function(O,K){if(!(this._easeId&&K&&this._easeId===K)){delete this._easeId;var de=this._zooming,ne=this._rotating,we=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,de&&this.fire(new i.Event("zoomend",O)),ne&&this.fire(new i.Event("rotateend",O)),we&&this.fire(new i.Event("pitchend",O)),this.fire(new i.Event("moveend",O))}},D.prototype.flyTo=function(O,K){var de=this;if(!O.essential&&i.browser.prefersReducedMotion){var ne=i.pick(O,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ne,K)}this.stop(),O=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},O);var we=this.transform,Oe=this.getZoom(),ht=this.getBearing(),Yt=this.getPitch(),cr=this.getPadding(),Nt="zoom"in O?i.clamp(+O.zoom,we.minZoom,we.maxZoom):Oe,Ne="bearing"in O?this._normalizeBearing(O.bearing,ht):ht,$e="pitch"in O?+O.pitch:Yt,st="padding"in O?O.padding:we.padding,It=we.zoomScale(Nt-Oe),Bt=i.Point.convert(O.offset),Ft=we.centerPoint.add(Bt),Ut=we.pointLocation(Ft),zt=i.LngLat.convert(O.center||Ut);this._normalizeCenter(zt);var _t=we.project(Ut),Dt=we.project(zt).sub(_t),vt=O.curve,lr=Math.max(we.width,we.height),_r=lr/It,Br=Dt.mag();if("minZoom"in O){var Di=i.clamp(Math.min(O.minZoom,Oe,Nt),we.minZoom,we.maxZoom),ci=lr/we.zoomScale(Di-Oe);vt=Math.sqrt(ci/Br*2)}var bi=vt*vt;function gn(so){var Yo=(_r*_r-lr*lr+(so?-1:1)*bi*bi*Br*Br)/(2*(so?_r:lr)*bi*Br);return Math.log(Math.sqrt(Yo*Yo+1)-Yo)}function tn(so){return(Math.exp(so)-Math.exp(-so))/2}function Ei(so){return(Math.exp(so)+Math.exp(-so))/2}function Oi(so){return tn(so)/Ei(so)}var Gi=gn(0),on=function(so){return Ei(Gi)/Ei(Gi+vt*so)},zn=function(so){return lr*((Ei(Gi)*Oi(Gi+vt*so)-tn(Gi))/bi)/Br},Ja=(gn(1)-Gi)/vt;if(Math.abs(Br)<1e-6||!isFinite(Ja)){if(Math.abs(lr-_r)<1e-6)return this.easeTo(O,K);var co=_rO.maxDuration&&(O.duration=0),this._zooming=!0,this._rotating=ht!==Ne,this._pitching=$e!==Yt,this._padding=!we.isPaddingEqual(st),this._prepareEase(K,!1),this._ease(function(so){var Yo=so*Ja,ms=1/on(Yo);we.zoom=so===1?Nt:Oe+we.scaleZoom(ms),de._rotating&&(we.bearing=i.number(ht,Ne,so)),de._pitching&&(we.pitch=i.number(Yt,$e,so)),de._padding&&(we.interpolatePadding(cr,st,so),Ft=we.centerPoint.add(Bt));var ou=so===1?zt:we.unproject(_t.add(Dt.mult(zn(Yo))).mult(ms));we.setLocationAtPoint(we.renderWorldCopies?ou.wrap():ou,Ft),de._fireMoveEvents(K)},function(){return de._afterEase(K)},O),this},D.prototype.isEasing=function(){return!!this._easeFrameId},D.prototype.stop=function(){return this._stop()},D.prototype._stop=function(O,K){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var de=this._onEaseEnd;delete this._onEaseEnd,de.call(this,K)}if(!O){var ne=this.handlers;ne&&ne.stop(!1)}return this},D.prototype._ease=function(O,K,de){de.animate===!1||de.duration===0?(O(1),K()):(this._easeStart=i.browser.now(),this._easeOptions=de,this._onEaseFrame=O,this._onEaseEnd=K,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},D.prototype._renderFrameCallback=function(){var O=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(O)),O<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},D.prototype._normalizeBearing=function(O,K){O=i.wrap(O,-180,180);var de=Math.abs(O-K);return Math.abs(O-360-K)180?-360:de<-180?360:0}},D}(i.Evented),Qi=function(D){D===void 0&&(D={}),this.options=D,i.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Qi.prototype.getDefaultPosition=function(){return"bottom-right"},Qi.prototype.onAdd=function(D){var J=this.options&&this.options.compact;return this._map=D,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=o.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),J&&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),J===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Qi.prototype.onRemove=function(){o.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},Qi.prototype._setElementTitle=function(D,J){var O=this._map._getUIString("AttributionControl."+J);D.title=O,D.setAttribute("aria-label",O)},Qi.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"))},Qi.prototype._updateEditLink=function(){var D=this._editLink;D||(D=this._editLink=this._container.querySelector(".mapbox-improve-map"));var J=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(D){var O=J.reduce(function(K,de,ne){return de.value&&(K+=de.key+"="+de.value+(ne=0)return!1;return!0});var we=D.join(" | ");we!==this._attribHTML&&(this._attribHTML=we,D.length?(this._innerContainer.innerHTML=we,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Qi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var ji=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};ji.prototype.onAdd=function(D){this._map=D,this._container=o.create("div","mapboxgl-ctrl");var J=o.create("a","mapboxgl-ctrl-logo");return J.target="_blank",J.rel="noopener nofollow",J.href="https://www.mapbox.com/",J.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),J.setAttribute("rel","noopener nofollow"),this._container.appendChild(J),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ji.prototype.onRemove=function(){o.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ji.prototype.getDefaultPosition=function(){return"bottom-left"},ji.prototype._updateLogo=function(D){(!D||D.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},ji.prototype._logoRequired=function(){if(this._map.style){var D=this._map.style.sourceCaches;for(var J in D){var O=D[J].getSource();if(O.mapbox_logo)return!0}return!1}},ji.prototype._updateCompact=function(){var D=this._container.children;if(D.length){var J=D[0];this._map.getCanvasContainer().offsetWidth<250?J.classList.add("mapboxgl-compact"):J.classList.remove("mapboxgl-compact")}};var oi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};oi.prototype.add=function(D){var J=++this._id,O=this._queue;return O.push({callback:D,id:J,cancelled:!1}),J},oi.prototype.remove=function(D){for(var J=this._currentlyRunning,O=J?this._queue.concat(J):this._queue,K=0,de=O;KO.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(O.minPitch!=null&&O.maxPitch!=null&&O.minPitch>O.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(O.minPitch!=null&&O.minPitchqn)throw new Error("maxPitch must be less than or equal to "+qn);var de=new wo(O.minZoom,O.maxZoom,O.minPitch,O.maxPitch,O.renderWorldCopies);if(Y.call(this,de,O),this._interactive=O.interactive,this._maxTileCacheSize=O.maxTileCacheSize,this._failIfMajorPerformanceCaveat=O.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=O.preserveDrawingBuffer,this._antialias=O.antialias,this._trackResize=O.trackResize,this._bearingSnap=O.bearingSnap,this._refreshExpiredTiles=O.refreshExpiredTiles,this._fadeDuration=O.fadeDuration,this._crossSourceCollisions=O.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=O.collectResourceTiming,this._renderTaskQueue=new oi,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},Tr,O.locale),this._clickTolerance=O.clickTolerance,this._requestManager=new i.RequestManager(O.transformRequest,O.accessToken),typeof O.container=="string"){if(this._container=i.window.document.getElementById(O.container),!this._container)throw new Error("Container '"+O.container+"' not found.")}else if(O.container instanceof yi)this._container=O.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(O.maxBounds&&this.setMaxBounds(O.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 K._update(!1)}),this.on("moveend",function(){return K._update(!1)}),this.on("zoom",function(){return K._update(!0)}),typeof i.window!="undefined"&&(i.window.addEventListener("online",this._onWindowOnline,!1),i.window.addEventListener("resize",this._onWindowResize,!1),i.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Si(this,O);var ne=typeof O.hash=="string"&&O.hash||void 0;this._hash=O.hash&&new Ul(ne).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:O.center,zoom:O.zoom,bearing:O.bearing,pitch:O.pitch}),O.bounds&&(this.resize(),this.fitBounds(O.bounds,i.extend({},O.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=O.localIdeographFontFamily,O.style&&this.setStyle(O.style,{localIdeographFontFamily:O.localIdeographFontFamily}),O.attributionControl&&this.addControl(new Qi({customAttribution:O.customAttribution})),this.addControl(new ji,O.logoPosition),this.on("style.load",function(){K.transform.unmodified&&K.jumpTo(K.style.stylesheet)}),this.on("data",function(we){K._update(we.dataType==="style"),K.fire(new i.Event(we.dataType+"data",we))}),this.on("dataloading",function(we){K.fire(new i.Event(we.dataType+"dataloading",we))})}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return D.prototype._getMapId=function(){return this._mapId},D.prototype.addControl=function(K,de){if(de===void 0&&(K.getDefaultPosition?de=K.getDefaultPosition():de="top-right"),!K||!K.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 ne=K.onAdd(this);this._controls.push(K);var we=this._controlPositions[de];return de.indexOf("bottom")!==-1?we.insertBefore(ne,we.firstChild):we.appendChild(ne),this},D.prototype.removeControl=function(K){if(!K||!K.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 de=this._controls.indexOf(K);return de>-1&&this._controls.splice(de,1),K.onRemove(this),this},D.prototype.hasControl=function(K){return this._controls.indexOf(K)>-1},D.prototype.resize=function(K){var de=this._containerDimensions(),ne=de[0],we=de[1];this._resizeCanvas(ne,we),this.transform.resize(ne,we),this.painter.resize(ne,we);var Oe=!this._moving;return Oe&&(this.stop(),this.fire(new i.Event("movestart",K)).fire(new i.Event("move",K))),this.fire(new i.Event("resize",K)),Oe&&this.fire(new i.Event("moveend",K)),this},D.prototype.getBounds=function(){return this.transform.getBounds()},D.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},D.prototype.setMaxBounds=function(K){return this.transform.setMaxBounds(i.LngLatBounds.convert(K)),this._update()},D.prototype.setMinZoom=function(K){if(K=K==null?ui:K,K>=ui&&K<=this.transform.maxZoom)return this.transform.minZoom=K,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=K,this._update(),this.getZoom()>K&&this.setZoom(K),this;throw new Error("maxZoom must be greater than the current minZoom")},D.prototype.getMaxZoom=function(){return this.transform.maxZoom},D.prototype.setMinPitch=function(K){if(K=K==null?Xi:K,K=Xi&&K<=this.transform.maxPitch)return this.transform.minPitch=K,this._update(),this.getPitch()qn)throw new Error("maxPitch must be less than or equal to "+qn);if(K>=this.transform.minPitch)return this.transform.maxPitch=K,this._update(),this.getPitch()>K&&this.setPitch(K),this;throw new Error("maxPitch must be greater than the current minPitch")},D.prototype.getMaxPitch=function(){return this.transform.maxPitch},D.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},D.prototype.setRenderWorldCopies=function(K){return this.transform.renderWorldCopies=K,this._update()},D.prototype.project=function(K){return this.transform.locationPoint(i.LngLat.convert(K))},D.prototype.unproject=function(K){return this.transform.pointLocation(i.Point.convert(K))},D.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},D.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},D.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},D.prototype._createDelegatedListener=function(K,de,ne){var we=this,Oe;if(K==="mouseenter"||K==="mouseover"){var ht=!1,Yt=function(It){var Bt=we.getLayer(de)?we.queryRenderedFeatures(It.point,{layers:[de]}):[];Bt.length?ht||(ht=!0,ne.call(we,new se(K,we,It.originalEvent,{features:Bt}))):ht=!1},cr=function(){ht=!1};return{layer:de,listener:ne,delegates:{mousemove:Yt,mouseout:cr}}}else if(K==="mouseleave"||K==="mouseout"){var Nt=!1,Ne=function(It){var Bt=we.getLayer(de)?we.queryRenderedFeatures(It.point,{layers:[de]}):[];Bt.length?Nt=!0:Nt&&(Nt=!1,ne.call(we,new se(K,we,It.originalEvent)))},$e=function(It){Nt&&(Nt=!1,ne.call(we,new se(K,we,It.originalEvent)))};return{layer:de,listener:ne,delegates:{mousemove:Ne,mouseout:$e}}}else{var st=function(It){var Bt=we.getLayer(de)?we.queryRenderedFeatures(It.point,{layers:[de]}):[];Bt.length&&(It.features=Bt,ne.call(we,It),delete It.features)};return{layer:de,listener:ne,delegates:(Oe={},Oe[K]=st,Oe)}}},D.prototype.on=function(K,de,ne){if(ne===void 0)return Y.prototype.on.call(this,K,de);var we=this._createDelegatedListener(K,de,ne);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[K]=this._delegatedListeners[K]||[],this._delegatedListeners[K].push(we);for(var Oe in we.delegates)this.on(Oe,we.delegates[Oe]);return this},D.prototype.once=function(K,de,ne){if(ne===void 0)return Y.prototype.once.call(this,K,de);var we=this._createDelegatedListener(K,de,ne);for(var Oe in we.delegates)this.once(Oe,we.delegates[Oe]);return this},D.prototype.off=function(K,de,ne){var we=this;if(ne===void 0)return Y.prototype.off.call(this,K,de);var Oe=function(ht){for(var Yt=ht[K],cr=0;cr180;){var ne=J.locationPoint(Y);if(ne.x>=0&&ne.y>=0&&ne.x<=J.width&&ne.y<=J.height)break;Y.lng>J.center.lng?Y.lng-=360:Y.lng+=360}return Y}var Nn={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 aa(Y,D,J){var O=Y.classList;for(var K in Nn)O.remove("mapboxgl-"+J+"-anchor-"+K);O.add("mapboxgl-"+J+"-anchor-"+D)}var Ki=function(Y){function D(J,O){if(Y.call(this),(J instanceof i.window.HTMLElement||O)&&(J=i.extend({element:J},O)),i.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=J&&J.anchor||"center",this._color=J&&J.color||"#3FB1CE",this._scale=J&&J.scale||1,this._draggable=J&&J.draggable||!1,this._clickTolerance=J&&J.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=J&&J.rotation||0,this._rotationAlignment=J&&J.rotationAlignment||"auto",this._pitchAlignment=J&&J.pitchAlignment&&J.pitchAlignment!=="auto"?J.pitchAlignment:this._rotationAlignment,!J||!J.element){this._defaultMarker=!0,this._element=o.create("div"),this._element.setAttribute("aria-label","Map marker");var K=o.createNS("http://www.w3.org/2000/svg","svg"),de=41,ne=27;K.setAttributeNS(null,"display","block"),K.setAttributeNS(null,"height",de+"px"),K.setAttributeNS(null,"width",ne+"px"),K.setAttributeNS(null,"viewBox","0 0 "+ne+" "+de);var we=o.createNS("http://www.w3.org/2000/svg","g");we.setAttributeNS(null,"stroke","none"),we.setAttributeNS(null,"stroke-width","1"),we.setAttributeNS(null,"fill","none"),we.setAttributeNS(null,"fill-rule","evenodd");var Oe=o.createNS("http://www.w3.org/2000/svg","g");Oe.setAttributeNS(null,"fill-rule","nonzero");var ht=o.createNS("http://www.w3.org/2000/svg","g");ht.setAttributeNS(null,"transform","translate(3.0, 29.0)"),ht.setAttributeNS(null,"fill","#000000");for(var Yt=[{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,Nt=Yt;cr=K}this._isDragging&&(this._pos=O.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")))},D.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"},D.prototype._addDragHandler=function(O){this._element.contains(O.originalEvent.target)&&(O.preventDefault(),this._positionDelta=O.point.sub(this._pos).add(this._offset),this._pointerdownPos=O.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))},D.prototype.setDraggable=function(O){return this._draggable=!!O,this._map&&(O?(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},D.prototype.isDraggable=function(){return this._draggable},D.prototype.setRotation=function(O){return this._rotation=O||0,this._update(),this},D.prototype.getRotation=function(){return this._rotation},D.prototype.setRotationAlignment=function(O){return this._rotationAlignment=O||"auto",this._update(),this},D.prototype.getRotationAlignment=function(){return this._rotationAlignment},D.prototype.setPitchAlignment=function(O){return this._pitchAlignment=O&&O!=="auto"?O:this._rotationAlignment,this._update(),this},D.prototype.getPitchAlignment=function(){return this._pitchAlignment},D}(i.Evented),Cn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ia;function sa(Y){ia!==void 0?Y(ia):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:"geolocation"}).then(function(D){ia=D.state!=="denied",Y(ia)}):(ia=!!i.window.navigator.geolocation,Y(ia))}var ba=0,is=!1,Zs=function(Y){function D(J){Y.call(this),this.options=i.extend({},Cn,J),i.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.onAdd=function(O){return this._map=O,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),sa(this._setupUI),this._container},D.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(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ba=0,is=!1},D.prototype._isOutOfMapMaxBounds=function(O){var K=this._map.getMaxBounds(),de=O.coords;return K&&(de.longitudeK.getEast()||de.latitudeK.getNorth())},D.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}},D.prototype._onSuccess=function(O){if(this._map){if(this._isOutOfMapMaxBounds(O)){this._setErrorState(),this.fire(new i.Event("outofmaxbounds",O)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=O,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(O),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(O),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",O)),this._finish()}},D.prototype._updateCamera=function(O){var K=new i.LngLat(O.coords.longitude,O.coords.latitude),de=O.coords.accuracy,ne=this._map.getBearing(),we=i.extend({bearing:ne},this.options.fitBoundsOptions);this._map.fitBounds(K.toBounds(de),we,{geolocateSource:!0})},D.prototype._updateMarker=function(O){if(O){var K=new i.LngLat(O.coords.longitude,O.coords.latitude);this._accuracyCircleMarker.setLngLat(K).addTo(this._map),this._userLocationDotMarker.setLngLat(K).addTo(this._map),this._accuracy=O.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},D.prototype._updateCircleRadius=function(){var O=this._map._container.clientHeight/2,K=this._map.unproject([0,O]),de=this._map.unproject([1,O]),ne=K.distanceTo(de),we=Math.ceil(2*this._accuracy/ne);this._circleElement.style.width=we+"px",this._circleElement.style.height=we+"px"},D.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},D.prototype._onError=function(O){if(this._map){if(this.options.trackUserLocation)if(O.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 K=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=K,this._geolocateButton.setAttribute("aria-label",K),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(O.code===3&&is)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",O)),this._finish()}},D.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},D.prototype._setupUI=function(O){var K=this;if(this._container.addEventListener("contextmenu",function(we){return we.preventDefault()}),this._geolocateButton=o.create("button","mapboxgl-ctrl-geolocate",this._container),o.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",O===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var de=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=de,this._geolocateButton.setAttribute("aria-label",de)}else{var ne=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ne,this._geolocateButton.setAttribute("aria-label",ne)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Ki(this._dotElement),this._circleElement=o.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ki({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(we){var Oe=we.originalEvent&&we.originalEvent.type==="resize";!we.geolocateSource&&K._watchState==="ACTIVE_LOCK"&&!Oe&&(K._watchState="BACKGROUND",K._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),K._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),K.fire(new i.Event("trackuserlocationend")))})},D.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":ba--,is=!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"),ba++;var O;ba>1?(O={maximumAge:6e5,timeout:0},is=!0):(O=this.options.positionOptions,is=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,O)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},D.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)},D}(i.Evented),Ga={maxWidth:100,unit:"metric"},Ml=function(D){this.options=i.extend({},Ga,D),i.bindAll(["_onMove","setUnit"],this)};Ml.prototype.getDefaultPosition=function(){return"bottom-left"},Ml.prototype._onMove=function(){zo(this._map,this._container,this.options)},Ml.prototype.onAdd=function(D){return this._map=D,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",D.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Ml.prototype.onRemove=function(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Ml.prototype.setUnit=function(D){this.options.unit=D,zo(this._map,this._container,this.options)};function zo(Y,D,J){var O=J&&J.maxWidth||100,K=Y._container.clientHeight/2,de=Y.unproject([0,K]),ne=Y.unproject([O,K]),we=de.distanceTo(ne);if(J&&J.unit==="imperial"){var Oe=3.2808*we;if(Oe>5280){var ht=Oe/5280;Qs(D,O,ht,Y._getUIString("ScaleControl.Miles"))}else Qs(D,O,Oe,Y._getUIString("ScaleControl.Feet"))}else if(J&&J.unit==="nautical"){var Yt=we/1852;Qs(D,O,Yt,Y._getUIString("ScaleControl.NauticalMiles"))}else we>=1e3?Qs(D,O,we/1e3,Y._getUIString("ScaleControl.Kilometers")):Qs(D,O,we,Y._getUIString("ScaleControl.Meters"))}function Qs(Y,D,J,O){var K=Vl(J),de=K/J;Y.style.width=D*de+"px",Y.innerHTML=K+" "+O}function al(Y){var D=Math.pow(10,Math.ceil(-Math.log(Y)/Math.LN10));return Math.round(Y*D)/D}function Vl(Y){var D=Math.pow(10,(""+Math.floor(Y)).length-1),J=Y/D;return J=J>=10?10:J>=5?5:J>=3?3:J>=2?2:J>=1?1:al(J),D*J}var ss=function(D){this._fullscreen=!1,D&&D.container&&(D.container instanceof i.window.HTMLElement?this._container=D.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")};ss.prototype.onAdd=function(D){return this._map=D,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.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},ss.prototype.onRemove=function(){o.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},ss.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},ss.prototype._setupUI=function(){var D=this._fullscreenButton=o.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);o.create("span","mapboxgl-ctrl-icon",D).setAttribute("aria-hidden",!0),D.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},ss.prototype._updateTitle=function(){var D=this._getTitle();this._fullscreenButton.setAttribute("aria-label",D),this._fullscreenButton.title=D},ss.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},ss.prototype._isFullscreen=function(){return this._fullscreen},ss.prototype._changeIcon=function(){var D=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;D===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},ss.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 Vs={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Ys=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),wa=function(Y){function D(J){Y.call(this),this.options=i.extend(Object.create(Vs),J),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.addTo=function(O){return this._map&&this.remove(),this._map=O,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},D.prototype.isOpen=function(){return!!this._map},D.prototype.remove=function(){return this._content&&o.remove(this._content),this._container&&(o.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},D.prototype.getLngLat=function(){return this._lngLat},D.prototype.setLngLat=function(O){return this._lngLat=i.LngLat.convert(O),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},D.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},D.prototype.getElement=function(){return this._container},D.prototype.setText=function(O){return this.setDOMContent(i.window.document.createTextNode(O))},D.prototype.setHTML=function(O){var K=i.window.document.createDocumentFragment(),de=i.window.document.createElement("body"),ne;for(de.innerHTML=O;ne=de.firstChild,!!ne;)K.appendChild(ne);return this.setDOMContent(K)},D.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},D.prototype.setMaxWidth=function(O){return this.options.maxWidth=O,this._update(),this},D.prototype.setDOMContent=function(O){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(O),this._createCloseButton(),this._update(),this._focusFirstElement(),this},D.prototype.addClassName=function(O){this._container&&this._container.classList.add(O)},D.prototype.removeClassName=function(O){this._container&&this._container.classList.remove(O)},D.prototype.setOffset=function(O){return this.options.offset=O,this._update(),this},D.prototype.toggleClassName=function(O){if(this._container)return this._container.classList.toggle(O)},D.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=o.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))},D.prototype._onMouseUp=function(O){this._update(O.point)},D.prototype._onMouseMove=function(O){this._update(O.point)},D.prototype._onDrag=function(O){this._update(O.point)},D.prototype._update=function(O){var K=this,de=this._lngLat||this._trackPointer;if(!(!this._map||!de||!this._content)&&(this._container||(this._container=o.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=o.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Ne){return K._container.classList.add(Ne)}),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=pn(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!O))){var ne=this._pos=this._trackPointer&&O?O:this._map.project(this._lngLat),we=this.options.anchor,Oe=ol(this.options.offset);if(!we){var ht=this._container.offsetWidth,Yt=this._container.offsetHeight,cr;ne.y+Oe.bottom.ythis._map.transform.height-Yt?cr=["bottom"]:cr=[],ne.xthis._map.transform.width-ht/2&&cr.push("right"),cr.length===0?we="bottom":we=cr.join("-")}var Nt=ne.add(Oe[we]).round();o.setTransform(this._container,Nn[we]+" translate("+Nt.x+"px,"+Nt.y+"px)"),aa(this._container,we,"popup")}},D.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var O=this._container.querySelector(Ys);O&&O.focus()}},D.prototype._onClose=function(){this.remove()},D}(i.Evented);function ol(Y){if(Y)if(typeof Y=="number"){var D=Math.round(Math.sqrt(.5*Math.pow(Y,2)));return{center:new i.Point(0,0),top:new i.Point(0,Y),"top-left":new i.Point(D,D),"top-right":new i.Point(-D,D),bottom:new i.Point(0,-Y),"bottom-left":new i.Point(D,-D),"bottom-right":new i.Point(-D,-D),left:new i.Point(Y,0),right:new i.Point(-Y,0)}}else if(Y instanceof i.Point||Array.isArray(Y)){var J=i.Point.convert(Y);return{center:J,top:J,"top-left":J,"top-right":J,bottom:J,"bottom-left":J,"bottom-right":J,left:J,right:J}}else return{center:i.Point.convert(Y.center||[0,0]),top:i.Point.convert(Y.top||[0,0]),"top-left":i.Point.convert(Y["top-left"]||[0,0]),"top-right":i.Point.convert(Y["top-right"]||[0,0]),bottom:i.Point.convert(Y.bottom||[0,0]),"bottom-left":i.Point.convert(Y["bottom-left"]||[0,0]),"bottom-right":i.Point.convert(Y["bottom-right"]||[0,0]),left:i.Point.convert(Y.left||[0,0]),right:i.Point.convert(Y.right||[0,0])};else return ol(new i.Point(0,0))}var io={version:i.version,supported:a,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:si,NavigationControl:Ui,GeolocateControl:Zs,AttributionControl:Qi,ScaleControl:Ml,FullscreenControl:ss,Popup:wa,Marker:Ki,Style:yu,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:ua,clearPrewarmedResources:ma,get accessToken(){return i.config.ACCESS_TOKEN},set accessToken(Y){i.config.ACCESS_TOKEN=Y},get baseApiUrl(){return i.config.API_URL},set baseApiUrl(Y){i.config.API_URL=Y},get workerCount(){return fn.workerCount},set workerCount(Y){fn.workerCount=Y},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Y){i.config.MAX_PARALLEL_IMAGE_REQUESTS=Y},clearStorage:function(D){i.clearTileCache(D)},workerUrl:""};return io}),r})});var wGe=ye((Vxr,bGe)=>{"use strict";var vw=Pr(),rWt=Zl().sanitizeHTML,iWt=fJ(),yGe=m1();function _Ge(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=yGe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ag=_Ge.prototype;ag.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=n7(t)};ag.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};ag.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};ag.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};ag.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};ag.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapboxLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};ag.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!n7(e)){var r=nWt(e);t.addSource(this.idSource,r)}};ag.findFollowingMapboxLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function xGe(e){var t={},r={};switch(e.type){case"circle":vw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":vw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":vw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=iWt(n.textposition,n.iconsize);vw.extendFlat(t,{"icon-image":n.icon+"-15","icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":i.anchor,"text-offset":i.offset,"symbol-placement":n.placement}),vw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":vw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function nWt(e){var t=e.sourcetype,r=e.source,n={type:t},i;return t==="geojson"?i="data":t==="vector"?i=typeof r=="string"?"url":"tiles":t==="raster"?(i="tiles",n.tileSize=256):t==="image"&&(i="url",n.coordinates=e.coordinates),n[i]=r,e.sourceattribution&&(n.attribution=rWt(e.sourceattribution)),n}bGe.exports=function(t,r,n){var i=new _Ge(t,r);return i.update(n),i}});var PGe=ye((Gxr,LGe)=>{"use strict";var yJ=mJ(),_J=Pr(),MGe=dx(),TGe=Oa(),aWt=ho(),oWt=yv(),a7=ef(),EGe=Cg(),sWt=EGe.drawMode,lWt=EGe.selectMode,uWt=qf().prepSelect,cWt=qf().clearOutline,fWt=qf().clearSelectionsCache,hWt=qf().selectOnClick,Cx=m1(),dWt=wGe();function kGe(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Gh=kGe.prototype;Gh.plot=function(e,t,r){var n=this,i=t[n.id];n.map&&i.accesstoken!==n.accessToken&&(n.map.remove(),n.map=null,n.styleObj=null,n.traceHash={},n.layerList=[]);var a;n.map?a=new Promise(function(o,s){n.updateMap(e,t,o,s)}):a=new Promise(function(o,s){n.createMap(e,t,o,s)}),r.push(a)};Gh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=CGe(a.style,t);i.accessToken=a.accesstoken;var s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null,u=i.map=new yJ.Map({container:i.div,style:o.style,center:xJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new yJ.AttributionControl({compact:!0}));u._canvas.style.left="0px",u._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var c=[];c.push(new Promise(function(f){u.once("load",f)})),c=c.concat(MGe.fetchTraceGeoData(e)),Promise.all(c).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Gh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=CGe(o.style,t);JSON.stringify(i.styleObj)!==JSON.stringify(l)&&(i.styleObj=l,a.setStyle(l.style),i.traceHash={},s.push(new Promise(function(u){a.once("styledata",u)}))),s=s.concat(MGe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Gh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i1)for(i=0;i-1&&hWt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&a7.click(n,l.originalEvent)}}};Gh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[i([u.xmin,u.ymin]),i([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(i)}};var s=t.dragOptions;t.dragOptions=_J.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),lWt(a)||sWt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){uWt(l,u,c,t.dragOptions,a)},oWt.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};Gh.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Gh.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,i;if(r.length!==n.length){for(i=0;i{"use strict";var bJ=Pr(),vWt=q_(),pWt=Kd(),IGe=Yk();RGe.exports=function(t,r,n){vWt(t,r,n,{type:"mapbox",attributes:IGe,handleDefaults:gWt,partition:"y",accessToken:r._mapboxAccessToken})};function gWt(e,t,r,n){r("accesstoken",n.accessToken),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var i=r("bounds.west"),a=r("bounds.east"),o=r("bounds.south"),s=r("bounds.north");(i===void 0||a===void 0||o===void 0||s===void 0)&&delete t.bounds,pWt(e,t,{name:"layers",handleItemDefaults:mWt}),t._input=e}function mWt(e,t){function r(l,u){return bJ.coerce(e,t,IGe.layers,l,u)}var n=r("visible");if(n){var i=r("sourcetype"),a=i==="raster"||i==="image";r("source"),r("sourceattribution"),i==="vector"&&r("sourcelayer"),i==="image"&&r("coordinates");var o;a&&(o="raster");var s=r("type",o);a&&s!=="raster"&&(s=t.type="raster",bJ.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),s==="circle"&&r("circle.radius"),s==="line"&&(r("line.width"),r("line.dash")),s==="fill"&&r("fill.outlinecolor"),s==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),bJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var o7=ye(Np=>{"use strict";var FGe=mJ(),nm=Pr(),wJ=nm.strTranslate,yWt=nm.strScale,_Wt=Id().getSubplotCalcData,xWt=Wp(),bWt=qa(),zGe=So(),wWt=Zl(),TWt=PGe(),Lx="mapbox",sy=Np.constants=m1();Np.name=Lx;Np.attr="subplot";Np.idRoot=Lx;Np.idRegex=Np.attrRegex=nm.counterRegex(Lx);var AWt=["mapbox subplots and traces are deprecated!","Please consider switching to `map` subplots and traces.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");Np.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}};Np.layoutAttributes=Yk();Np.supplyLayoutDefaults=DGe();var qGe=!0;Np.plot=function(t){qGe&&(qGe=!1,nm.warn(AWt));var r=t._fullLayout,n=t.calcdata,i=r._subplots[Lx];if(FGe.version!==sy.requiredVersion)throw new Error(sy.wrongVersionErrorMsg);var a=SWt(t,i);FGe.accessToken=a;for(var o=0;op/2){var k=d.split("|").join("
");m.text(k).attr("data-unformatted",k).call(wWt.convertToTspans,e),b=zGe.bBox(m.node())}m.attr("transform",wJ(-3,-b.height+8)),v.insert("rect",".static-attribution").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:"rgba(255, 255, 255, 0.75)"});var M=1;b.width+6>p&&(M=p/(b.width+6));var T=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];v.attr("transform",wJ(T[0],T[1])+yWt(M))}};function SWt(e,t){var r=e._fullLayout,n=e._context;if(n.mapboxAccessToken==="")return"";for(var i=[],a=[],o=!1,s=!1,l=0;l1&&nm.warn(sy.multipleTokensErrorMsg),i[0]):(a.length&&nm.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function OGe(e){return typeof e=="string"&&(sy.styleValuesMapbox.indexOf(e)!==-1||e.indexOf("mapbox://")===0||e.indexOf("stamen")===0)}Np.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[Lx],n=0;n{"use strict";var Wxr=["*scattermapbox* trace is deprecated!","Please consider switching to the *scattermap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");BGe.exports={attributes:$z(),supplyDefaults:JVe(),colorbar:Qd(),formatLabels:cJ(),calc:bF(),plot:fGe(),hoverPoints:i7().hoverPoints,eventData:pGe(),selectPoints:mGe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermapbox",basePlotModule:o7(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}});var VGe=ye((Zxr,UGe)=>{"use strict";UGe.exports=NGe()});var TJ=ye((Yxr,GGe)=>{"use strict";var y1=o5(),MWt=Tu(),{hovertemplateAttrs:EWt,templatefallbackAttrs:kWt}=Ll(),CWt=Gl(),Px=Ao().extendFlat;GGe.exports=Px({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Px({},y1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:y1.text,hovertext:y1.hovertext,marker:{line:{color:Px({},y1.marker.line.color,{editType:"plot"}),width:Px({},y1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Px({},y1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Px({},y1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Px({},y1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:y1.hoverinfo,hovertemplate:EWt({},{keys:["properties"]}),hovertemplatefallback:kWt(),showlegend:Px({},CWt.showlegend,{dflt:!1})},MWt("",{cLetter:"z",editTypeOverride:"calc"}))});var jGe=ye((Kxr,HGe)=>{"use strict";var Qk=Pr(),LWt=td(),PWt=TJ();HGe.exports=function(t,r,n,i){function a(c,f){return Qk.coerce(t,r,PWt,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!Qk.isArrayOrTypedArray(o)||!o.length||!Qk.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||Qk.isPlainObject(l))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var u=a("marker.line.width");u&&a("marker.line.color"),a("marker.opacity"),LWt(t,r,i,a,{prefix:"",cLetter:"z"}),Qk.coerceSelectionMarkerOpacity(r,a)}});var AJ=ye((Jxr,ZGe)=>{"use strict";var IWt=Eo(),_1=Pr(),RWt=tc(),DWt=So(),FWt=fx().makeBlank,WGe=dx();function zWt(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:"none"},paint:{}},i={layout:{visibility:"none"},paint:{}},a=t._opts={fill:n,line:i,geojson:FWt()};if(!r)return a;var o=WGe.extractTraceFeature(e);if(!o)return a;var s=RWt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;_1.isArrayOrTypedArray(l.opacity)&&(c=function(k){var M=k.mo;return IWt(M)?+_1.constrain(M,0,1):0});var f;_1.isArrayOrTypedArray(u.color)&&(f=function(k){return k.mlc});var h;_1.isArrayOrTypedArray(u.width)&&(h=function(k){return k.mlw});for(var d=0;d{"use strict";var KGe=AJ().convert,qWt=AJ().convertOnSelect,YGe=m1().traceLayerPrefix;function JGe(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",YGe+t+"-fill"],["line",YGe+t+"-line"]],this.below=null}var P5=JGe.prototype;P5.update=function(e){this._update(KGe(e)),e[0].trace._glTrace=this};P5.updateOnSelect=function(e){this._update(qWt(e))};P5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i=0;r--)e.removeLayer(t[r][1])};P5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};$Ge.exports=function(t,r){var n=r[0].trace,i=new JGe(t,n.uid),a=i.sourceId,o=KGe(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),r[0].trace._glTrace=i,i}});var tHe=ye((ebr,eHe)=>{"use strict";var Qxr=["*choroplethmapbox* trace is deprecated!","Please consider switching to the *choroplethmap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");eHe.exports={attributes:TJ(),supplyDefaults:jGe(),colorbar:D_(),calc:VF(),plot:QGe(),hoverPoints:HF(),eventData:jF(),selectPoints:WF(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if(typeof i=="string"&&i.indexOf("water")===0){for(var a=n+1;a{"use strict";rHe.exports=tHe()});var MJ=ye((rbr,aHe)=>{"use strict";var OWt=Tu(),{hovertemplateAttrs:BWt,templatefallbackAttrs:NWt}=Ll(),nHe=Gl(),s7=$z(),SJ=Ao().extendFlat;aHe.exports=SJ({lon:s7.lon,lat:s7.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:s7.text,hovertext:s7.hovertext,hoverinfo:SJ({},nHe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:BWt(),hovertemplatefallback:NWt(),showlegend:SJ({},nHe.showlegend,{dflt:!1})},OWt("",{cLetter:"z",editTypeOverride:"calc"}))});var sHe=ye((ibr,oHe)=>{"use strict";var UWt=Pr(),VWt=td(),GWt=MJ();oHe.exports=function(t,r,n,i){function a(u,c){return UWt.coerce(t,r,GWt,u,c)}var o=a("lon")||[],s=a("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),VWt(t,r,i,a,{prefix:"",cLetter:"z"})}});var cHe=ye((nbr,uHe)=>{"use strict";var EJ=Eo(),HWt=Pr().isArrayOrTypedArray,kJ=fs().BADNUM,jWt=gv(),lHe=Pr()._;uHe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=HWt(a)&&a.length,s=0;s{"use strict";var WWt=Eo(),CJ=Pr(),fHe=ka(),hHe=tc(),dHe=fs().BADNUM,XWt=fx().makeBlank;vHe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,i={layout:{visibility:"none"},paint:{}},a=r._opts={heatmap:i,geojson:XWt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=CJ.isArrayOrTypedArray(l)&&l.length,f=CJ.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var b=hHe.extractOpts(r),p=b.reversescale?hHe.flipScale(b.colorscale):b.colorscale,k=p[0][1],M=fHe.opacity(k)<1?k:fHe.addOpacity(k,0),T=["interpolate",["linear"],["heatmap-density"],0,M];for(s=1;s{"use strict";var gHe=pHe(),ZWt=m1().traceLayerPrefix;function mHe(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",ZWt+t+"-heatmap"]],this.below=null}var l7=mHe.prototype;l7.update=function(e){var t=this.subplot,r=this.layerList,n=gHe(e),i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(n,i),this.below=i);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};l7.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};yHe.exports=function(t,r){var n=r[0].trace,i=new mHe(t,n.uid),a=i.sourceId,o=gHe(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),i}});var bHe=ye((sbr,xHe)=>{"use strict";var YWt=ho(),KWt=i7().hoverPoints,JWt=i7().getExtraText;xHe.exports=function(t,r,n){var i=KWt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,"z"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=YWt.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=JWt(s,l,o[0].t.labels),[a]}}});var THe=ye((lbr,wHe)=>{"use strict";wHe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var SHe=ye((cbr,AHe)=>{"use strict";var ubr=["*densitymapbox* trace is deprecated!","Please consider switching to the *densitymap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");AHe.exports={attributes:MJ(),supplyDefaults:sHe(),colorbar:D_(),formatLabels:cJ(),calc:cHe(),plot:_He(),hoverPoints:bHe(),eventData:THe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";MHe.exports=SHe()});var CHe=ye((hbr,kHe)=>{kHe.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} +{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} +{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-1",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:14,filter:["all",["==","$type","Point"],["<=","rank",14],["has","name"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} +{name:nonlatin}`,"text-offset":[0,.6],"text-size":11,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{id:"poi-railway",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:13,filter:["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} +{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9,"icon-optional":!1,"icon-ignore-placement":!1,"icon-allow-overlap":!1,"text-ignore-placement":!1,"text-allow-overlap":!1,"text-optional":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"road_oneway",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"road_oneway_opposite",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==","class","path"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==","$type","LineString"],["in","class","minor","service","track"]],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["in","class","primary","secondary","tertiary","trunk"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-shield",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:8,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:7,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-other",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:9,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"place-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:12,filter:["!in","class","city","town","village","country","continent"],layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":`{name:latin} +{name:nonlatin}`,"text-transform":"uppercase","text-max-width":9,visibility:"visible"},paint:{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{id:"place-village",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:10,filter:["==","class","village"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,12],[15,16]]},"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}});var PHe=ye((dbr,LHe)=>{LHe.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}});var Ix=ye((vbr,zHe)=>{"use strict";var $Wt=t_(),QWt=CHe(),eXt=PHe(),tXt='\xA9 OpenStreetMap contributors',IHe="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",RHe="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",u7="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",rXt="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",iXt="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",nXt="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",FHe={basic:u7,streets:u7,outdoors:u7,light:IHe,dark:RHe,satellite:eXt,"satellite-streets":QWt,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:tXt,tiles:["https://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":IHe,"carto-darkmatter":RHe,"carto-voyager":u7,"carto-positron-nolabels":rXt,"carto-darkmatter-nolabels":iXt,"carto-voyager-nolabels":nXt},DHe=$Wt(FHe);zHe.exports={styleValueDflt:"basic",stylesMap:FHe,styleValuesMap:DHe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",DHe.join(", "),"or use a tile service."].join(` +`),mapOnErrorMsg:"Map error."}});var eC=ye((pbr,UHe)=>{"use strict";var qHe=Pr(),OHe=ka().defaultLine,aXt=Cc().attributes,oXt=ec(),sXt=pf().textposition,lXt=mc().overrideAll,uXt=vl().templatedArray,BHe=Ix(),NHe=oXt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});NHe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var cXt=UHe.exports=lXt({_arrayAttrRegexps:[qHe.counterRegex("map",".layers",!0)],domain:aXt({name:"map"}),style:{valType:"any",values:BHe.styleValuesMap,dflt:BHe.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:uXt("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:OHe},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:OHe}},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:NHe,textposition:qHe.extendFlat({},sXt,{arrayOk:!1})}})},"plot","from-root");cXt.uirevision={valType:"any",editType:"none"}});var c7=ye((gbr,jHe)=>{"use strict";var{hovertemplateAttrs:fXt,texttemplateAttrs:hXt,templatefallbackAttrs:VHe}=Ll(),dXt=Pg(),tC=tw(),I5=pf(),GHe=eC(),vXt=Gl(),pXt=Tu(),pw=Ao().extendFlat,gXt=mc().overrideAll,mXt=eC(),HHe=tC.line,R5=tC.marker;jHe.exports=gXt({lon:tC.lon,lat:tC.lat,cluster:{enabled:{valType:"boolean"},maxzoom:pw({},mXt.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:pw({},R5.opacity,{dflt:1})},mode:pw({},I5.mode,{dflt:"markers"}),text:pw({},I5.text,{}),texttemplate:hXt({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:VHe({editType:"plot"}),hovertext:pw({},I5.hovertext,{}),line:{color:HHe.color,width:HHe.width},connectgaps:I5.connectgaps,marker:pw({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:R5.opacity,size:R5.size,sizeref:R5.sizeref,sizemin:R5.sizemin,sizemode:R5.sizemode},pXt("marker")),fill:tC.fill,fillcolor:dXt(),textfont:GHe.layers.symbol.textfont,textposition:GHe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:I5.selected.marker},unselected:{marker:I5.unselected.marker},hoverinfo:pw({},vXt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:fXt(),hovertemplatefallback:VHe()},"calc","nested")});var LJ=ye((mbr,WHe)=>{"use strict";var yXt=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];WHe.exports={isSupportedFont:function(e){return yXt.indexOf(e)!==-1}}});var YHe=ye((ybr,ZHe)=>{"use strict";var rC=Pr(),PJ=Ru(),_Xt=$p(),xXt=D0(),bXt=F0(),wXt=Fg(),XHe=c7(),TXt=LJ().isSupportedFont;ZHe.exports=function(t,r,n,i){function a(p,k){return rC.coerce(t,r,XHe,p,k)}function o(p,k){return rC.coerce2(t,r,XHe,p,k)}var s=AXt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),a("below"),PJ.hasMarkers(r)){_Xt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(rC.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),rC.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}PJ.hasLines(r)&&(xXt(t,r,n,i,a,{noDash:!0}),a("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),d=o("cluster.opacity"),v=u!==!1||c!==!1||f!==!1||h!==!1||d!==!1,m=a("cluster.enabled",v);if(m||PJ.hasText(r)){var b=i.font.family;bXt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:TXt(b)?b:"Open Sans Regular",weight:i.font.weight,style:i.font.style,size:i.font.size,color:i.font.color}})}a("fill"),r.fill!=="none"&&wXt(t,r,n,a),rC.coerceSelectionMarkerOpacity(r,a)};function AXt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var IJ=ye((_br,JHe)=>{"use strict";var KHe=ho();JHe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=KHe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=KHe.tickText(o,o.c2l(s[1]),!0).text,i}});var RJ=ye((xbr,QHe)=>{"use strict";var $He=Pr();QHe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=$He.isArrayOrTypedArray(r)?$He.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(i){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(a){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var aje=ye((bbr,nje)=>{"use strict";var rje=Eo(),sv=Pr(),SXt=fs().BADNUM,h7=fx(),eje=tc(),MXt=So(),EXt=B3(),d7=Ru(),kXt=LJ().isSupportedFont,CXt=RJ(),LXt=ip().appendArrayPointValue,PXt=Zl().NEWLINES,IXt=Zl().BR_TAG_ALL;nje.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=d7.hasLines(n),s=d7.hasMarkers(n),l=d7.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,h=f7("fill"),d=f7("line"),v=f7("circle"),m=f7("symbol"),b={fill:h,line:d,circle:v,symbol:m};if(!i)return b;var p;if((a||o)&&(p=h7.calcTraceToLineCoords(r)),a&&(h.geojson=h7.makePolygon(p),h.layout.visibility="visible",sv.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=h7.makeLine(p),d.layout.visibility="visible",sv.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var k=RXt(r);v.geojson=k.geojson,v.layout.visibility="visible",f&&(v.filter=["!",["has","point_count"]],b.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":FJ(n.cluster.color,n.cluster.step),"circle-radius":FJ(n.cluster.size,n.cluster.step),"circle-opacity":FJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":tje(n),"text-size":12}}),sv.extendFlat(v.paint,{"circle-color":k.mcc,"circle-radius":k.mrc,"circle-opacity":k.mo})}if(u&&f&&(v.filter=["!",["has","point_count"]]),(c||l)&&(m.geojson=DXt(r,t),sv.extendFlat(m.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),c&&(sv.extendFlat(m.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&sv.extendFlat(m.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),m.layout["icon-allow-overlap"]=n.marker.allowoverlap,sv.extendFlat(m.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),l)){var M=(n.marker||{}).size,T=CXt(n.textposition,M);sv.extendFlat(m.layout,{"text-size":n.textfont.size,"text-anchor":T.anchor,"text-offset":T.offset,"text-font":tje(n)}),sv.extendFlat(m.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function f7(e){return{type:e,geojson:h7.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function RXt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=sv.isArrayOrTypedArray(r.color),a=sv.isArrayOrTypedArray(r.size),o=sv.isArrayOrTypedArray(r.opacity),s;function l(M){return t.opacity*M}function u(M){return M/2}var c;i&&(eje.hasColorscale(t,"marker")?c=eje.makeColorScaleFuncFromTrace(r):c=sv.identity);var f;a&&(f=EXt(t));var h;o&&(h=function(M){var T=rje(M)?+sv.constrain(M,0,1):0;return l(T)});var d=[];for(s=0;s850?s+=" Black":i>750?s+=" Extra Bold":i>650?s+=" Bold":i>550?s+=" Semi Bold":i>450?s+=" Medium":i>350?s+=" Regular":i>250?s+=" Light":i>150?s+=" Extra Light":s+=" Thin"):a.slice(0,2).join(" ")==="Open Sans"?(s="Open Sans",i>750?s+=" Extrabold":i>650?s+=" Bold":i>550?s+=" Semibold":i>350?s+=" Regular":s+=" Light"):a.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(s="Klokantech Noto Sans",a[3]==="CJK"&&(s+=" CJK"),s+=i>500?" Bold":" Regular")),o&&(s+=" Italic"),s==="Open Sans Regular Italic"?s="Open Sans Italic":s==="Open Sans Regular Bold"?s="Open Sans Bold":s==="Open Sans Regular Bold Italic"?s="Open Sans Bold Italic":s==="Klokantech Noto Sans Regular Italic"&&(s="Klokantech Noto Sans Italic"),kXt(s)||(s=r);var l=s.split(", ");return l}});var uje=ye((wbr,lje)=>{"use strict";var FXt=Pr(),oje=aje(),D5=Ix().traceLayerPrefix,og={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function sje(e,t,r,n){this.type="scattermap",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:D5+t+"-fill",line:D5+t+"-line",circle:D5+t+"-circle",symbol:D5+t+"-symbol",cluster:D5+t+"-cluster",clusterCount:D5+t+"-cluster-count"},this.below=null}var iC=sje.prototype;iC.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&FXt.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[e]);i?i.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};iC.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};iC.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s=0;L--){var x=T[L];i.removeLayer(u.layerIds[x])}M||i.removeSource(u.sourceIds.circle)}function h(M){for(var T=og.nonCluster,L=0;L=0;L--){var x=T[L];i.removeLayer(u.layerIds[x]),M||i.removeSource(u.sourceIds[x])}}function v(M){l?f(M):d(M)}function m(M){s?c(M):h(M)}function b(){for(var M=s?og.cluster:og.nonCluster,T=0;T=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};lje.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new sje(t,n.uid,i,a),s=oje(t.gd,r),l=o.below=t.belowLookup["trace-"+n.uid],u,c,f;if(i)for(o.addSource("circle",s.circle,n.cluster),u=0;u{"use strict";var zXt=ef(),zJ=Pr(),qXt=yT(),OXt=zJ.fillText,BXt=fs().BADNUM,NXt=Ix().traceLayerPrefix;function UXt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=NXt+i.uid+"-circle",c=i.cluster&&i.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(S){return S.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,v=t-d;function m(S){var g=S.lonlat;if(g[0]===BXt||c&&l.indexOf(S.i+1)===-1)return 1/0;var P=zJ.modHalf(g[0],360),E=g[1],z=s.project([P,E]),q=z.x-a.c2p([v,E]),V=z.y-o.c2p([P,r]),G=Math.max(3,S.mrc||0);return Math.max(Math.sqrt(q*q+V*V)-G,1-3/G)}if(zXt.getClosest(n,m,e),e.index!==!1){var b=n[e.index],p=b.lonlat,k=[zJ.modHalf(p[0],360)+d,p[1]],M=a.c2p(k),T=o.c2p(k),L=b.mrc||1;e.x0=M-L,e.x1=M+L,e.y0=T-L,e.y1=T+L;var x={};x[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,x);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=qXt(i,b),e.extraText=cje(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function cje(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,i=n.split("+"),a=i.indexOf("all")!==-1,o=i.indexOf("lon")!==-1,s=i.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return a||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||i.indexOf("text")!==-1)&&OXt(t,e,u),u.join("
")}fje.exports={hoverPoints:UXt,getExtraText:cje}});var dje=ye((Abr,hje)=>{"use strict";hje.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var pje=ye((Sbr,vje)=>{"use strict";var VXt=Pr(),GXt=Ru(),HXt=fs().BADNUM;vje.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!GXt.hasMarkers(s))return[];if(r===!1)for(l=0;l{(function(e,t){typeof qJ=="object"&&typeof OJ!="undefined"?OJ.exports=t():(e=typeof globalThis!="undefined"?globalThis:e||self,e.maplibregl=t())})(qJ,function(){"use strict";var e={},t={};function r(i,a,o){if(t[i]=o,i==="index"){var s="var sharedModule = {}; ("+t.shared+")(sharedModule); ("+t.worker+")(sharedModule);",l={};return t.shared(l),t.index(e,l),typeof window!="undefined"&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([s],{type:"text/javascript"}))),e}}r("shared",["exports"],function(i){"use strict";function a(R,A,F,W){return new(F||(F=Promise))(function(te,fe){function pe(ft){try{Ke(W.next(ft))}catch(Rt){fe(Rt)}}function Re(ft){try{Ke(W.throw(ft))}catch(Rt){fe(Rt)}}function Ke(ft){var Rt;ft.done?te(ft.value):(Rt=ft.value,Rt instanceof F?Rt:new F(function(er){er(Rt)})).then(pe,Re)}Ke((W=W.apply(R,A||[])).next())})}function o(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}typeof SuppressedError=="function"&&SuppressedError;var s=l;function l(R,A){this.x=R,this.y=A}l.prototype={clone:function(){return new l(this.x,this.y)},add:function(R){return this.clone()._add(R)},sub:function(R){return this.clone()._sub(R)},multByPoint:function(R){return this.clone()._multByPoint(R)},divByPoint:function(R){return this.clone()._divByPoint(R)},mult:function(R){return this.clone()._mult(R)},div:function(R){return this.clone()._div(R)},rotate:function(R){return this.clone()._rotate(R)},rotateAround:function(R,A){return this.clone()._rotateAround(R,A)},matMult:function(R){return this.clone()._matMult(R)},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(R){return this.x===R.x&&this.y===R.y},dist:function(R){return Math.sqrt(this.distSqr(R))},distSqr:function(R){var A=R.x-this.x,F=R.y-this.y;return A*A+F*F},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(R){return Math.atan2(this.y-R.y,this.x-R.x)},angleWith:function(R){return this.angleWithSep(R.x,R.y)},angleWithSep:function(R,A){return Math.atan2(this.x*A-this.y*R,this.x*R+this.y*A)},_matMult:function(R){var A=R[2]*this.x+R[3]*this.y;return this.x=R[0]*this.x+R[1]*this.y,this.y=A,this},_add:function(R){return this.x+=R.x,this.y+=R.y,this},_sub:function(R){return this.x-=R.x,this.y-=R.y,this},_mult:function(R){return this.x*=R,this.y*=R,this},_div:function(R){return this.x/=R,this.y/=R,this},_multByPoint:function(R){return this.x*=R.x,this.y*=R.y,this},_divByPoint:function(R){return this.x/=R.x,this.y/=R.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var R=this.y;return this.y=this.x,this.x=-R,this},_rotate:function(R){var A=Math.cos(R),F=Math.sin(R),W=F*this.x+A*this.y;return this.x=A*this.x-F*this.y,this.y=W,this},_rotateAround:function(R,A){var F=Math.cos(R),W=Math.sin(R),te=A.y+W*(this.x-A.x)+F*(this.y-A.y);return this.x=A.x+F*(this.x-A.x)-W*(this.y-A.y),this.y=te,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},l.convert=function(R){return R instanceof l?R:Array.isArray(R)?new l(R[0],R[1]):R};var u=o(s),c=f;function f(R,A,F,W){this.cx=3*R,this.bx=3*(F-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*A,this.by=3*(W-A)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=A,this.p2x=F,this.p2y=W}f.prototype={sampleCurveX:function(R){return((this.ax*R+this.bx)*R+this.cx)*R},sampleCurveY:function(R){return((this.ay*R+this.by)*R+this.cy)*R},sampleCurveDerivativeX:function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},solveCurveX:function(R,A){if(A===void 0&&(A=1e-6),R<0)return 0;if(R>1)return 1;for(var F=R,W=0;W<8;W++){var te=this.sampleCurveX(F)-R;if(Math.abs(te)te?pe=F:Re=F,F=.5*(Re-pe)+pe;return F},solve:function(R,A){return this.sampleCurveY(this.solveCurveX(R,A))}};var h=o(c);let d,v;function m(){return d==null&&(d=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),d}function b(){if(v==null&&(v=!1,m())){let A=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(A){for(let W=0;W<5*5;W++){let te=4*W;A.fillStyle=`rgb(${te},${te+1},${te+2})`,A.fillRect(W%5,Math.floor(W/5),1,1)}let F=A.getImageData(0,0,5,5).data;for(let W=0;W<5*5*4;W++)if(W%4!=3&&F[W]!==W){v=!0;break}}}return v||!1}function p(R,A,F,W){let te=new h(R,A,F,W);return fe=>te.solve(fe)}let k=p(.25,.1,.25,1);function M(R,A,F){return Math.min(F,Math.max(A,R))}function T(R,A,F){let W=F-A,te=((R-A)%W+W)%W+A;return te===A?F:te}function L(R,...A){for(let F of A)for(let W in F)R[W]=F[W];return R}let x=1;function C(R,A,F){let W={};for(let te in R)W[te]=A.call(this,R[te],te,R);return W}function S(R,A,F){let W={};for(let te in R)A.call(this,R[te],te,R)&&(W[te]=R[te]);return W}function g(R){return Array.isArray(R)?R.map(g):typeof R=="object"&&R?C(R,g):R}let P={};function E(R){P[R]||(typeof console!="undefined"&&console.warn(R),P[R]=!0)}function z(R,A,F){return(F.y-R.y)*(A.x-R.x)>(A.y-R.y)*(F.x-R.x)}function q(R){return typeof WorkerGlobalScope!="undefined"&&R!==void 0&&R instanceof WorkerGlobalScope}let V=null;function G(R){return typeof ImageBitmap!="undefined"&&R instanceof ImageBitmap}let Z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function j(R,A,F,W,te){return a(this,void 0,void 0,function*(){if(typeof VideoFrame=="undefined")throw new Error("VideoFrame not supported");let fe=new VideoFrame(R,{timestamp:0});try{let pe=fe==null?void 0:fe.format;if(!pe||!pe.startsWith("BGR")&&!pe.startsWith("RGB"))throw new Error(`Unrecognized format ${pe}`);let Re=pe.startsWith("BGR"),Ke=new Uint8ClampedArray(W*te*4);if(yield fe.copyTo(Ke,function(ft,Rt,er,ur,vr){let kr=4*Math.max(-Rt,0),Dr=(Math.max(0,er)-er)*ur*4+kr,li=4*ur,pi=Math.max(0,Rt),vn=Math.max(0,er);return{rect:{x:pi,y:vn,width:Math.min(ft.width,Rt+ur)-pi,height:Math.min(ft.height,er+vr)-vn},layout:[{offset:Dr,stride:li}]}}(R,A,F,W,te)),Re)for(let ft=0;ftq(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Se=function(R,A){if(/:\/\//.test(R.url)&&!/^https?:|^file:/.test(R.url)){let W=Ee(R.url);if(W)return W(R,A);if(q(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:R,targetMapId:Ce},A)}if(!(/^file:/.test(F=R.url)||/^file:/.test(re())&&!/^\w+:/.test(F))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(W,te){return a(this,void 0,void 0,function*(){let fe=new Request(W.url,{method:W.method||"GET",body:W.body,credentials:W.credentials,headers:W.headers,cache:W.cache,referrer:re(),signal:te.signal});W.type!=="json"||fe.headers.has("Accept")||fe.headers.set("Accept","application/json");let pe=yield fetch(fe);if(!pe.ok){let ft=yield pe.blob();throw new ge(pe.status,pe.statusText,W.url,ft)}let Re;Re=W.type==="arrayBuffer"||W.type==="image"?pe.arrayBuffer():W.type==="json"?pe.json():pe.text();let Ke=yield Re;if(te.signal.aborted)throw ae();return{data:Ke,cacheControl:pe.headers.get("Cache-Control"),expires:pe.headers.get("Expires")}})}(R,A);if(q(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:R,mustQueue:!0,targetMapId:Ce},A)}var F;return function(W,te){return new Promise((fe,pe)=>{var Re;let Ke=new XMLHttpRequest;Ke.open(W.method||"GET",W.url,!0),W.type!=="arrayBuffer"&&W.type!=="image"||(Ke.responseType="arraybuffer");for(let ft in W.headers)Ke.setRequestHeader(ft,W.headers[ft]);W.type==="json"&&(Ke.responseType="text",!((Re=W.headers)===null||Re===void 0)&&Re.Accept||Ke.setRequestHeader("Accept","application/json")),Ke.withCredentials=W.credentials==="include",Ke.onerror=()=>{pe(new Error(Ke.statusText))},Ke.onload=()=>{if(!te.signal.aborted)if((Ke.status>=200&&Ke.status<300||Ke.status===0)&&Ke.response!==null){let ft=Ke.response;if(W.type==="json")try{ft=JSON.parse(Ke.response)}catch(Rt){return void pe(Rt)}fe({data:ft,cacheControl:Ke.getResponseHeader("Cache-Control"),expires:Ke.getResponseHeader("Expires")})}else{let ft=new Blob([Ke.response],{type:Ke.getResponseHeader("Content-Type")});pe(new ge(Ke.status,Ke.statusText,W.url,ft))}},te.signal.addEventListener("abort",()=>{Ke.abort(),pe(ae())}),Ke.send(W.body)})}(R,A)};function ke(R){if(!R||R.indexOf("://")<=0||R.indexOf("data:image/")===0||R.indexOf("blob:")===0)return!0;let A=new URL(R),F=window.location;return A.protocol===F.protocol&&A.host===F.host}function be(R,A,F){F[R]&&F[R].indexOf(A)!==-1||(F[R]=F[R]||[],F[R].push(A))}function Be(R,A,F){if(F&&F[R]){let W=F[R].indexOf(A);W!==-1&&F[R].splice(W,1)}}class Le{constructor(A,F={}){L(this,F),this.type=A}}class me extends Le{constructor(A,F={}){super("error",L({error:A},F))}}class Pe{on(A,F){return this._listeners=this._listeners||{},be(A,F,this._listeners),this}off(A,F){return Be(A,F,this._listeners),Be(A,F,this._oneTimeListeners),this}once(A,F){return F?(this._oneTimeListeners=this._oneTimeListeners||{},be(A,F,this._oneTimeListeners),this):new Promise(W=>this.once(A,W))}fire(A,F){typeof A=="string"&&(A=new Le(A,F||{}));let W=A.type;if(this.listens(W)){A.target=this;let te=this._listeners&&this._listeners[W]?this._listeners[W].slice():[];for(let Re of te)Re.call(this,A);let fe=this._oneTimeListeners&&this._oneTimeListeners[W]?this._oneTimeListeners[W].slice():[];for(let Re of fe)Be(W,Re,this._oneTimeListeners),Re.call(this,A);let pe=this._eventedParent;pe&&(L(A,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),pe.fire(A))}else A instanceof me&&console.error(A.error);return this}listens(A){return this._listeners&&this._listeners[A]&&this._listeners[A].length>0||this._oneTimeListeners&&this._oneTimeListeners[A]&&this._oneTimeListeners[A].length>0||this._eventedParent&&this._eventedParent.listens(A)}setEventedParent(A,F){return this._eventedParent=A,this._eventedParentData=F,this}}var ce={$version:8,$root:{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"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{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:"*"}},source_raster:{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:"*"}},source_raster_dem:{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:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,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"}},source_video:{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"}}},source_image:{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"}}},layer:{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"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"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"}},layout_circle:{"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"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"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"}},layout_symbol:{"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",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},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:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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:{},"viewport-glyph":{},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-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},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"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},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:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{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}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"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"}},"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:{"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"}},paint_circle:{"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"}},paint_heatmap:{"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"}},paint_symbol:{"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"}},paint_raster:{"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"}},paint_hillshade:{"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"}},paint_background:{"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"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"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:{"*":{type:"string"}}};let He=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function lt(R,A){let F={};for(let W in R)W!=="ref"&&(F[W]=R[W]);return He.forEach(W=>{W in A&&(F[W]=A[W])}),F}function mt(R,A){if(Array.isArray(R)){if(!Array.isArray(A)||R.length!==A.length)return!1;for(let F=0;F`:R.itemType.kind==="value"?"array":`array<${A}>`}return R.kind}let We=[Tt,dt,Et,pt,jt,ei,or,Ge(mr),qr,jr,gt];function et(R,A){if(A.kind==="error")return null;if(R.kind==="array"){if(A.kind==="array"&&(A.N===0&&A.itemType.kind==="value"||!et(R.itemType,A.itemType))&&(typeof R.N!="number"||R.N===A.N))return null}else{if(R.kind===A.kind)return null;if(R.kind==="value"){for(let F of We)if(!et(F,A))return null}}return`Expected ${Je(R)} but found ${Je(A)} instead.`}function xt(R,A){return A.some(F=>F.kind===R.kind)}function At(R,A){return A.some(F=>F==="null"?R===null:F==="array"?Array.isArray(R):F==="object"?R&&!Array.isArray(R)&&typeof R=="object":F===typeof R)}function Kt(R,A){return R.kind==="array"&&A.kind==="array"?R.itemType.kind===A.itemType.kind&&typeof R.N=="number":R.kind===A.kind}let Qt=.96422,Mr=.82521,Gr=4/29,Ir=6/29,Yr=3*Ir*Ir,_i=Ir*Ir*Ir,Pi=Math.PI/180,ai=180/Math.PI;function mi(R){return(R%=360)<0&&(R+=360),R}function un([R,A,F,W]){let te,fe,pe=An((.2225045*(R=Fn(R))+.7168786*(A=Fn(A))+.0606169*(F=Fn(F)))/1);R===A&&A===F?te=fe=pe:(te=An((.4360747*R+.3850649*A+.1430804*F)/Qt),fe=An((.0139322*R+.0971045*A+.7141733*F)/Mr));let Re=116*pe-16;return[Re<0?0:Re,500*(te-pe),200*(pe-fe),W]}function Fn(R){return R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function An(R){return R>_i?Math.pow(R,1/3):R/Yr+Gr}function Hn([R,A,F,W]){let te=(R+16)/116,fe=isNaN(A)?te:te+A/500,pe=isNaN(F)?te:te-F/200;return te=1*Vi(te),fe=Qt*Vi(fe),pe=Mr*Vi(pe),[Qn(3.1338561*fe-1.6168667*te-.4906146*pe),Qn(-.9787684*fe+1.9161415*te+.033454*pe),Qn(.0719453*fe-.2289914*te+1.4052427*pe),W]}function Qn(R){return(R=R<=.00304?12.92*R:1.055*Math.pow(R,1/2.4)-.055)<0?0:R>1?1:R}function Vi(R){return R>Ir?R*R*R:Yr*(R-Gr)}function Kn(R){return parseInt(R.padEnd(2,R),16)/255}function Jn(R,A){return Gt(A?R/100:R,0,1)}function Gt(R,A,F){return Math.min(Math.max(A,R),F)}function wt(R){return!R.some(Number.isNaN)}let tr={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]};class ir{constructor(A,F,W,te=1,fe=!0){this.r=A,this.g=F,this.b=W,this.a=te,fe||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter("rgb",[A,F,W,te]))}static parse(A){if(A instanceof ir)return A;if(typeof A!="string")return;let F=function(W){if((W=W.toLowerCase().trim())==="transparent")return[0,0,0,0];let te=tr[W];if(te){let[pe,Re,Ke]=te;return[pe/255,Re/255,Ke/255,1]}if(W.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(W)){let pe=W.length<6?1:2,Re=1;return[Kn(W.slice(Re,Re+=pe)),Kn(W.slice(Re,Re+=pe)),Kn(W.slice(Re,Re+=pe)),Kn(W.slice(Re,Re+pe)||"ff")]}if(W.startsWith("rgb")){let pe=W.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(pe){let[Re,Ke,ft,Rt,er,ur,vr,kr,Dr,li,pi,vn]=pe,zi=[Rt||" ",vr||" ",li].join("");if(zi===" "||zi===" /"||zi===",,"||zi===",,,"){let ln=[ft,ur,Dr].join(""),Tn=ln==="%%%"?100:ln===""?255:0;if(Tn){let pa=[Gt(+Ke/Tn,0,1),Gt(+er/Tn,0,1),Gt(+kr/Tn,0,1),pi?Jn(+pi,vn):1];if(wt(pa))return pa}}return}}let fe=W.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(fe){let[pe,Re,Ke,ft,Rt,er,ur,vr,kr]=fe,Dr=[Ke||" ",Rt||" ",ur].join("");if(Dr===" "||Dr===" /"||Dr===",,"||Dr===",,,"){let li=[+Re,Gt(+ft,0,100),Gt(+er,0,100),vr?Jn(+vr,kr):1];if(wt(li))return function([pi,vn,zi,ln]){function Tn(pa){let ro=(pa+pi/30)%12,Vo=vn*Math.min(zi,1-zi);return zi-Vo*Math.max(-1,Math.min(ro-3,9-ro,1))}return pi=mi(pi),vn/=100,zi/=100,[Tn(0),Tn(8),Tn(4),ln]}(li)}}}(A);return F?new ir(...F,!1):void 0}get rgb(){let{r:A,g:F,b:W,a:te}=this,fe=te||1/0;return this.overwriteGetter("rgb",[A/fe,F/fe,W/fe,te])}get hcl(){return this.overwriteGetter("hcl",function(A){let[F,W,te,fe]=un(A),pe=Math.sqrt(W*W+te*te);return[Math.round(1e4*pe)?mi(Math.atan2(te,W)*ai):NaN,pe,F,fe]}(this.rgb))}get lab(){return this.overwriteGetter("lab",un(this.rgb))}overwriteGetter(A,F){return Object.defineProperty(this,A,{value:F}),F}toString(){let[A,F,W,te]=this.rgb;return`rgba(${[A,F,W].map(fe=>Math.round(255*fe)).join(",")},${te})`}}ir.black=new ir(0,0,0,1),ir.white=new ir(1,1,1,1),ir.transparent=new ir(0,0,0,0),ir.red=new ir(1,0,0,1);class wr{constructor(A,F,W){this.sensitivity=A?F?"variant":"case":F?"accent":"base",this.locale=W,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(A,F){return this.collator.compare(A,F)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Xr{constructor(A,F,W,te,fe){this.text=A,this.image=F,this.scale=W,this.fontStack=te,this.textColor=fe}}class ti{constructor(A){this.sections=A}static fromString(A){return new ti([new Xr(A,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(A=>A.text.length!==0||A.image&&A.image.name.length!==0)}static factory(A){return A instanceof ti?A:ti.fromString(A)}toString(){return this.sections.length===0?"":this.sections.map(A=>A.text).join("")}}class $r{constructor(A){this.values=A.slice()}static parse(A){if(A instanceof $r)return A;if(typeof A=="number")return new $r([A,A,A,A]);if(Array.isArray(A)&&!(A.length<1||A.length>4)){for(let F of A)if(typeof F!="number")return;switch(A.length){case 1:A=[A[0],A[0],A[0],A[0]];break;case 2:A=[A[0],A[1],A[0],A[1]];break;case 3:A=[A[0],A[1],A[2],A[1]]}return new $r(A)}}toString(){return JSON.stringify(this.values)}}let Ri=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Zi{constructor(A){this.values=A.slice()}static parse(A){if(A instanceof Zi)return A;if(Array.isArray(A)&&!(A.length<1)&&A.length%2==0){for(let F=0;F=0&&R<=255&&typeof A=="number"&&A>=0&&A<=255&&typeof F=="number"&&F>=0&&F<=255?W===void 0||typeof W=="number"&&W>=0&&W<=1?null:`Invalid rgba value [${[R,A,F,W].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof W=="number"?[R,A,F,W]:[R,A,F]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function yn(R){if(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number"||R instanceof ir||R instanceof wr||R instanceof ti||R instanceof $r||R instanceof Zi||R instanceof en)return!0;if(Array.isArray(R)){for(let A of R)if(!yn(A))return!1;return!0}if(typeof R=="object"){for(let A in R)if(!yn(R[A]))return!1;return!0}return!1}function Mn(R){if(R===null)return Tt;if(typeof R=="string")return Et;if(typeof R=="boolean")return pt;if(typeof R=="number")return dt;if(R instanceof ir)return jt;if(R instanceof wr)return Ar;if(R instanceof ti)return ei;if(R instanceof $r)return qr;if(R instanceof Zi)return gt;if(R instanceof en)return jr;if(Array.isArray(R)){let A=R.length,F;for(let W of R){let te=Mn(W);if(F){if(F===te)continue;F=mr;break}F=te}return Ge(F||mr,A)}return or}function Ba(R){let A=typeof R;return R===null?"":A==="string"||A==="number"||A==="boolean"?String(R):R instanceof ir||R instanceof ti||R instanceof $r||R instanceof Zi||R instanceof en?R.toString():JSON.stringify(R)}class ua{constructor(A,F){this.type=A,this.value=F}static parse(A,F){if(A.length!==2)return F.error(`'literal' expression requires exactly one argument, but found ${A.length-1} instead.`);if(!yn(A[1]))return F.error("invalid value");let W=A[1],te=Mn(W),fe=F.expectedType;return te.kind!=="array"||te.N!==0||!fe||fe.kind!=="array"||typeof fe.N=="number"&&fe.N!==0||(te=fe),new ua(te,W)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ma{constructor(A){this.name="ExpressionEvaluationError",this.message=A}toJSON(){return this.message}}let Wa={string:Et,number:dt,boolean:pt,object:or};class Fa{constructor(A,F){this.type=A,this.args=F}static parse(A,F){if(A.length<2)return F.error("Expected at least one argument.");let W,te=1,fe=A[0];if(fe==="array"){let Re,Ke;if(A.length>2){let ft=A[1];if(typeof ft!="string"||!(ft in Wa)||ft==="object")return F.error('The item type argument of "array" must be one of string, number, boolean',1);Re=Wa[ft],te++}else Re=mr;if(A.length>3){if(A[2]!==null&&(typeof A[2]!="number"||A[2]<0||A[2]!==Math.floor(A[2])))return F.error('The length argument to "array" must be a positive integer literal',2);Ke=A[2],te++}W=Ge(Re,Ke)}else{if(!Wa[fe])throw new Error(`Types doesn't contain name = ${fe}`);W=Wa[fe]}let pe=[];for(;teA.outputDefined())}}let Xo={"to-boolean":pt,"to-color":jt,"to-number":dt,"to-string":Et};class da{constructor(A,F){this.type=A,this.args=F}static parse(A,F){if(A.length<2)return F.error("Expected at least one argument.");let W=A[0];if(!Xo[W])throw new Error(`Can't parse ${W} as it is not part of the known types`);if((W==="to-boolean"||W==="to-string")&&A.length!==2)return F.error("Expected one argument.");let te=Xo[W],fe=[];for(let pe=1;pe4?`Invalid rbga value ${JSON.stringify(F)}: expected an array containing either three or four numeric values.`:fn(F[0],F[1],F[2],F[3]),!W))return new ir(F[0]/255,F[1]/255,F[2]/255,F[3])}throw new ma(W||`Could not parse color from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"padding":{let F;for(let W of this.args){F=W.evaluate(A);let te=$r.parse(F);if(te)return te}throw new ma(`Could not parse padding from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"variableAnchorOffsetCollection":{let F;for(let W of this.args){F=W.evaluate(A);let te=Zi.parse(F);if(te)return te}throw new ma(`Could not parse variableAnchorOffsetCollection from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"number":{let F=null;for(let W of this.args){if(F=W.evaluate(A),F===null)return 0;let te=Number(F);if(!isNaN(te))return te}throw new ma(`Could not convert ${JSON.stringify(F)} to number.`)}case"formatted":return ti.fromString(Ba(this.args[0].evaluate(A)));case"resolvedImage":return en.fromString(Ba(this.args[0].evaluate(A)));default:return Ba(this.args[0].evaluate(A))}}eachChild(A){this.args.forEach(A)}outputDefined(){return this.args.every(A=>A.outputDefined())}}let jn=["Unknown","Point","LineString","Polygon"];class Ha{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?jn[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(A){let F=this._parseColorCache[A];return F||(F=this._parseColorCache[A]=ir.parse(A)),F}}class vo{constructor(A,F,W=[],te,fe=new St,pe=[]){this.registry=A,this.path=W,this.key=W.map(Re=>`[${Re}]`).join(""),this.scope=fe,this.errors=pe,this.expectedType=te,this._isConstant=F}parse(A,F,W,te,fe={}){return F?this.concat(F,W,te)._parse(A,fe):this._parse(A,fe)}_parse(A,F){function W(te,fe,pe){return pe==="assert"?new Fa(fe,[te]):pe==="coerce"?new da(fe,[te]):te}if(A!==null&&typeof A!="string"&&typeof A!="boolean"&&typeof A!="number"||(A=["literal",A]),Array.isArray(A)){if(A.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let te=A[0];if(typeof te!="string")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let fe=this.registry[te];if(fe){let pe=fe.parse(A,this);if(!pe)return null;if(this.expectedType){let Re=this.expectedType,Ke=pe.type;if(Re.kind!=="string"&&Re.kind!=="number"&&Re.kind!=="boolean"&&Re.kind!=="object"&&Re.kind!=="array"||Ke.kind!=="value")if(Re.kind!=="color"&&Re.kind!=="formatted"&&Re.kind!=="resolvedImage"||Ke.kind!=="value"&&Ke.kind!=="string")if(Re.kind!=="padding"||Ke.kind!=="value"&&Ke.kind!=="number"&&Ke.kind!=="array")if(Re.kind!=="variableAnchorOffsetCollection"||Ke.kind!=="value"&&Ke.kind!=="array"){if(this.checkSubtype(Re,Ke))return null}else pe=W(pe,Re,F.typeAnnotation||"coerce");else pe=W(pe,Re,F.typeAnnotation||"coerce");else pe=W(pe,Re,F.typeAnnotation||"coerce");else pe=W(pe,Re,F.typeAnnotation||"assert")}if(!(pe instanceof ua)&&pe.type.kind!=="resolvedImage"&&this._isConstant(pe)){let Re=new Ha;try{pe=new ua(pe.type,pe.evaluate(Re))}catch(Ke){return this.error(Ke.message),null}}return pe}return this.error(`Unknown expression "${te}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(A===void 0?"'undefined' value invalid. Use null instead.":typeof A=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof A} instead.`)}concat(A,F,W){let te=typeof A=="number"?this.path.concat(A):this.path,fe=W?this.scope.concat(W):this.scope;return new vo(this.registry,this._isConstant,te,F||null,fe,this.errors)}error(A,...F){let W=`${this.key}${F.map(te=>`[${te}]`).join("")}`;this.errors.push(new rt(W,A))}checkSubtype(A,F){let W=et(A,F);return W&&this.error(W),W}}class Gn{constructor(A,F){this.type=F.type,this.bindings=[].concat(A),this.result=F}evaluate(A){return this.result.evaluate(A)}eachChild(A){for(let F of this.bindings)A(F[1]);A(this.result)}static parse(A,F){if(A.length<4)return F.error(`Expected at least 3 arguments, but found ${A.length-1} instead.`);let W=[];for(let fe=1;fe=W.length)throw new ma(`Array index out of bounds: ${F} > ${W.length-1}.`);if(F!==Math.floor(F))throw new ma(`Array index must be an integer, but found ${F} instead.`);return W[F]}eachChild(A){A(this.index),A(this.input)}outputDefined(){return!1}}class Jr{constructor(A,F){this.type=pt,this.needle=A,this.haystack=F}static parse(A,F){if(A.length!==3)return F.error(`Expected 2 arguments, but found ${A.length-1} instead.`);let W=F.parse(A[1],1,mr),te=F.parse(A[2],2,mr);return W&&te?xt(W.type,[pt,Et,dt,Tt,mr])?new Jr(W,te):F.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(W.type)} instead`):null}evaluate(A){let F=this.needle.evaluate(A),W=this.haystack.evaluate(A);if(!W)return!1;if(!At(F,["boolean","string","number","null"]))throw new ma(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Mn(F))} instead.`);if(!At(W,["string","array"]))throw new ma(`Expected second argument to be of type array or string, but found ${Je(Mn(W))} instead.`);return W.indexOf(F)>=0}eachChild(A){A(this.needle),A(this.haystack)}outputDefined(){return!0}}class hi{constructor(A,F,W){this.type=dt,this.needle=A,this.haystack=F,this.fromIndex=W}static parse(A,F){if(A.length<=2||A.length>=5)return F.error(`Expected 3 or 4 arguments, but found ${A.length-1} instead.`);let W=F.parse(A[1],1,mr),te=F.parse(A[2],2,mr);if(!W||!te)return null;if(!xt(W.type,[pt,Et,dt,Tt,mr]))return F.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(W.type)} instead`);if(A.length===4){let fe=F.parse(A[3],3,dt);return fe?new hi(W,te,fe):null}return new hi(W,te)}evaluate(A){let F=this.needle.evaluate(A),W=this.haystack.evaluate(A);if(!At(F,["boolean","string","number","null"]))throw new ma(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Mn(F))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(A)),At(W,["string"])){let fe=W.indexOf(F,te);return fe===-1?-1:[...W.slice(0,fe)].length}if(At(W,["array"]))return W.indexOf(F,te);throw new ma(`Expected second argument to be of type array or string, but found ${Je(Mn(W))} instead.`)}eachChild(A){A(this.needle),A(this.haystack),this.fromIndex&&A(this.fromIndex)}outputDefined(){return!1}}class hn{constructor(A,F,W,te,fe,pe){this.inputType=A,this.type=F,this.input=W,this.cases=te,this.outputs=fe,this.otherwise=pe}static parse(A,F){if(A.length<5)return F.error(`Expected at least 4 arguments, but found only ${A.length-1}.`);if(A.length%2!=1)return F.error("Expected an even number of arguments.");let W,te;F.expectedType&&F.expectedType.kind!=="value"&&(te=F.expectedType);let fe={},pe=[];for(let ft=2;ftNumber.MAX_SAFE_INTEGER)return ur.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof kr=="number"&&Math.floor(kr)!==kr)return ur.error("Numeric branch labels must be integer values.");if(W){if(ur.checkSubtype(W,Mn(kr)))return null}else W=Mn(kr);if(fe[String(kr)]!==void 0)return ur.error("Branch labels must be unique.");fe[String(kr)]=pe.length}let vr=F.parse(er,ft,te);if(!vr)return null;te=te||vr.type,pe.push(vr)}let Re=F.parse(A[1],1,mr);if(!Re)return null;let Ke=F.parse(A[A.length-1],A.length-1,te);return Ke?Re.type.kind!=="value"&&F.concat(1).checkSubtype(W,Re.type)?null:new hn(W,te,Re,fe,pe,Ke):null}evaluate(A){let F=this.input.evaluate(A);return(Mn(F)===this.inputType&&this.outputs[this.cases[F]]||this.otherwise).evaluate(A)}eachChild(A){A(this.input),this.outputs.forEach(A),A(this.otherwise)}outputDefined(){return this.outputs.every(A=>A.outputDefined())&&this.otherwise.outputDefined()}}class Sn{constructor(A,F,W){this.type=A,this.branches=F,this.otherwise=W}static parse(A,F){if(A.length<4)return F.error(`Expected at least 3 arguments, but found only ${A.length-1}.`);if(A.length%2!=0)return F.error("Expected an odd number of arguments.");let W;F.expectedType&&F.expectedType.kind!=="value"&&(W=F.expectedType);let te=[];for(let pe=1;peF.outputDefined())&&this.otherwise.outputDefined()}}class En{constructor(A,F,W,te){this.type=A,this.input=F,this.beginIndex=W,this.endIndex=te}static parse(A,F){if(A.length<=2||A.length>=5)return F.error(`Expected 3 or 4 arguments, but found ${A.length-1} instead.`);let W=F.parse(A[1],1,mr),te=F.parse(A[2],2,dt);if(!W||!te)return null;if(!xt(W.type,[Ge(mr),Et,mr]))return F.error(`Expected first argument to be of type array or string, but found ${Je(W.type)} instead`);if(A.length===4){let fe=F.parse(A[3],3,dt);return fe?new En(W.type,W,te,fe):null}return new En(W.type,W,te)}evaluate(A){let F=this.input.evaluate(A),W=this.beginIndex.evaluate(A),te;if(this.endIndex&&(te=this.endIndex.evaluate(A)),At(F,["string"]))return[...F].slice(W,te).join("");if(At(F,["array"]))return F.slice(W,te);throw new ma(`Expected first argument to be of type array or string, but found ${Je(Mn(F))} instead.`)}eachChild(A){A(this.input),A(this.beginIndex),this.endIndex&&A(this.endIndex)}outputDefined(){return!1}}function ki(R,A){let F=R.length-1,W,te,fe=0,pe=F,Re=0;for(;fe<=pe;)if(Re=Math.floor((fe+pe)/2),W=R[Re],te=R[Re+1],W<=A){if(Re===F||AA))throw new ma("Input is not a number.");pe=Re-1}return 0}class _n{constructor(A,F,W){this.type=A,this.input=F,this.labels=[],this.outputs=[];for(let[te,fe]of W)this.labels.push(te),this.outputs.push(fe)}static parse(A,F){if(A.length-1<4)return F.error(`Expected at least 4 arguments, but found only ${A.length-1}.`);if((A.length-1)%2!=0)return F.error("Expected an even number of arguments.");let W=F.parse(A[1],1,dt);if(!W)return null;let te=[],fe=null;F.expectedType&&F.expectedType.kind!=="value"&&(fe=F.expectedType);for(let pe=1;pe=Re)return F.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',ft);let er=F.parse(Ke,Rt,fe);if(!er)return null;fe=fe||er.type,te.push([Re,er])}return new _n(fe,W,te)}evaluate(A){let F=this.labels,W=this.outputs;if(F.length===1)return W[0].evaluate(A);let te=this.input.evaluate(A);if(te<=F[0])return W[0].evaluate(A);let fe=F.length;return te>=F[fe-1]?W[fe-1].evaluate(A):W[ki(F,te)].evaluate(A)}eachChild(A){A(this.input);for(let F of this.outputs)A(F)}outputDefined(){return this.outputs.every(A=>A.outputDefined())}}function ya(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}var ea=Ma;function Ma(R,A,F,W){this.cx=3*R,this.bx=3*(F-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*A,this.by=3*(W-A)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=A,this.p2x=F,this.p2y=W}Ma.prototype={sampleCurveX:function(R){return((this.ax*R+this.bx)*R+this.cx)*R},sampleCurveY:function(R){return((this.ay*R+this.by)*R+this.cy)*R},sampleCurveDerivativeX:function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},solveCurveX:function(R,A){if(A===void 0&&(A=1e-6),R<0)return 0;if(R>1)return 1;for(var F=R,W=0;W<8;W++){var te=this.sampleCurveX(F)-R;if(Math.abs(te)te?pe=F:Re=F,F=.5*(Re-pe)+pe;return F},solve:function(R,A){return this.sampleCurveY(this.solveCurveX(R,A))}};var _o=ya(ea);function No(R,A,F){return R+F*(A-R)}function po(R,A,F){return R.map((W,te)=>No(W,A[te],F))}let Lo={number:No,color:function(R,A,F,W="rgb"){switch(W){case"rgb":{let[te,fe,pe,Re]=po(R.rgb,A.rgb,F);return new ir(te,fe,pe,Re,!1)}case"hcl":{let[te,fe,pe,Re]=R.hcl,[Ke,ft,Rt,er]=A.hcl,ur,vr;if(isNaN(te)||isNaN(Ke))isNaN(te)?isNaN(Ke)?ur=NaN:(ur=Ke,pe!==1&&pe!==0||(vr=ft)):(ur=te,Rt!==1&&Rt!==0||(vr=fe));else{let vn=Ke-te;Ke>te&&vn>180?vn-=360:Ke180&&(vn+=360),ur=te+F*vn}let[kr,Dr,li,pi]=function([vn,zi,ln,Tn]){return vn=isNaN(vn)?0:vn*Pi,Hn([ln,Math.cos(vn)*zi,Math.sin(vn)*zi,Tn])}([ur,vr!=null?vr:No(fe,ft,F),No(pe,Rt,F),No(Re,er,F)]);return new ir(kr,Dr,li,pi,!1)}case"lab":{let[te,fe,pe,Re]=Hn(po(R.lab,A.lab,F));return new ir(te,fe,pe,Re,!1)}}},array:po,padding:function(R,A,F){return new $r(po(R.values,A.values,F))},variableAnchorOffsetCollection:function(R,A,F){let W=R.values,te=A.values;if(W.length!==te.length)throw new ma(`Cannot interpolate values of different length. from: ${R.toString()}, to: ${A.toString()}`);let fe=[];for(let pe=0;petypeof Rt!="number"||Rt<0||Rt>1))return F.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);te={name:"cubic-bezier",controlPoints:ft}}}if(A.length-1<4)return F.error(`Expected at least 4 arguments, but found only ${A.length-1}.`);if((A.length-1)%2!=0)return F.error("Expected an even number of arguments.");if(fe=F.parse(fe,2,dt),!fe)return null;let Re=[],Ke=null;W==="interpolate-hcl"||W==="interpolate-lab"?Ke=jt:F.expectedType&&F.expectedType.kind!=="value"&&(Ke=F.expectedType);for(let ft=0;ft=Rt)return F.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ur);let kr=F.parse(er,vr,Ke);if(!kr)return null;Ke=Ke||kr.type,Re.push([Rt,kr])}return Kt(Ke,dt)||Kt(Ke,jt)||Kt(Ke,qr)||Kt(Ke,gt)||Kt(Ke,Ge(dt))?new ko(Ke,W,te,fe,Re):F.error(`Type ${Je(Ke)} is not interpolatable.`)}evaluate(A){let F=this.labels,W=this.outputs;if(F.length===1)return W[0].evaluate(A);let te=this.input.evaluate(A);if(te<=F[0])return W[0].evaluate(A);let fe=F.length;if(te>=F[fe-1])return W[fe-1].evaluate(A);let pe=ki(F,te),Re=ko.interpolationFactor(this.interpolation,te,F[pe],F[pe+1]),Ke=W[pe].evaluate(A),ft=W[pe+1].evaluate(A);switch(this.operator){case"interpolate":return Lo[this.type.kind](Ke,ft,Re);case"interpolate-hcl":return Lo.color(Ke,ft,Re,"hcl");case"interpolate-lab":return Lo.color(Ke,ft,Re,"lab")}}eachChild(A){A(this.input);for(let F of this.outputs)A(F)}outputDefined(){return this.outputs.every(A=>A.outputDefined())}}function Ds(R,A,F,W){let te=W-F,fe=R-F;return te===0?0:A===1?fe/te:(Math.pow(A,fe)-1)/(Math.pow(A,te)-1)}class Fs{constructor(A,F){this.type=A,this.args=F}static parse(A,F){if(A.length<2)return F.error("Expectected at least one argument.");let W=null,te=F.expectedType;te&&te.kind!=="value"&&(W=te);let fe=[];for(let Re of A.slice(1)){let Ke=F.parse(Re,1+fe.length,W,void 0,{typeAnnotation:"omit"});if(!Ke)return null;W=W||Ke.type,fe.push(Ke)}if(!W)throw new Error("No output type");let pe=te&&fe.some(Re=>et(te,Re.type));return new Fs(pe?mr:W,fe)}evaluate(A){let F,W=null,te=0;for(let fe of this.args)if(te++,W=fe.evaluate(A),W&&W instanceof en&&!W.available&&(F||(F=W.name),W=null,te===this.args.length&&(W=F)),W!==null)break;return W}eachChild(A){this.args.forEach(A)}outputDefined(){return this.args.every(A=>A.outputDefined())}}function ll(R,A){return R==="=="||R==="!="?A.kind==="boolean"||A.kind==="string"||A.kind==="number"||A.kind==="null"||A.kind==="value":A.kind==="string"||A.kind==="number"||A.kind==="value"}function ul(R,A,F,W){return W.compare(A,F)===0}function zl(R,A,F){let W=R!=="=="&&R!=="!=";return class gje{constructor(fe,pe,Re){this.type=pt,this.lhs=fe,this.rhs=pe,this.collator=Re,this.hasUntypedArgument=fe.type.kind==="value"||pe.type.kind==="value"}static parse(fe,pe){if(fe.length!==3&&fe.length!==4)return pe.error("Expected two or three arguments.");let Re=fe[0],Ke=pe.parse(fe[1],1,mr);if(!Ke)return null;if(!ll(Re,Ke.type))return pe.concat(1).error(`"${Re}" comparisons are not supported for type '${Je(Ke.type)}'.`);let ft=pe.parse(fe[2],2,mr);if(!ft)return null;if(!ll(Re,ft.type))return pe.concat(2).error(`"${Re}" comparisons are not supported for type '${Je(ft.type)}'.`);if(Ke.type.kind!==ft.type.kind&&Ke.type.kind!=="value"&&ft.type.kind!=="value")return pe.error(`Cannot compare types '${Je(Ke.type)}' and '${Je(ft.type)}'.`);W&&(Ke.type.kind==="value"&&ft.type.kind!=="value"?Ke=new Fa(ft.type,[Ke]):Ke.type.kind!=="value"&&ft.type.kind==="value"&&(ft=new Fa(Ke.type,[ft])));let Rt=null;if(fe.length===4){if(Ke.type.kind!=="string"&&ft.type.kind!=="string"&&Ke.type.kind!=="value"&&ft.type.kind!=="value")return pe.error("Cannot use collator to compare non-string types.");if(Rt=pe.parse(fe[3],3,Ar),!Rt)return null}return new gje(Ke,ft,Rt)}evaluate(fe){let pe=this.lhs.evaluate(fe),Re=this.rhs.evaluate(fe);if(W&&this.hasUntypedArgument){let Ke=Mn(pe),ft=Mn(Re);if(Ke.kind!==ft.kind||Ke.kind!=="string"&&Ke.kind!=="number")throw new ma(`Expected arguments for "${R}" to be (string, string) or (number, number), but found (${Ke.kind}, ${ft.kind}) instead.`)}if(this.collator&&!W&&this.hasUntypedArgument){let Ke=Mn(pe),ft=Mn(Re);if(Ke.kind!=="string"||ft.kind!=="string")return A(fe,pe,Re)}return this.collator?F(fe,pe,Re,this.collator.evaluate(fe)):A(fe,pe,Re)}eachChild(fe){fe(this.lhs),fe(this.rhs),this.collator&&fe(this.collator)}outputDefined(){return!0}}}let us=zl("==",function(R,A,F){return A===F},ul),il=zl("!=",function(R,A,F){return A!==F},function(R,A,F,W){return!ul(0,A,F,W)}),As=zl("<",function(R,A,F){return A",function(R,A,F){return A>F},function(R,A,F,W){return W.compare(A,F)>0}),Ks=zl("<=",function(R,A,F){return A<=F},function(R,A,F,W){return W.compare(A,F)<=0}),zs=zl(">=",function(R,A,F){return A>=F},function(R,A,F,W){return W.compare(A,F)>=0});class Io{constructor(A,F,W){this.type=Ar,this.locale=W,this.caseSensitive=A,this.diacriticSensitive=F}static parse(A,F){if(A.length!==2)return F.error("Expected one argument.");let W=A[1];if(typeof W!="object"||Array.isArray(W))return F.error("Collator options argument must be an object.");let te=F.parse(W["case-sensitive"]!==void 0&&W["case-sensitive"],1,pt);if(!te)return null;let fe=F.parse(W["diacritic-sensitive"]!==void 0&&W["diacritic-sensitive"],1,pt);if(!fe)return null;let pe=null;return W.locale&&(pe=F.parse(W.locale,1,Et),!pe)?null:new Io(te,fe,pe)}evaluate(A){return new wr(this.caseSensitive.evaluate(A),this.diacriticSensitive.evaluate(A),this.locale?this.locale.evaluate(A):null)}eachChild(A){A(this.caseSensitive),A(this.diacriticSensitive),this.locale&&A(this.locale)}outputDefined(){return!1}}class ls{constructor(A,F,W,te,fe){this.type=Et,this.number=A,this.locale=F,this.currency=W,this.minFractionDigits=te,this.maxFractionDigits=fe}static parse(A,F){if(A.length!==3)return F.error("Expected two arguments.");let W=F.parse(A[1],1,dt);if(!W)return null;let te=A[2];if(typeof te!="object"||Array.isArray(te))return F.error("NumberFormat options argument must be an object.");let fe=null;if(te.locale&&(fe=F.parse(te.locale,1,Et),!fe))return null;let pe=null;if(te.currency&&(pe=F.parse(te.currency,1,Et),!pe))return null;let Re=null;if(te["min-fraction-digits"]&&(Re=F.parse(te["min-fraction-digits"],1,dt),!Re))return null;let Ke=null;return te["max-fraction-digits"]&&(Ke=F.parse(te["max-fraction-digits"],1,dt),!Ke)?null:new ls(W,fe,pe,Re,Ke)}evaluate(A){return new Intl.NumberFormat(this.locale?this.locale.evaluate(A):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(A):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(A):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(A):void 0}).format(this.number.evaluate(A))}eachChild(A){A(this.number),this.locale&&A(this.locale),this.currency&&A(this.currency),this.minFractionDigits&&A(this.minFractionDigits),this.maxFractionDigits&&A(this.maxFractionDigits)}outputDefined(){return!1}}class Yl{constructor(A){this.type=ei,this.sections=A}static parse(A,F){if(A.length<2)return F.error("Expected at least one argument.");let W=A[1];if(!Array.isArray(W)&&typeof W=="object")return F.error("First argument must be an image or text section.");let te=[],fe=!1;for(let pe=1;pe<=A.length-1;++pe){let Re=A[pe];if(fe&&typeof Re=="object"&&!Array.isArray(Re)){fe=!1;let Ke=null;if(Re["font-scale"]&&(Ke=F.parse(Re["font-scale"],1,dt),!Ke))return null;let ft=null;if(Re["text-font"]&&(ft=F.parse(Re["text-font"],1,Ge(Et)),!ft))return null;let Rt=null;if(Re["text-color"]&&(Rt=F.parse(Re["text-color"],1,jt),!Rt))return null;let er=te[te.length-1];er.scale=Ke,er.font=ft,er.textColor=Rt}else{let Ke=F.parse(A[pe],1,mr);if(!Ke)return null;let ft=Ke.type.kind;if(ft!=="string"&&ft!=="value"&&ft!=="null"&&ft!=="resolvedImage")return F.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");fe=!0,te.push({content:Ke,scale:null,font:null,textColor:null})}}return new Yl(te)}evaluate(A){return new ti(this.sections.map(F=>{let W=F.content.evaluate(A);return Mn(W)===jr?new Xr("",W,null,null,null):new Xr(Ba(W),null,F.scale?F.scale.evaluate(A):null,F.font?F.font.evaluate(A).join(","):null,F.textColor?F.textColor.evaluate(A):null)}))}eachChild(A){for(let F of this.sections)A(F.content),F.scale&&A(F.scale),F.font&&A(F.font),F.textColor&&A(F.textColor)}outputDefined(){return!1}}class Su{constructor(A){this.type=jr,this.input=A}static parse(A,F){if(A.length!==2)return F.error("Expected two arguments.");let W=F.parse(A[1],1,Et);return W?new Su(W):F.error("No image name provided.")}evaluate(A){let F=this.input.evaluate(A),W=en.fromString(F);return W&&A.availableImages&&(W.available=A.availableImages.indexOf(F)>-1),W}eachChild(A){A(this.input)}outputDefined(){return!1}}class nc{constructor(A){this.type=dt,this.input=A}static parse(A,F){if(A.length!==2)return F.error(`Expected 1 argument, but found ${A.length-1} instead.`);let W=F.parse(A[1],1);return W?W.type.kind!=="array"&&W.type.kind!=="string"&&W.type.kind!=="value"?F.error(`Expected argument of type string or array, but found ${Je(W.type)} instead.`):new nc(W):null}evaluate(A){let F=this.input.evaluate(A);if(typeof F=="string")return[...F].length;if(Array.isArray(F))return F.length;throw new ma(`Expected value to be of type string or array, but found ${Je(Mn(F))} instead.`)}eachChild(A){A(this.input)}outputDefined(){return!1}}let bs=8192;function Rn(R,A){let F=(180+R[0])/360,W=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R[1]*Math.PI/360)))/360,te=Math.pow(2,A.z);return[Math.round(F*te*bs),Math.round(W*te*bs)]}function _a(R,A){let F=Math.pow(2,A.z);return[(te=(R[0]/bs+A.x)/F,360*te-180),(W=(R[1]/bs+A.y)/F,360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90)];var W,te}function Vu(R,A){R[0]=Math.min(R[0],A[0]),R[1]=Math.min(R[1],A[1]),R[2]=Math.max(R[2],A[0]),R[3]=Math.max(R[3],A[1])}function ql(R,A){return!(R[0]<=A[0]||R[2]>=A[2]||R[1]<=A[1]||R[3]>=A[3])}function xo(R,A,F){let W=R[0]-A[0],te=R[1]-A[1],fe=R[0]-F[0],pe=R[1]-F[1];return W*pe-fe*te==0&&W*fe<=0&&te*pe<=0}function Kl(R,A,F,W){return(te=[W[0]-F[0],W[1]-F[1]])[0]*(fe=[A[0]-R[0],A[1]-R[1]])[1]-te[1]*fe[0]!=0&&!(!Oo(R,A,F,W)||!Oo(F,W,R,A));var te,fe}function Ns(R,A,F){for(let W of F)for(let te=0;te(te=R)[1]!=(pe=Re[Ke+1])[1]>te[1]&&te[0]<(pe[0]-fe[0])*(te[1]-fe[1])/(pe[1]-fe[1])+fe[0]&&(W=!W)}var te,fe,pe;return W}function ac(R,A){for(let F of A)if(Hl(R,F))return!0;return!1}function oa(R,A){for(let F of R)if(!Hl(F,A))return!1;for(let F=0;F0&&Re<0||pe<0&&Re>0}function Ol(R,A,F){let W=[];for(let te=0;teF[2]){let te=.5*W,fe=R[0]-F[0]>te?-W:F[0]-R[0]>te?W:0;fe===0&&(fe=R[0]-F[2]>te?-W:F[2]-R[0]>te?W:0),R[0]+=fe}Vu(A,R)}function nf(R,A,F,W){let te=Math.pow(2,W.z)*bs,fe=[W.x*bs,W.y*bs],pe=[];for(let Re of R)for(let Ke of Re){let ft=[Ke.x+fe[0],Ke.y+fe[1]];Do(ft,A,F,te),pe.push(ft)}return pe}function Vf(R,A,F,W){let te=Math.pow(2,W.z)*bs,fe=[W.x*bs,W.y*bs],pe=[];for(let Ke of R){let ft=[];for(let Rt of Ke){let er=[Rt.x+fe[0],Rt.y+fe[1]];Vu(A,er),ft.push(er)}pe.push(ft)}if(A[2]-A[0]<=te/2){(Re=A)[0]=Re[1]=1/0,Re[2]=Re[3]=-1/0;for(let Ke of pe)for(let ft of Ke)Do(ft,A,F,te)}var Re;return pe}class pl{constructor(A,F){this.type=pt,this.geojson=A,this.geometries=F}static parse(A,F){if(A.length!==2)return F.error(`'within' expression requires exactly one argument, but found ${A.length-1} instead.`);if(yn(A[1])){let W=A[1];if(W.type==="FeatureCollection"){let te=[];for(let fe of W.features){let{type:pe,coordinates:Re}=fe.geometry;pe==="Polygon"&&te.push(Re),pe==="MultiPolygon"&&te.push(...Re)}if(te.length)return new pl(W,{type:"MultiPolygon",coordinates:te})}else if(W.type==="Feature"){let te=W.geometry.type;if(te==="Polygon"||te==="MultiPolygon")return new pl(W,W.geometry)}else if(W.type==="Polygon"||W.type==="MultiPolygon")return new pl(W,W)}return F.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(A){if(A.geometry()!=null&&A.canonicalID()!=null){if(A.geometryType()==="Point")return function(F,W){let te=[1/0,1/0,-1/0,-1/0],fe=[1/0,1/0,-1/0,-1/0],pe=F.canonicalID();if(W.type==="Polygon"){let Re=Ol(W.coordinates,fe,pe),Ke=nf(F.geometry(),te,fe,pe);if(!ql(te,fe))return!1;for(let ft of Ke)if(!Hl(ft,Re))return!1}if(W.type==="MultiPolygon"){let Re=Pc(W.coordinates,fe,pe),Ke=nf(F.geometry(),te,fe,pe);if(!ql(te,fe))return!1;for(let ft of Ke)if(!ac(ft,Re))return!1}return!0}(A,this.geometries);if(A.geometryType()==="LineString")return function(F,W){let te=[1/0,1/0,-1/0,-1/0],fe=[1/0,1/0,-1/0,-1/0],pe=F.canonicalID();if(W.type==="Polygon"){let Re=Ol(W.coordinates,fe,pe),Ke=Vf(F.geometry(),te,fe,pe);if(!ql(te,fe))return!1;for(let ft of Ke)if(!oa(ft,Re))return!1}if(W.type==="MultiPolygon"){let Re=Pc(W.coordinates,fe,pe),Ke=Vf(F.geometry(),te,fe,pe);if(!ql(te,fe))return!1;for(let ft of Ke)if(!qo(ft,Re))return!1}return!0}(A,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Zc=class{constructor(R=[],A=(F,W)=>FW?1:0){if(this.data=R,this.length=this.data.length,this.compare=A,this.length>0)for(let F=(this.length>>1)-1;F>=0;F--)this._down(F)}push(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],A=this.data.pop();return--this.length>0&&(this.data[0]=A,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:A,compare:F}=this,W=A[R];for(;R>0;){let te=R-1>>1,fe=A[te];if(F(W,fe)>=0)break;A[R]=fe,R=te}A[R]=W}_down(R){let{data:A,compare:F}=this,W=this.length>>1,te=A[R];for(;R=0)break;A[R]=A[fe],R=fe}A[R]=te}};function Jl(R,A,F,W,te){qs(R,A,F,W||R.length-1,te||oc)}function qs(R,A,F,W,te){for(;W>F;){if(W-F>600){var fe=W-F+1,pe=A-F+1,Re=Math.log(fe),Ke=.5*Math.exp(2*Re/3),ft=.5*Math.sqrt(Re*Ke*(fe-Ke)/fe)*(pe-fe/2<0?-1:1);qs(R,A,Math.max(F,Math.floor(A-pe*Ke/fe+ft)),Math.min(W,Math.floor(A+(fe-pe)*Ke/fe+ft)),te)}var Rt=R[A],er=F,ur=W;for(yu(R,F,A),te(R[W],Rt)>0&&yu(R,F,W);er0;)ur--}te(R[F],Rt)===0?yu(R,F,ur):yu(R,++ur,W),ur<=A&&(F=ur+1),A<=ur&&(W=ur-1)}}function yu(R,A,F){var W=R[A];R[A]=R[F],R[F]=W}function oc(R,A){return RA?1:0}function Cf(R,A){if(R.length<=1)return[R];let F=[],W,te;for(let fe of R){let pe=jh(fe);pe!==0&&(fe.area=Math.abs(pe),te===void 0&&(te=pe<0),te===pe<0?(W&&F.push(W),W=[fe]):W.push(fe))}if(W&&F.push(W),A>1)for(let fe=0;fe1?(ft=A[Ke+1][0],Rt=A[Ke+1][1]):vr>0&&(ft+=er/this.kx*vr,Rt+=ur/this.ky*vr)),er=this.wrap(F[0]-ft)*this.kx,ur=(F[1]-Rt)*this.ky;let kr=er*er+ur*ur;kr180;)A-=360;return A}}function $l(R,A){return A[0]-R[0]}function fl(R){return R[1]-R[0]+1}function lc(R,A){return R[1]>=R[0]&&R[1]R[1])return[null,null];let F=fl(R);if(A){if(F===2)return[R,null];let te=Math.floor(F/2);return[[R[0],R[0]+te],[R[0]+te,R[1]]]}if(F===1)return[R,null];let W=Math.floor(F/2)-1;return[[R[0],R[0]+W],[R[0]+W+1,R[1]]]}function Es(R,A){if(!lc(A,R.length))return[1/0,1/0,-1/0,-1/0];let F=[1/0,1/0,-1/0,-1/0];for(let W=A[0];W<=A[1];++W)Vu(F,R[W]);return F}function Hs(R){let A=[1/0,1/0,-1/0,-1/0];for(let F of R)for(let W of F)Vu(A,W);return A}function Go(R){return R[0]!==-1/0&&R[1]!==-1/0&&R[2]!==1/0&&R[3]!==1/0}function ps(R,A,F){if(!Go(R)||!Go(A))return NaN;let W=0,te=0;return R[2]A[2]&&(W=R[0]-A[2]),R[1]>A[3]&&(te=R[1]-A[3]),R[3]=W)return W;if(ql(te,fe)){if(sd(R,A))return 0}else if(sd(A,R))return 0;let pe=1/0;for(let Re of R)for(let Ke=0,ft=Re.length,Rt=ft-1;Ke0;){let Ke=pe.pop();if(Ke[0]>=fe)continue;let ft=Ke[1],Rt=A?50:100;if(fl(ft)<=Rt){if(!lc(ft,R.length))return NaN;if(A){let er=Po(R,ft,F,W);if(isNaN(er)||er===0)return er;fe=Math.min(fe,er)}else for(let er=ft[0];er<=ft[1];++er){let ur=od(R[er],F,W);if(fe=Math.min(fe,ur),fe===0)return 0}}else{let er=Fu(ft,A);Pa(pe,fe,W,R,Re,er[0]),Pa(pe,fe,W,R,Re,er[1])}}return fe}function bl(R,A,F,W,te,fe=1/0){let pe=Math.min(fe,te.distance(R[0],F[0]));if(pe===0)return pe;let Re=new Zc([[0,[0,R.length-1],[0,F.length-1]]],$l);for(;Re.length>0;){let Ke=Re.pop();if(Ke[0]>=pe)continue;let ft=Ke[1],Rt=Ke[2],er=A?50:100,ur=W?50:100;if(fl(ft)<=er&&fl(Rt)<=ur){if(!lc(ft,R.length)&&lc(Rt,F.length))return NaN;let vr;if(A&&W)vr=Gu(R,ft,F,Rt,te),pe=Math.min(pe,vr);else if(A&&!W){let kr=R.slice(ft[0],ft[1]+1);for(let Dr=Rt[0];Dr<=Rt[1];++Dr)if(vr=uc(F[Dr],kr,te),pe=Math.min(pe,vr),pe===0)return pe}else if(!A&&W){let kr=F.slice(Rt[0],Rt[1]+1);for(let Dr=ft[0];Dr<=ft[1];++Dr)if(vr=uc(R[Dr],kr,te),pe=Math.min(pe,vr),pe===0)return pe}else vr=Os(R,ft,F,Rt,te),pe=Math.min(pe,vr)}else{let vr=Fu(ft,A),kr=Fu(Rt,W);of(Re,pe,te,R,F,vr[0],kr[0]),of(Re,pe,te,R,F,vr[0],kr[1]),of(Re,pe,te,R,F,vr[1],kr[0]),of(Re,pe,te,R,F,vr[1],kr[1])}}return pe}function Hf(R){return R.type==="MultiPolygon"?R.coordinates.map(A=>({type:"Polygon",coordinates:A})):R.type==="MultiLineString"?R.coordinates.map(A=>({type:"LineString",coordinates:A})):R.type==="MultiPoint"?R.coordinates.map(A=>({type:"Point",coordinates:A})):[R]}class Ic{constructor(A,F){this.type=dt,this.geojson=A,this.geometries=F}static parse(A,F){if(A.length!==2)return F.error(`'distance' expression requires exactly one argument, but found ${A.length-1} instead.`);if(yn(A[1])){let W=A[1];if(W.type==="FeatureCollection")return new Ic(W,W.features.map(te=>Hf(te.geometry)).flat());if(W.type==="Feature")return new Ic(W,Hf(W.geometry));if("type"in W&&"coordinates"in W)return new Ic(W,Hf(W))}return F.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(A){if(A.geometry()!=null&&A.canonicalID()!=null){if(A.geometryType()==="Point")return function(F,W){let te=F.geometry(),fe=te.flat().map(Ke=>_a([Ke.x,Ke.y],F.canonical));if(te.length===0)return NaN;let pe=new Gf(fe[0][1]),Re=1/0;for(let Ke of W){switch(Ke.type){case"Point":Re=Math.min(Re,bl(fe,!1,[Ke.coordinates],!1,pe,Re));break;case"LineString":Re=Math.min(Re,bl(fe,!1,Ke.coordinates,!0,pe,Re));break;case"Polygon":Re=Math.min(Re,Hu(fe,!1,Ke.coordinates,pe,Re))}if(Re===0)return Re}return Re}(A,this.geometries);if(A.geometryType()==="LineString")return function(F,W){let te=F.geometry(),fe=te.flat().map(Ke=>_a([Ke.x,Ke.y],F.canonical));if(te.length===0)return NaN;let pe=new Gf(fe[0][1]),Re=1/0;for(let Ke of W){switch(Ke.type){case"Point":Re=Math.min(Re,bl(fe,!0,[Ke.coordinates],!1,pe,Re));break;case"LineString":Re=Math.min(Re,bl(fe,!0,Ke.coordinates,!0,pe,Re));break;case"Polygon":Re=Math.min(Re,Hu(fe,!0,Ke.coordinates,pe,Re))}if(Re===0)return Re}return Re}(A,this.geometries);if(A.geometryType()==="Polygon")return function(F,W){let te=F.geometry();if(te.length===0||te[0].length===0)return NaN;let fe=Cf(te,0).map(Ke=>Ke.map(ft=>ft.map(Rt=>_a([Rt.x,Rt.y],F.canonical)))),pe=new Gf(fe[0][0][0][1]),Re=1/0;for(let Ke of W)for(let ft of fe){switch(Ke.type){case"Point":Re=Math.min(Re,Hu([Ke.coordinates],!1,ft,pe,Re));break;case"LineString":Re=Math.min(Re,Hu(Ke.coordinates,!0,ft,pe,Re));break;case"Polygon":Re=Math.min(Re,Ko(ft,Ke.coordinates,pe,Re))}if(Re===0)return Re}return Re}(A,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let yf={"==":us,"!=":il,">":cl,"<":As,">=":zs,"<=":Ks,array:Fa,at:Sr,boolean:Fa,case:Sn,coalesce:Fs,collator:Io,format:Yl,image:Su,in:Jr,"index-of":hi,interpolate:ko,"interpolate-hcl":ko,"interpolate-lab":ko,length:nc,let:Gn,literal:ua,match:hn,number:Fa,"number-format":ls,object:Fa,slice:En,step:_n,string:Fa,"to-boolean":da,"to-color":da,"to-number":da,"to-string":da,var:Ct,within:pl,distance:Ic};class Bl{constructor(A,F,W,te){this.name=A,this.type=F,this._evaluate=W,this.args=te}evaluate(A){return this._evaluate(A,this.args)}eachChild(A){this.args.forEach(A)}outputDefined(){return!1}static parse(A,F){let W=A[0],te=Bl.definitions[W];if(!te)return F.error(`Unknown expression "${W}". If you wanted a literal array, use ["literal", [...]].`,0);let fe=Array.isArray(te)?te[0]:te.type,pe=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,Re=pe.filter(([ft])=>!Array.isArray(ft)||ft.length===A.length-1),Ke=null;for(let[ft,Rt]of Re){Ke=new vo(F.registry,eh,F.path,null,F.scope);let er=[],ur=!1;for(let vr=1;vr{return ur=er,Array.isArray(ur)?`(${ur.map(Je).join(", ")})`:`(${Je(ur.type)}...)`;var ur}).join(" | "),Rt=[];for(let er=1;er{F=A?F&&eh(W):F&&W instanceof ua}),!!F&&th(R)&&jf(R,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function th(R){if(R instanceof Bl&&(R.name==="get"&&R.args.length===1||R.name==="feature-state"||R.name==="has"&&R.args.length===1||R.name==="properties"||R.name==="geometry-type"||R.name==="id"||/^filter-/.test(R.name))||R instanceof pl||R instanceof Ic)return!1;let A=!0;return R.eachChild(F=>{A&&!th(F)&&(A=!1)}),A}function ju(R){if(R instanceof Bl&&R.name==="feature-state")return!1;let A=!0;return R.eachChild(F=>{A&&!ju(F)&&(A=!1)}),A}function jf(R,A){if(R instanceof Bl&&A.indexOf(R.name)>=0)return!1;let F=!0;return R.eachChild(W=>{F&&!jf(W,A)&&(F=!1)}),F}function cc(R){return{result:"success",value:R}}function sf(R){return{result:"error",value:R}}function Nl(R){return R["property-type"]==="data-driven"||R["property-type"]==="cross-faded-data-driven"}function Kc(R){return!!R.expression&&R.expression.parameters.indexOf("zoom")>-1}function Rc(R){return!!R.expression&&R.expression.interpolated}function gs(R){return R instanceof Number?"number":R instanceof String?"string":R instanceof Boolean?"boolean":Array.isArray(R)?"array":R===null?"null":typeof R}function Wf(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)}function Wh(R){return R}function rh(R,A){let F=A.type==="color",W=R.stops&&typeof R.stops[0][0]=="object",te=W||!(W||R.property!==void 0),fe=R.type||(Rc(A)?"exponential":"interval");if(F||A.type==="padding"){let Rt=F?ir.parse:$r.parse;(R=Ae({},R)).stops&&(R.stops=R.stops.map(er=>[er[0],Rt(er[1])])),R.default=Rt(R.default?R.default:A.default)}if(R.colorSpace&&(pe=R.colorSpace)!=="rgb"&&pe!=="hcl"&&pe!=="lab")throw new Error(`Unknown color space: "${R.colorSpace}"`);var pe;let Re,Ke,ft;if(fe==="exponential")Re=ih;else if(fe==="interval")Re=Mu;else if(fe==="categorical"){Re=Sh,Ke=Object.create(null);for(let Rt of R.stops)Ke[Rt[0]]=Rt[1];ft=typeof R.stops[0][0]}else{if(fe!=="identity")throw new Error(`Unknown function type "${fe}"`);Re=js}if(W){let Rt={},er=[];for(let kr=0;krkr[0]),evaluate:({zoom:kr},Dr)=>ih({stops:ur,base:R.base},A,kr).evaluate(kr,Dr)}}if(te){let Rt=fe==="exponential"?{name:"exponential",base:R.base!==void 0?R.base:1}:null;return{kind:"camera",interpolationType:Rt,interpolationFactor:ko.interpolationFactor.bind(void 0,Rt),zoomStops:R.stops.map(er=>er[0]),evaluate:({zoom:er})=>Re(R,A,er,Ke,ft)}}return{kind:"source",evaluate(Rt,er){let ur=er&&er.properties?er.properties[R.property]:void 0;return ur===void 0?lf(R.default,A.default):Re(R,A,ur,Ke,ft)}}}function lf(R,A,F){return R!==void 0?R:A!==void 0?A:F!==void 0?F:void 0}function Sh(R,A,F,W,te){return lf(typeof F===te?W[F]:void 0,R.default,A.default)}function Mu(R,A,F){if(gs(F)!=="number")return lf(R.default,A.default);let W=R.stops.length;if(W===1||F<=R.stops[0][0])return R.stops[0][1];if(F>=R.stops[W-1][0])return R.stops[W-1][1];let te=ki(R.stops.map(fe=>fe[0]),F);return R.stops[te][1]}function ih(R,A,F){let W=R.base!==void 0?R.base:1;if(gs(F)!=="number")return lf(R.default,A.default);let te=R.stops.length;if(te===1||F<=R.stops[0][0])return R.stops[0][1];if(F>=R.stops[te-1][0])return R.stops[te-1][1];let fe=ki(R.stops.map(Rt=>Rt[0]),F),pe=function(Rt,er,ur,vr){let kr=vr-ur,Dr=Rt-ur;return kr===0?0:er===1?Dr/kr:(Math.pow(er,Dr)-1)/(Math.pow(er,kr)-1)}(F,W,R.stops[fe][0],R.stops[fe+1][0]),Re=R.stops[fe][1],Ke=R.stops[fe+1][1],ft=Lo[A.type]||Wh;return typeof Re.evaluate=="function"?{evaluate(...Rt){let er=Re.evaluate.apply(void 0,Rt),ur=Ke.evaluate.apply(void 0,Rt);if(er!==void 0&&ur!==void 0)return ft(er,ur,pe,R.colorSpace)}}:ft(Re,Ke,pe,R.colorSpace)}function js(R,A,F){switch(A.type){case"color":F=ir.parse(F);break;case"formatted":F=ti.fromString(F.toString());break;case"resolvedImage":F=en.fromString(F.toString());break;case"padding":F=$r.parse(F);break;default:gs(F)===A.type||A.type==="enum"&&A.values[F]||(F=void 0)}return lf(F,R.default,A.default)}Bl.register(yf,{error:[{kind:"error"},[Et],(R,[A])=>{throw new ma(A.evaluate(R))}],typeof:[Et,[mr],(R,[A])=>Je(Mn(A.evaluate(R)))],"to-rgba":[Ge(dt,4),[jt],(R,[A])=>{let[F,W,te,fe]=A.evaluate(R).rgb;return[255*F,255*W,255*te,fe]}],rgb:[jt,[dt,dt,dt],Ah],rgba:[jt,[dt,dt,dt,dt],Ah],has:{type:pt,overloads:[[[Et],(R,[A])=>Qf(A.evaluate(R),R.properties())],[[Et,or],(R,[A,F])=>Qf(A.evaluate(R),F.evaluate(R))]]},get:{type:mr,overloads:[[[Et],(R,[A])=>_f(A.evaluate(R),R.properties())],[[Et,or],(R,[A,F])=>_f(A.evaluate(R),F.evaluate(R))]]},"feature-state":[mr,[Et],(R,[A])=>_f(A.evaluate(R),R.featureState||{})],properties:[or,[],R=>R.properties()],"geometry-type":[Et,[],R=>R.geometryType()],id:[mr,[],R=>R.id()],zoom:[dt,[],R=>R.globals.zoom],"heatmap-density":[dt,[],R=>R.globals.heatmapDensity||0],"line-progress":[dt,[],R=>R.globals.lineProgress||0],accumulated:[mr,[],R=>R.globals.accumulated===void 0?null:R.globals.accumulated],"+":[dt,Yc(dt),(R,A)=>{let F=0;for(let W of A)F+=W.evaluate(R);return F}],"*":[dt,Yc(dt),(R,A)=>{let F=1;for(let W of A)F*=W.evaluate(R);return F}],"-":{type:dt,overloads:[[[dt,dt],(R,[A,F])=>A.evaluate(R)-F.evaluate(R)],[[dt],(R,[A])=>-A.evaluate(R)]]},"/":[dt,[dt,dt],(R,[A,F])=>A.evaluate(R)/F.evaluate(R)],"%":[dt,[dt,dt],(R,[A,F])=>A.evaluate(R)%F.evaluate(R)],ln2:[dt,[],()=>Math.LN2],pi:[dt,[],()=>Math.PI],e:[dt,[],()=>Math.E],"^":[dt,[dt,dt],(R,[A,F])=>Math.pow(A.evaluate(R),F.evaluate(R))],sqrt:[dt,[dt],(R,[A])=>Math.sqrt(A.evaluate(R))],log10:[dt,[dt],(R,[A])=>Math.log(A.evaluate(R))/Math.LN10],ln:[dt,[dt],(R,[A])=>Math.log(A.evaluate(R))],log2:[dt,[dt],(R,[A])=>Math.log(A.evaluate(R))/Math.LN2],sin:[dt,[dt],(R,[A])=>Math.sin(A.evaluate(R))],cos:[dt,[dt],(R,[A])=>Math.cos(A.evaluate(R))],tan:[dt,[dt],(R,[A])=>Math.tan(A.evaluate(R))],asin:[dt,[dt],(R,[A])=>Math.asin(A.evaluate(R))],acos:[dt,[dt],(R,[A])=>Math.acos(A.evaluate(R))],atan:[dt,[dt],(R,[A])=>Math.atan(A.evaluate(R))],min:[dt,Yc(dt),(R,A)=>Math.min(...A.map(F=>F.evaluate(R)))],max:[dt,Yc(dt),(R,A)=>Math.max(...A.map(F=>F.evaluate(R)))],abs:[dt,[dt],(R,[A])=>Math.abs(A.evaluate(R))],round:[dt,[dt],(R,[A])=>{let F=A.evaluate(R);return F<0?-Math.round(-F):Math.round(F)}],floor:[dt,[dt],(R,[A])=>Math.floor(A.evaluate(R))],ceil:[dt,[dt],(R,[A])=>Math.ceil(A.evaluate(R))],"filter-==":[pt,[Et,mr],(R,[A,F])=>R.properties()[A.value]===F.value],"filter-id-==":[pt,[mr],(R,[A])=>R.id()===A.value],"filter-type-==":[pt,[Et],(R,[A])=>R.geometryType()===A.value],"filter-<":[pt,[Et,mr],(R,[A,F])=>{let W=R.properties()[A.value],te=F.value;return typeof W==typeof te&&W{let F=R.id(),W=A.value;return typeof F==typeof W&&F":[pt,[Et,mr],(R,[A,F])=>{let W=R.properties()[A.value],te=F.value;return typeof W==typeof te&&W>te}],"filter-id->":[pt,[mr],(R,[A])=>{let F=R.id(),W=A.value;return typeof F==typeof W&&F>W}],"filter-<=":[pt,[Et,mr],(R,[A,F])=>{let W=R.properties()[A.value],te=F.value;return typeof W==typeof te&&W<=te}],"filter-id-<=":[pt,[mr],(R,[A])=>{let F=R.id(),W=A.value;return typeof F==typeof W&&F<=W}],"filter->=":[pt,[Et,mr],(R,[A,F])=>{let W=R.properties()[A.value],te=F.value;return typeof W==typeof te&&W>=te}],"filter-id->=":[pt,[mr],(R,[A])=>{let F=R.id(),W=A.value;return typeof F==typeof W&&F>=W}],"filter-has":[pt,[mr],(R,[A])=>A.value in R.properties()],"filter-has-id":[pt,[],R=>R.id()!==null&&R.id()!==void 0],"filter-type-in":[pt,[Ge(Et)],(R,[A])=>A.value.indexOf(R.geometryType())>=0],"filter-id-in":[pt,[Ge(mr)],(R,[A])=>A.value.indexOf(R.id())>=0],"filter-in-small":[pt,[Et,Ge(mr)],(R,[A,F])=>F.value.indexOf(R.properties()[A.value])>=0],"filter-in-large":[pt,[Et,Ge(mr)],(R,[A,F])=>function(W,te,fe,pe){for(;fe<=pe;){let Re=fe+pe>>1;if(te[Re]===W)return!0;te[Re]>W?pe=Re-1:fe=Re+1}return!1}(R.properties()[A.value],F.value,0,F.value.length-1)],all:{type:pt,overloads:[[[pt,pt],(R,[A,F])=>A.evaluate(R)&&F.evaluate(R)],[Yc(pt),(R,A)=>{for(let F of A)if(!F.evaluate(R))return!1;return!0}]]},any:{type:pt,overloads:[[[pt,pt],(R,[A,F])=>A.evaluate(R)||F.evaluate(R)],[Yc(pt),(R,A)=>{for(let F of A)if(F.evaluate(R))return!0;return!1}]]},"!":[pt,[pt],(R,[A])=>!A.evaluate(R)],"is-supported-script":[pt,[Et],(R,[A])=>{let F=R.globals&&R.globals.isSupportedScript;return!F||F(A.evaluate(R))}],upcase:[Et,[Et],(R,[A])=>A.evaluate(R).toUpperCase()],downcase:[Et,[Et],(R,[A])=>A.evaluate(R).toLowerCase()],concat:[Et,Yc(mr),(R,A)=>A.map(F=>Ba(F.evaluate(R))).join("")],"resolved-locale":[Et,[Ar],(R,[A])=>A.evaluate(R).resolvedLocale()]});class Eu{constructor(A,F){var W;this.expression=A,this._warningHistory={},this._evaluator=new Ha,this._defaultValue=F?(W=F).type==="color"&&Wf(W.default)?new ir(0,0,0,0):W.type==="color"?ir.parse(W.default)||null:W.type==="padding"?$r.parse(W.default)||null:W.type==="variableAnchorOffsetCollection"?Zi.parse(W.default)||null:W.default===void 0?null:W.default:null,this._enumValues=F&&F.type==="enum"?F.values:null}evaluateWithoutErrorHandling(A,F,W,te,fe,pe){return this._evaluator.globals=A,this._evaluator.feature=F,this._evaluator.featureState=W,this._evaluator.canonical=te,this._evaluator.availableImages=fe||null,this._evaluator.formattedSection=pe,this.expression.evaluate(this._evaluator)}evaluate(A,F,W,te,fe,pe){this._evaluator.globals=A,this._evaluator.feature=F||null,this._evaluator.featureState=W||null,this._evaluator.canonical=te,this._evaluator.availableImages=fe||null,this._evaluator.formattedSection=pe||null;try{let Re=this.expression.evaluate(this._evaluator);if(Re==null||typeof Re=="number"&&Re!=Re)return this._defaultValue;if(this._enumValues&&!(Re in this._enumValues))throw new ma(`Expected value to be one of ${Object.keys(this._enumValues).map(Ke=>JSON.stringify(Ke)).join(", ")}, but found ${JSON.stringify(Re)} instead.`);return Re}catch(Re){return this._warningHistory[Re.message]||(this._warningHistory[Re.message]=!0,typeof console!="undefined"&&console.warn(Re.message)),this._defaultValue}}}function Dc(R){return Array.isArray(R)&&R.length>0&&typeof R[0]=="string"&&R[0]in yf}function ks(R,A){let F=new vo(yf,eh,[],A?function(te){let fe={color:jt,string:Et,number:dt,enum:Et,boolean:pt,formatted:ei,padding:qr,resolvedImage:jr,variableAnchorOffsetCollection:gt};return te.type==="array"?Ge(fe[te.value]||mr,te.length):fe[te.type]}(A):void 0),W=F.parse(R,void 0,void 0,void 0,A&&A.type==="string"?{typeAnnotation:"coerce"}:void 0);return W?cc(new Eu(W,A)):sf(F.errors)}class bc{constructor(A,F){this.kind=A,this._styleExpression=F,this.isStateDependent=A!=="constant"&&!ju(F.expression)}evaluateWithoutErrorHandling(A,F,W,te,fe,pe){return this._styleExpression.evaluateWithoutErrorHandling(A,F,W,te,fe,pe)}evaluate(A,F,W,te,fe,pe){return this._styleExpression.evaluate(A,F,W,te,fe,pe)}}class hu{constructor(A,F,W,te){this.kind=A,this.zoomStops=W,this._styleExpression=F,this.isStateDependent=A!=="camera"&&!ju(F.expression),this.interpolationType=te}evaluateWithoutErrorHandling(A,F,W,te,fe,pe){return this._styleExpression.evaluateWithoutErrorHandling(A,F,W,te,fe,pe)}evaluate(A,F,W,te,fe,pe){return this._styleExpression.evaluate(A,F,W,te,fe,pe)}interpolationFactor(A,F,W){return this.interpolationType?ko.interpolationFactor(this.interpolationType,A,F,W):0}}function _u(R,A){let F=ks(R,A);if(F.result==="error")return F;let W=F.value.expression,te=th(W);if(!te&&!Nl(A))return sf([new rt("","data expressions not supported")]);let fe=jf(W,["zoom"]);if(!fe&&!Kc(A))return sf([new rt("","zoom expressions not supported")]);let pe=nh(W);return pe||fe?pe instanceof rt?sf([pe]):pe instanceof ko&&!Rc(A)?sf([new rt("",'"interpolate" expressions cannot be used with this property')]):cc(pe?new hu(te?"camera":"composite",F.value,pe.labels,pe instanceof ko?pe.interpolation:void 0):new bc(te?"constant":"source",F.value)):sf([new rt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class nl{constructor(A,F){this._parameters=A,this._specification=F,Ae(this,rh(this._parameters,this._specification))}static deserialize(A){return new nl(A._parameters,A._specification)}static serialize(A){return{_parameters:A._parameters,_specification:A._specification}}}function nh(R){let A=null;if(R instanceof Gn)A=nh(R.result);else if(R instanceof Fs){for(let F of R.args)if(A=nh(F),A)break}else(R instanceof _n||R instanceof ko)&&R.input instanceof Bl&&R.input.name==="zoom"&&(A=R);return A instanceof rt||R.eachChild(F=>{let W=nh(F);W instanceof rt?A=W:!A&&W?A=new rt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):A&&W&&A!==W&&(A=new rt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),A}function Mh(R){if(R===!0||R===!1)return!0;if(!Array.isArray(R)||R.length===0)return!1;switch(R[0]){case"has":return R.length>=2&&R[1]!=="$id"&&R[1]!=="$type";case"in":return R.length>=3&&(typeof R[1]!="string"||Array.isArray(R[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case"any":case"all":for(let A of R.slice(1))if(!Mh(A)&&typeof A!="boolean")return!1;return!0;default:return!0}}let zu={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Fc(R){if(R==null)return{filter:()=>!0,needGeometry:!1};Mh(R)||(R=xf(R));let A=ks(R,zu);if(A.result==="error")throw new Error(A.value.map(F=>`${F.key}: ${F.message}`).join(", "));return{filter:(F,W,te)=>A.value.evaluate(F,W,{},te),needGeometry:bd(R)}}function wc(R,A){return RA?1:0}function bd(R){if(!Array.isArray(R))return!1;if(R[0]==="within"||R[0]==="distance")return!0;for(let A=1;A"||A==="<="||A===">="?Pf(R[1],R[2],A):A==="any"?(F=R.slice(1),["any"].concat(F.map(xf))):A==="all"?["all"].concat(R.slice(1).map(xf)):A==="none"?["all"].concat(R.slice(1).map(xf).map(jl)):A==="in"?qu(R[1],R.slice(2)):A==="!in"?jl(qu(R[1],R.slice(2))):A==="has"?bf(R[1]):A!=="!has"||jl(bf(R[1]));var F}function Pf(R,A,F){switch(R){case"$type":return[`filter-type-${F}`,A];case"$id":return[`filter-id-${F}`,A];default:return[`filter-${F}`,R,A]}}function qu(R,A){if(A.length===0)return!1;switch(R){case"$type":return["filter-type-in",["literal",A]];case"$id":return["filter-id-in",["literal",A]];default:return A.length>200&&!A.some(F=>typeof F!=typeof A[0])?["filter-in-large",R,["literal",A.sort(wc)]]:["filter-in-small",R,["literal",A]]}}function bf(R){switch(R){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",R]}}function jl(R){return["!",R]}function uf(R){let A=typeof R;if(A==="number"||A==="boolean"||A==="string"||R==null)return JSON.stringify(R);if(Array.isArray(R)){let te="[";for(let fe of R)te+=`${uf(fe)},`;return`${te}]`}let F=Object.keys(R).sort(),W="{";for(let te=0;teW.maximum?[new Ue(A,F,`${F} is greater than the maximum value ${W.maximum}`)]:[]}function wf(R){let A=R.valueSpec,F=Cs(R.value.type),W,te,fe,pe={},Re=F!=="categorical"&&R.value.property===void 0,Ke=!Re,ft=gs(R.value.stops)==="array"&&gs(R.value.stops[0])==="array"&&gs(R.value.stops[0][0])==="object",Rt=ku({key:R.key,value:R.value,valueSpec:R.styleSpec.function,validateSpec:R.validateSpec,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:function(vr){if(F==="identity")return[new Ue(vr.key,vr.value,'identity function may not have a "stops" property')];let kr=[],Dr=vr.value;return kr=kr.concat(Xf({key:vr.key,value:Dr,valueSpec:vr.valueSpec,validateSpec:vr.validateSpec,style:vr.style,styleSpec:vr.styleSpec,arrayElementValidator:er})),gs(Dr)==="array"&&Dr.length===0&&kr.push(new Ue(vr.key,Dr,"array must have at least one stop")),kr},default:function(vr){return vr.validateSpec({key:vr.key,value:vr.value,valueSpec:A,validateSpec:vr.validateSpec,style:vr.style,styleSpec:vr.styleSpec})}}});return F==="identity"&&Re&&Rt.push(new Ue(R.key,R.value,'missing required property "property"')),F==="identity"||R.value.stops||Rt.push(new Ue(R.key,R.value,'missing required property "stops"')),F==="exponential"&&R.valueSpec.expression&&!Rc(R.valueSpec)&&Rt.push(new Ue(R.key,R.value,"exponential functions not supported")),R.styleSpec.$version>=8&&(Ke&&!Nl(R.valueSpec)?Rt.push(new Ue(R.key,R.value,"property functions not supported")):Re&&!Kc(R.valueSpec)&&Rt.push(new Ue(R.key,R.value,"zoom functions not supported"))),F!=="categorical"&&!ft||R.value.property!==void 0||Rt.push(new Ue(R.key,R.value,'"property" property is required')),Rt;function er(vr){let kr=[],Dr=vr.value,li=vr.key;if(gs(Dr)!=="array")return[new Ue(li,Dr,`array expected, ${gs(Dr)} found`)];if(Dr.length!==2)return[new Ue(li,Dr,`array length 2 expected, length ${Dr.length} found`)];if(ft){if(gs(Dr[0])!=="object")return[new Ue(li,Dr,`object expected, ${gs(Dr[0])} found`)];if(Dr[0].zoom===void 0)return[new Ue(li,Dr,"object stop key must have zoom")];if(Dr[0].value===void 0)return[new Ue(li,Dr,"object stop key must have value")];if(fe&&fe>Cs(Dr[0].zoom))return[new Ue(li,Dr[0].zoom,"stop zoom values must appear in ascending order")];Cs(Dr[0].zoom)!==fe&&(fe=Cs(Dr[0].zoom),te=void 0,pe={}),kr=kr.concat(ku({key:`${li}[0]`,value:Dr[0],valueSpec:{zoom:{}},validateSpec:vr.validateSpec,style:vr.style,styleSpec:vr.styleSpec,objectElementValidators:{zoom:Us,value:ur}}))}else kr=kr.concat(ur({key:`${li}[0]`,value:Dr[0],valueSpec:{},validateSpec:vr.validateSpec,style:vr.style,styleSpec:vr.styleSpec},Dr));return Dc(du(Dr[1]))?kr.concat([new Ue(`${li}[1]`,Dr[1],"expressions are not allowed in function stops.")]):kr.concat(vr.validateSpec({key:`${li}[1]`,value:Dr[1],valueSpec:A,validateSpec:vr.validateSpec,style:vr.style,styleSpec:vr.styleSpec}))}function ur(vr,kr){let Dr=gs(vr.value),li=Cs(vr.value),pi=vr.value!==null?vr.value:kr;if(W){if(Dr!==W)return[new Ue(vr.key,pi,`${Dr} stop domain type must match previous stop domain type ${W}`)]}else W=Dr;if(Dr!=="number"&&Dr!=="string"&&Dr!=="boolean")return[new Ue(vr.key,pi,"stop domain value must be a number, string, or boolean")];if(Dr!=="number"&&F!=="categorical"){let vn=`number expected, ${Dr} found`;return Nl(A)&&F===void 0&&(vn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ue(vr.key,pi,vn)]}return F!=="categorical"||Dr!=="number"||isFinite(li)&&Math.floor(li)===li?F!=="categorical"&&Dr==="number"&&te!==void 0&&linew Ue(`${R.key}${W.key}`,R.value,W.message));let F=A.value.expression||A.value._styleExpression.expression;if(R.expressionContext==="property"&&R.propertyKey==="text-font"&&!F.outputDefined())return[new Ue(R.key,R.value,`Invalid data expression for "${R.propertyKey}". Output values must be contained as literals within the expression.`)];if(R.expressionContext==="property"&&R.propertyType==="layout"&&!ju(F))return[new Ue(R.key,R.value,'"feature-state" data expressions are not supported with layout properties.')];if(R.expressionContext==="filter"&&!ju(F))return[new Ue(R.key,R.value,'"feature-state" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf("cluster")===0){if(!jf(F,["zoom","feature-state"]))return[new Ue(R.key,R.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(R.expressionContext==="cluster-initial"&&!th(F))return[new Ue(R.key,R.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Wu(R){let A=R.key,F=R.value,W=R.valueSpec,te=[];return Array.isArray(W.values)?W.values.indexOf(Cs(F))===-1&&te.push(new Ue(A,F,`expected one of [${W.values.join(", ")}], ${JSON.stringify(F)} found`)):Object.keys(W.values).indexOf(Cs(F))===-1&&te.push(new Ue(A,F,`expected one of [${Object.keys(W.values).join(", ")}], ${JSON.stringify(F)} found`)),te}function Rf(R){return Mh(du(R.value))?zc(Ae({},R,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Xu(R)}function Xu(R){let A=R.value,F=R.key;if(gs(A)!=="array")return[new Ue(F,A,`array expected, ${gs(A)} found`)];let W=R.styleSpec,te,fe=[];if(A.length<1)return[new Ue(F,A,"filter array must have at least 1 element")];switch(fe=fe.concat(Wu({key:`${F}[0]`,value:A[0],valueSpec:W.filter_operator,style:R.style,styleSpec:R.styleSpec})),Cs(A[0])){case"<":case"<=":case">":case">=":A.length>=2&&Cs(A[1])==="$type"&&fe.push(new Ue(F,A,`"$type" cannot be use with operator "${A[0]}"`));case"==":case"!=":A.length!==3&&fe.push(new Ue(F,A,`filter array for operator "${A[0]}" must have 3 elements`));case"in":case"!in":A.length>=2&&(te=gs(A[1]),te!=="string"&&fe.push(new Ue(`${F}[1]`,A[1],`string expected, ${te} found`)));for(let pe=2;pe{ft in F&&A.push(new Ue(W,F[ft],`"${ft}" is prohibited for ref layers`))}),te.layers.forEach(ft=>{Cs(ft.id)===Re&&(Ke=ft)}),Ke?Ke.ref?A.push(new Ue(W,F.ref,"ref cannot reference another ref layer")):pe=Cs(Ke.type):A.push(new Ue(W,F.ref,`ref layer "${Re}" not found`))}else if(pe!=="background")if(F.source){let Ke=te.sources&&te.sources[F.source],ft=Ke&&Cs(Ke.type);Ke?ft==="vector"&&pe==="raster"?A.push(new Ue(W,F.source,`layer "${F.id}" requires a raster source`)):ft!=="raster-dem"&&pe==="hillshade"?A.push(new Ue(W,F.source,`layer "${F.id}" requires a raster-dem source`)):ft==="raster"&&pe!=="raster"?A.push(new Ue(W,F.source,`layer "${F.id}" requires a vector source`)):ft!=="vector"||F["source-layer"]?ft==="raster-dem"&&pe!=="hillshade"?A.push(new Ue(W,F.source,"raster-dem source can only be used with layer type 'hillshade'.")):pe!=="line"||!F.paint||!F.paint["line-gradient"]||ft==="geojson"&&Ke.lineMetrics||A.push(new Ue(W,F,`layer "${F.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):A.push(new Ue(W,F,`layer "${F.id}" must specify a "source-layer"`)):A.push(new Ue(W,F.source,`source "${F.source}" not found`))}else A.push(new Ue(W,F,'missing required property "source"'));return A=A.concat(ku({key:W,value:F,valueSpec:fe.layer,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,objectElementValidators:{"*":()=>[],type:()=>R.validateSpec({key:`${W}.type`,value:F.type,valueSpec:fe.layer.type,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,object:F,objectKey:"type"}),filter:Rf,layout:Ke=>ku({layer:F,key:Ke.key,value:Ke.value,style:Ke.style,styleSpec:Ke.styleSpec,validateSpec:Ke.validateSpec,objectElementValidators:{"*":ft=>Wl(Ae({layerType:pe},ft))}}),paint:Ke=>ku({layer:F,key:Ke.key,value:Ke.value,style:Ke.style,styleSpec:Ke.styleSpec,validateSpec:Ke.validateSpec,objectElementValidators:{"*":ft=>Zf(Ae({layerType:pe},ft))}})}})),A}function Zu(R){let A=R.value,F=R.key,W=gs(A);return W!=="string"?[new Ue(F,A,`string expected, ${W} found`)]:[]}let qc={promoteId:function({key:R,value:A}){if(gs(A)==="string")return Zu({key:R,value:A});{let F=[];for(let W in A)F.push(...Zu({key:`${R}.${W}`,value:A[W]}));return F}}};function Tc(R){let A=R.value,F=R.key,W=R.styleSpec,te=R.style,fe=R.validateSpec;if(!A.type)return[new Ue(F,A,'"type" is required')];let pe=Cs(A.type),Re;switch(pe){case"vector":case"raster":return Re=ku({key:F,value:A,valueSpec:W[`source_${pe.replace("-","_")}`],style:R.style,styleSpec:W,objectElementValidators:qc,validateSpec:fe}),Re;case"raster-dem":return Re=function(Ke){var ft;let Rt=(ft=Ke.sourceName)!==null&&ft!==void 0?ft:"",er=Ke.value,ur=Ke.styleSpec,vr=ur.source_raster_dem,kr=Ke.style,Dr=[],li=gs(er);if(er===void 0)return Dr;if(li!=="object")return Dr.push(new Ue("source_raster_dem",er,`object expected, ${li} found`)),Dr;let pi=Cs(er.encoding)==="custom",vn=["redFactor","greenFactor","blueFactor","baseShift"],zi=Ke.value.encoding?`"${Ke.value.encoding}"`:"Default";for(let ln in er)!pi&&vn.includes(ln)?Dr.push(new Ue(ln,er[ln],`In "${Rt}": "${ln}" is only valid when "encoding" is set to "custom". ${zi} encoding found`)):vr[ln]?Dr=Dr.concat(Ke.validateSpec({key:ln,value:er[ln],valueSpec:vr[ln],validateSpec:Ke.validateSpec,style:kr,styleSpec:ur})):Dr.push(new Ue(ln,er[ln],`unknown property "${ln}"`));return Dr}({sourceName:F,value:A,style:R.style,styleSpec:W,validateSpec:fe}),Re;case"geojson":if(Re=ku({key:F,value:A,valueSpec:W.source_geojson,style:te,styleSpec:W,validateSpec:fe,objectElementValidators:qc}),A.cluster)for(let Ke in A.clusterProperties){let[ft,Rt]=A.clusterProperties[Ke],er=typeof ft=="string"?[ft,["accumulated"],["get",Ke]]:ft;Re.push(...zc({key:`${F}.${Ke}.map`,value:Rt,validateSpec:fe,expressionContext:"cluster-map"})),Re.push(...zc({key:`${F}.${Ke}.reduce`,value:er,validateSpec:fe,expressionContext:"cluster-reduce"}))}return Re;case"video":return ku({key:F,value:A,valueSpec:W.source_video,style:te,validateSpec:fe,styleSpec:W});case"image":return ku({key:F,value:A,valueSpec:W.source_image,style:te,validateSpec:fe,styleSpec:W});case"canvas":return[new Ue(F,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Wu({key:`${F}.type`,value:A.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:te,validateSpec:fe,styleSpec:W})}}function wl(R){let A=R.value,F=R.styleSpec,W=F.light,te=R.style,fe=[],pe=gs(A);if(A===void 0)return fe;if(pe!=="object")return fe=fe.concat([new Ue("light",A,`object expected, ${pe} found`)]),fe;for(let Re in A){let Ke=Re.match(/^(.*)-transition$/);fe=fe.concat(Ke&&W[Ke[1]]&&W[Ke[1]].transition?R.validateSpec({key:Re,value:A[Re],valueSpec:F.transition,validateSpec:R.validateSpec,style:te,styleSpec:F}):W[Re]?R.validateSpec({key:Re,value:A[Re],valueSpec:W[Re],validateSpec:R.validateSpec,style:te,styleSpec:F}):[new Ue(Re,A[Re],`unknown property "${Re}"`)])}return fe}function vu(R){let A=R.value,F=R.styleSpec,W=F.sky,te=R.style,fe=gs(A);if(A===void 0)return[];if(fe!=="object")return[new Ue("sky",A,`object expected, ${fe} found`)];let pe=[];for(let Re in A)pe=pe.concat(W[Re]?R.validateSpec({key:Re,value:A[Re],valueSpec:W[Re],style:te,styleSpec:F}):[new Ue(Re,A[Re],`unknown property "${Re}"`)]);return pe}function Oc(R){let A=R.value,F=R.styleSpec,W=F.terrain,te=R.style,fe=[],pe=gs(A);if(A===void 0)return fe;if(pe!=="object")return fe=fe.concat([new Ue("terrain",A,`object expected, ${pe} found`)]),fe;for(let Re in A)fe=fe.concat(W[Re]?R.validateSpec({key:Re,value:A[Re],valueSpec:W[Re],validateSpec:R.validateSpec,style:te,styleSpec:F}):[new Ue(Re,A[Re],`unknown property "${Re}"`)]);return fe}function ff(R){let A=[],F=R.value,W=R.key;if(Array.isArray(F)){let te=[],fe=[];for(let pe in F)F[pe].id&&te.includes(F[pe].id)&&A.push(new Ue(W,F,`all the sprites' ids must be unique, but ${F[pe].id} is duplicated`)),te.push(F[pe].id),F[pe].url&&fe.includes(F[pe].url)&&A.push(new Ue(W,F,`all the sprites' URLs must be unique, but ${F[pe].url} is duplicated`)),fe.push(F[pe].url),A=A.concat(ku({key:`${W}[${pe}]`,value:F[pe],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:R.validateSpec}));return A}return Zu({key:W,value:F})}let fc={"*":()=>[],array:Xf,boolean:function(R){let A=R.value,F=R.key,W=gs(A);return W!=="boolean"?[new Ue(F,A,`boolean expected, ${W} found`)]:[]},number:Us,color:function(R){let A=R.key,F=R.value,W=gs(F);return W!=="string"?[new Ue(A,F,`color expected, ${W} found`)]:ir.parse(String(F))?[]:[new Ue(A,F,`color expected, "${F}" found`)]},constants:If,enum:Wu,filter:Rf,function:wf,layer:ah,object:ku,source:Tc,light:wl,sky:vu,terrain:Oc,projection:function(R){let A=R.value,F=R.styleSpec,W=F.projection,te=R.style,fe=gs(A);if(A===void 0)return[];if(fe!=="object")return[new Ue("projection",A,`object expected, ${fe} found`)];let pe=[];for(let Re in A)pe=pe.concat(W[Re]?R.validateSpec({key:Re,value:A[Re],valueSpec:W[Re],style:te,styleSpec:F}):[new Ue(Re,A[Re],`unknown property "${Re}"`)]);return pe},string:Zu,formatted:function(R){return Zu(R).length===0?[]:zc(R)},resolvedImage:function(R){return Zu(R).length===0?[]:zc(R)},padding:function(R){let A=R.key,F=R.value;if(gs(F)==="array"){if(F.length<1||F.length>4)return[new Ue(A,F,`padding requires 1 to 4 values; ${F.length} values found`)];let W={type:"number"},te=[];for(let fe=0;fe[]}})),R.constants&&(F=F.concat(If({key:"constants",value:R.constants,style:R,styleSpec:A,validateSpec:Bc}))),xr(F)}function Er(R){return function(A){return R(j1(_g({},A),{validateSpec:Bc}))}}function xr(R){return[].concat(R).sort((A,F)=>A.line-F.line)}function Kr(R){return function(...A){return xr(R.apply(this,A))}}Zt.source=Kr(Er(Tc)),Zt.sprite=Kr(Er(ff)),Zt.glyphs=Kr(Er(kt)),Zt.light=Kr(Er(wl)),Zt.sky=Kr(Er(vu)),Zt.terrain=Kr(Er(Oc)),Zt.layer=Kr(Er(ah)),Zt.filter=Kr(Er(Rf)),Zt.paintProperty=Kr(Er(Zf)),Zt.layoutProperty=Kr(Er(Wl));let Mi=Zt,Wi=Mi.light,dn=Mi.sky,wn=Mi.paintProperty,On=Mi.layoutProperty;function Yi(R,A){let F=!1;if(A&&A.length)for(let W of A)R.fire(new me(new Error(W.message))),F=!0;return F}class $i{constructor(A,F,W){let te=this.cells=[];if(A instanceof ArrayBuffer){this.arrayBuffer=A;let pe=new Int32Array(this.arrayBuffer);A=pe[0],this.d=(F=pe[1])+2*(W=pe[2]);for(let Ke=0;Ke=er[kr+0]&&te>=er[kr+1])?(Re[vr]=!0,pe.push(Rt[vr])):Re[vr]=!1}}}}_forEachCell(A,F,W,te,fe,pe,Re,Ke){let ft=this._convertToCellCoord(A),Rt=this._convertToCellCoord(F),er=this._convertToCellCoord(W),ur=this._convertToCellCoord(te);for(let vr=ft;vr<=er;vr++)for(let kr=Rt;kr<=ur;kr++){let Dr=this.d*kr+vr;if((!Ke||Ke(this._convertFromCellCoord(vr),this._convertFromCellCoord(kr),this._convertFromCellCoord(vr+1),this._convertFromCellCoord(kr+1)))&&fe.call(this,A,F,W,te,Dr,pe,Re,Ke))return}}_convertFromCellCoord(A){return(A-this.padding)/this.scale}_convertToCellCoord(A){return Math.max(0,Math.min(this.d-1,Math.floor(A*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let A=this.cells,F=3+this.cells.length+1+1,W=0;for(let pe=0;pe=0)continue;let pe=R[fe];te[fe]=an[F].shallow.indexOf(fe)>=0?pe:La(pe,A)}R instanceof Error&&(te.message=R.message)}if(te.$name)throw new Error("$name property is reserved for worker serialization logic.");return F!=="Object"&&(te.$name=F),te}function Ua(R){if(Ra(R))return R;if(Array.isArray(R))return R.map(Ua);if(typeof R!="object")throw new Error("can't deserialize object of type "+typeof R);let A=Ca(R)||"Object";if(!an[A])throw new Error(`can't deserialize unregistered class ${A}`);let{klass:F}=an[A];if(!F)throw new Error(`can't deserialize unregistered class ${A}`);if(F.deserialize)return F.deserialize(R);let W=Object.create(F.prototype);for(let te of Object.keys(R)){if(te==="$name")continue;let fe=R[te];W[te]=an[A].shallow.indexOf(te)>=0?fe:Ua(fe)}return W}class Zn{constructor(){this.first=!0}update(A,F){let W=Math.floor(A);return this.first?(this.first=!1,this.lastIntegerZoom=W,this.lastIntegerZoomTime=0,this.lastZoom=A,this.lastFloorZoom=W,!0):(this.lastFloorZoom>W?(this.lastIntegerZoom=W+1,this.lastIntegerZoomTime=F):this.lastFloorZoomR>=128&&R<=255,"Hangul Jamo":R=>R>=4352&&R<=4607,Khmer:R=>R>=6016&&R<=6143,"General Punctuation":R=>R>=8192&&R<=8303,"Letterlike Symbols":R=>R>=8448&&R<=8527,"Number Forms":R=>R>=8528&&R<=8591,"Miscellaneous Technical":R=>R>=8960&&R<=9215,"Control Pictures":R=>R>=9216&&R<=9279,"Optical Character Recognition":R=>R>=9280&&R<=9311,"Enclosed Alphanumerics":R=>R>=9312&&R<=9471,"Geometric Shapes":R=>R>=9632&&R<=9727,"Miscellaneous Symbols":R=>R>=9728&&R<=9983,"Miscellaneous Symbols and Arrows":R=>R>=11008&&R<=11263,"Ideographic Description Characters":R=>R>=12272&&R<=12287,"CJK Symbols and Punctuation":R=>R>=12288&&R<=12351,Katakana:R=>R>=12448&&R<=12543,Kanbun:R=>R>=12688&&R<=12703,"CJK Strokes":R=>R>=12736&&R<=12783,"Enclosed CJK Letters and Months":R=>R>=12800&&R<=13055,"CJK Compatibility":R=>R>=13056&&R<=13311,"Yijing Hexagram Symbols":R=>R>=19904&&R<=19967,"Private Use Area":R=>R>=57344&&R<=63743,"Vertical Forms":R=>R>=65040&&R<=65055,"CJK Compatibility Forms":R=>R>=65072&&R<=65103,"Small Form Variants":R=>R>=65104&&R<=65135,"Halfwidth and Fullwidth Forms":R=>R>=65280&&R<=65519};function Ka(R){for(let A of R)if(Ho(A.charCodeAt(0)))return!0;return!1}function bo(R){for(let A of R)if(!as(A.charCodeAt(0)))return!1;return!0}function Zo(R){let A=R.map(F=>{try{return new RegExp(`\\p{sc=${F}}`,"u").source}catch(W){return null}}).filter(F=>F);return new RegExp(A.join("|"),"u")}let Ss=Zo(["Arab","Dupl","Mong","Ougr","Syrc"]);function as(R){return!Ss.test(String.fromCodePoint(R))}let ws=Zo(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Ho(R){return!(R!==746&&R!==747&&(R<4352||!(Dn["CJK Compatibility Forms"](R)&&!(R>=65097&&R<=65103)||Dn["CJK Compatibility"](R)||Dn["CJK Strokes"](R)||!(!Dn["CJK Symbols and Punctuation"](R)||R>=12296&&R<=12305||R>=12308&&R<=12319||R===12336)||Dn["Enclosed CJK Letters and Months"](R)||Dn["Ideographic Description Characters"](R)||Dn.Kanbun(R)||Dn.Katakana(R)&&R!==12540||!(!Dn["Halfwidth and Fullwidth Forms"](R)||R===65288||R===65289||R===65293||R>=65306&&R<=65310||R===65339||R===65341||R===65343||R>=65371&&R<=65503||R===65507||R>=65512&&R<=65519)||!(!Dn["Small Form Variants"](R)||R>=65112&&R<=65118||R>=65123&&R<=65126)||Dn["Vertical Forms"](R)||Dn["Yijing Hexagram Symbols"](R)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(R))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(R))||ws.test(String.fromCodePoint(R)))))}function ml(R){return!(Ho(R)||function(A){return!!(Dn["Latin-1 Supplement"](A)&&(A===167||A===169||A===174||A===177||A===188||A===189||A===190||A===215||A===247)||Dn["General Punctuation"](A)&&(A===8214||A===8224||A===8225||A===8240||A===8241||A===8251||A===8252||A===8258||A===8263||A===8264||A===8265||A===8273)||Dn["Letterlike Symbols"](A)||Dn["Number Forms"](A)||Dn["Miscellaneous Technical"](A)&&(A>=8960&&A<=8967||A>=8972&&A<=8991||A>=8996&&A<=9e3||A===9003||A>=9085&&A<=9114||A>=9150&&A<=9165||A===9167||A>=9169&&A<=9179||A>=9186&&A<=9215)||Dn["Control Pictures"](A)&&A!==9251||Dn["Optical Character Recognition"](A)||Dn["Enclosed Alphanumerics"](A)||Dn["Geometric Shapes"](A)||Dn["Miscellaneous Symbols"](A)&&!(A>=9754&&A<=9759)||Dn["Miscellaneous Symbols and Arrows"](A)&&(A>=11026&&A<=11055||A>=11088&&A<=11097||A>=11192&&A<=11243)||Dn["CJK Symbols and Punctuation"](A)||Dn.Katakana(A)||Dn["Private Use Area"](A)||Dn["CJK Compatibility Forms"](A)||Dn["Small Form Variants"](A)||Dn["Halfwidth and Fullwidth Forms"](A)||A===8734||A===8756||A===8757||A>=9984&&A<=10087||A>=10102&&A<=10131||A===65532||A===65533)}(R))}let Ws=Zo(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Ls(R){return Ws.test(String.fromCodePoint(R))}function va(R,A){return!(!A&&Ls(R)||R>=2304&&R<=3583||R>=3840&&R<=4255||Dn.Khmer(R))}function no(R){for(let A of R)if(Ls(A.charCodeAt(0)))return!0;return!1}let ys=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(R){this.pluginStatus=R.pluginStatus,this.pluginURL=R.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(R){this.applyArabicShaping=R.applyArabicShaping,this.processBidirectionalText=R.processBidirectionalText,this.processStyledBidirectionalText=R.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class rs{constructor(A,F){this.zoom=A,F?(this.now=F.now,this.fadeDuration=F.fadeDuration,this.zoomHistory=F.zoomHistory,this.transition=F.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Zn,this.transition={})}isSupportedScript(A){return function(F,W){for(let te of F)if(!va(te.charCodeAt(0),W))return!1;return!0}(A,ys.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let A=this.zoom,F=A-Math.floor(A),W=this.crossFadingFactor();return A>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:F+(1-F)*W}:{fromScale:.5,toScale:1,t:1-(1-W)*F}}}class Ql{constructor(A,F){this.property=A,this.value=F,this.expression=function(W,te){if(Wf(W))return new nl(W,te);if(Dc(W)){let fe=_u(W,te);if(fe.result==="error")throw new Error(fe.value.map(pe=>`${pe.key}: ${pe.message}`).join(", "));return fe.value}{let fe=W;return te.type==="color"&&typeof W=="string"?fe=ir.parse(W):te.type!=="padding"||typeof W!="number"&&!Array.isArray(W)?te.type==="variableAnchorOffsetCollection"&&Array.isArray(W)&&(fe=Zi.parse(W)):fe=$r.parse(W),{kind:"constant",evaluate:()=>fe}}}(F===void 0?A.specification.default:F,A.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(A,F,W){return this.property.possiblyEvaluate(this,A,F,W)}}class Cu{constructor(A){this.property=A,this.value=new Ql(A,void 0)}transitioned(A,F){return new Nc(this.property,this.value,F,L({},A.transition,this.transition),A.now)}untransitioned(){return new Nc(this.property,this.value,null,{},0)}}class Yu{constructor(A){this._properties=A,this._values=Object.create(A.defaultTransitionablePropertyValues)}getValue(A){return g(this._values[A].value.value)}setValue(A,F){Object.prototype.hasOwnProperty.call(this._values,A)||(this._values[A]=new Cu(this._values[A].property)),this._values[A].value=new Ql(this._values[A].property,F===null?void 0:g(F))}getTransition(A){return g(this._values[A].transition)}setTransition(A,F){Object.prototype.hasOwnProperty.call(this._values,A)||(this._values[A]=new Cu(this._values[A].property)),this._values[A].transition=g(F)||void 0}serialize(){let A={};for(let F of Object.keys(this._values)){let W=this.getValue(F);W!==void 0&&(A[F]=W);let te=this.getTransition(F);te!==void 0&&(A[`${F}-transition`]=te)}return A}transitioned(A,F){let W=new pu(this._properties);for(let te of Object.keys(this._values))W._values[te]=this._values[te].transitioned(A,F._values[te]);return W}untransitioned(){let A=new pu(this._properties);for(let F of Object.keys(this._values))A._values[F]=this._values[F].untransitioned();return A}}class Nc{constructor(A,F,W,te,fe){this.property=A,this.value=F,this.begin=fe+te.delay||0,this.end=this.begin+te.duration||0,A.specification.transition&&(te.delay||te.duration)&&(this.prior=W)}possiblyEvaluate(A,F,W){let te=A.now||0,fe=this.value.possiblyEvaluate(A,F,W),pe=this.prior;if(pe){if(te>this.end)return this.prior=null,fe;if(this.value.isDataDriven())return this.prior=null,fe;if(te=1)return 1;let ft=Ke*Ke,Rt=ft*Ke;return 4*(Ke<.5?Rt:3*(Ke-ft)+Rt-.75)}(Re))}}return fe}}class pu{constructor(A){this._properties=A,this._values=Object.create(A.defaultTransitioningPropertyValues)}possiblyEvaluate(A,F,W){let te=new Ac(this._properties);for(let fe of Object.keys(this._values))te._values[fe]=this._values[fe].possiblyEvaluate(A,F,W);return te}hasTransition(){for(let A of Object.keys(this._values))if(this._values[A].prior)return!0;return!1}}class Uc{constructor(A){this._properties=A,this._values=Object.create(A.defaultPropertyValues)}hasValue(A){return this._values[A].value!==void 0}getValue(A){return g(this._values[A].value)}setValue(A,F){this._values[A]=new Ql(this._values[A].property,F===null?void 0:g(F))}serialize(){let A={};for(let F of Object.keys(this._values)){let W=this.getValue(F);W!==void 0&&(A[F]=W)}return A}possiblyEvaluate(A,F,W){let te=new Ac(this._properties);for(let fe of Object.keys(this._values))te._values[fe]=this._values[fe].possiblyEvaluate(A,F,W);return te}}class xu{constructor(A,F,W){this.property=A,this.value=F,this.parameters=W}isConstant(){return this.value.kind==="constant"}constantOr(A){return this.value.kind==="constant"?this.value.value:A}evaluate(A,F,W,te){return this.property.evaluate(this.value,this.parameters,A,F,W,te)}}class Ac{constructor(A){this._properties=A,this._values=Object.create(A.defaultPossiblyEvaluatedValues)}get(A){return this._values[A]}}class Va{constructor(A){this.specification=A}possiblyEvaluate(A,F){if(A.isDataDriven())throw new Error("Value should not be data driven");return A.expression.evaluate(F)}interpolate(A,F,W){let te=Lo[this.specification.type];return te?te(A,F,W):A}}class oo{constructor(A,F){this.specification=A,this.overrides=F}possiblyEvaluate(A,F,W,te){return new xu(this,A.expression.kind==="constant"||A.expression.kind==="camera"?{kind:"constant",value:A.expression.evaluate(F,null,{},W,te)}:A.expression,F)}interpolate(A,F,W){if(A.value.kind!=="constant"||F.value.kind!=="constant")return A;if(A.value.value===void 0||F.value.value===void 0)return new xu(this,{kind:"constant",value:void 0},A.parameters);let te=Lo[this.specification.type];if(te){let fe=te(A.value.value,F.value.value,W);return new xu(this,{kind:"constant",value:fe},A.parameters)}return A}evaluate(A,F,W,te,fe,pe){return A.kind==="constant"?A.value:A.evaluate(F,W,te,fe,pe)}}class Vc extends oo{possiblyEvaluate(A,F,W,te){if(A.value===void 0)return new xu(this,{kind:"constant",value:void 0},F);if(A.expression.kind==="constant"){let fe=A.expression.evaluate(F,null,{},W,te),pe=A.property.specification.type==="resolvedImage"&&typeof fe!="string"?fe.name:fe,Re=this._calculate(pe,pe,pe,F);return new xu(this,{kind:"constant",value:Re},F)}if(A.expression.kind==="camera"){let fe=this._calculate(A.expression.evaluate({zoom:F.zoom-1}),A.expression.evaluate({zoom:F.zoom}),A.expression.evaluate({zoom:F.zoom+1}),F);return new xu(this,{kind:"constant",value:fe},F)}return new xu(this,A.expression,F)}evaluate(A,F,W,te,fe,pe){if(A.kind==="source"){let Re=A.evaluate(F,W,te,fe,pe);return this._calculate(Re,Re,Re,F)}return A.kind==="composite"?this._calculate(A.evaluate({zoom:Math.floor(F.zoom)-1},W,te),A.evaluate({zoom:Math.floor(F.zoom)},W,te),A.evaluate({zoom:Math.floor(F.zoom)+1},W,te),F):A.value}_calculate(A,F,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:A,to:F}:{from:W,to:F}}interpolate(A){return A}}class hc{constructor(A){this.specification=A}possiblyEvaluate(A,F,W,te){if(A.value!==void 0){if(A.expression.kind==="constant"){let fe=A.expression.evaluate(F,null,{},W,te);return this._calculate(fe,fe,fe,F)}return this._calculate(A.expression.evaluate(new rs(Math.floor(F.zoom-1),F)),A.expression.evaluate(new rs(Math.floor(F.zoom),F)),A.expression.evaluate(new rs(Math.floor(F.zoom+1),F)),F)}}_calculate(A,F,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:A,to:F}:{from:W,to:F}}interpolate(A){return A}}class Ku{constructor(A){this.specification=A}possiblyEvaluate(A,F,W,te){return!!A.expression.evaluate(F,null,{},W,te)}interpolate(){return!1}}class ue{constructor(A){this.properties=A,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let F in A){let W=A[F];W.specification.overridable&&this.overridableProperties.push(F);let te=this.defaultPropertyValues[F]=new Ql(W,void 0),fe=this.defaultTransitionablePropertyValues[F]=new Cu(W);this.defaultTransitioningPropertyValues[F]=fe.untransitioned(),this.defaultPossiblyEvaluatedValues[F]=te.possiblyEvaluate({})}}}Fi("DataDrivenProperty",oo),Fi("DataConstantProperty",Va),Fi("CrossFadedDataDrivenProperty",Vc),Fi("CrossFadedProperty",hc),Fi("ColorRampProperty",Ku);let w="-transition";class B extends Pe{constructor(A,F){if(super(),this.id=A.id,this.type=A.type,this._featureFilter={filter:()=>!0,needGeometry:!1},A.type!=="custom"&&(this.metadata=A.metadata,this.minzoom=A.minzoom,this.maxzoom=A.maxzoom,A.type!=="background"&&(this.source=A.source,this.sourceLayer=A["source-layer"],this.filter=A.filter),F.layout&&(this._unevaluatedLayout=new Uc(F.layout)),F.paint)){this._transitionablePaint=new Yu(F.paint);for(let W in A.paint)this.setPaintProperty(W,A.paint[W],{validate:!1});for(let W in A.layout)this.setLayoutProperty(W,A.layout[W],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ac(F.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(A){return A==="visibility"?this.visibility:this._unevaluatedLayout.getValue(A)}setLayoutProperty(A,F,W={}){F!=null&&this._validate(On,`layers.${this.id}.layout.${A}`,A,F,W)||(A!=="visibility"?this._unevaluatedLayout.setValue(A,F):this.visibility=F)}getPaintProperty(A){return A.endsWith(w)?this._transitionablePaint.getTransition(A.slice(0,-11)):this._transitionablePaint.getValue(A)}setPaintProperty(A,F,W={}){if(F!=null&&this._validate(wn,`layers.${this.id}.paint.${A}`,A,F,W))return!1;if(A.endsWith(w))return this._transitionablePaint.setTransition(A.slice(0,-11),F||void 0),!1;{let te=this._transitionablePaint._values[A],fe=te.property.specification["property-type"]==="cross-faded-data-driven",pe=te.value.isDataDriven(),Re=te.value;this._transitionablePaint.setValue(A,F),this._handleSpecialPaintPropertyUpdate(A);let Ke=this._transitionablePaint._values[A].value;return Ke.isDataDriven()||pe||fe||this._handleOverridablePaintPropertyUpdate(A,Re,Ke)}}_handleSpecialPaintPropertyUpdate(A){}_handleOverridablePaintPropertyUpdate(A,F,W){return!1}isHidden(A){return!!(this.minzoom&&A=this.maxzoom)||this.visibility==="none"}updateTransitions(A){this._transitioningPaint=this._transitionablePaint.transitioned(A,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(A,F){A.getCrossfadeParameters&&(this._crossfadeParameters=A.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(A,void 0,F)),this.paint=this._transitioningPaint.possiblyEvaluate(A,void 0,F)}serialize(){let A={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&&(A.layout=A.layout||{},A.layout.visibility=this.visibility),S(A,(F,W)=>!(F===void 0||W==="layout"&&!Object.keys(F).length||W==="paint"&&!Object.keys(F).length))}_validate(A,F,W,te,fe={}){return(!fe||fe.validate!==!1)&&Yi(this,A.call(Mi,{key:F,layerType:this.type,objectKey:W,value:te,styleSpec:ce,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let A in this.paint._values){let F=this.paint.get(A);if(F instanceof xu&&Nl(F.property.specification)&&(F.value.kind==="source"||F.value.kind==="composite")&&F.value.isStateDependent)return!0}return!1}}let Q={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class ee{constructor(A,F){this._structArray=A,this._pos1=F*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class le{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(A,F){return A._trim(),F&&(A.isTransferred=!0,F.push(A.arrayBuffer)),{length:A.length,arrayBuffer:A.arrayBuffer}}static deserialize(A){let F=Object.create(this.prototype);return F.arrayBuffer=A.arrayBuffer,F.length=A.length,F.capacity=A.arrayBuffer.byteLength/F.bytesPerElement,F._refreshViews(),F}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(A){this.reserve(A),this.length=A}reserve(A){if(A>this.capacity){this.capacity=Math.max(A,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let F=this.uint8;this._refreshViews(),F&&this.uint8.set(F)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Fe(R,A=1){let F=0,W=0;return{members:R.map(te=>{let fe=Q[te.type].BYTES_PER_ELEMENT,pe=F=Ze(F,Math.max(A,fe)),Re=te.components||1;return W=Math.max(W,fe),F+=fe*Re,{name:te.name,type:te.type,components:Re,offset:pe}}),size:Ze(F,Math.max(W,A)),alignment:A}}function Ze(R,A){return Math.ceil(R/A)*A}class ut extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F){let W=this.length;return this.resize(W+1),this.emplace(W,A,F)}emplace(A,F,W){let te=2*A;return this.int16[te+0]=F,this.int16[te+1]=W,A}}ut.prototype.bytesPerElement=4,Fi("StructArrayLayout2i4",ut);class Mt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,A,F,W)}emplace(A,F,W,te){let fe=3*A;return this.int16[fe+0]=F,this.int16[fe+1]=W,this.int16[fe+2]=te,A}}Mt.prototype.bytesPerElement=6,Fi("StructArrayLayout3i6",Mt);class Jt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te){let fe=this.length;return this.resize(fe+1),this.emplace(fe,A,F,W,te)}emplace(A,F,W,te,fe){let pe=4*A;return this.int16[pe+0]=F,this.int16[pe+1]=W,this.int16[pe+2]=te,this.int16[pe+3]=fe,A}}Jt.prototype.bytesPerElement=8,Fi("StructArrayLayout4i8",Jt);class $t extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe){let Re=this.length;return this.resize(Re+1),this.emplace(Re,A,F,W,te,fe,pe)}emplace(A,F,W,te,fe,pe,Re){let Ke=6*A;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.int16[Ke+2]=te,this.int16[Ke+3]=fe,this.int16[Ke+4]=pe,this.int16[Ke+5]=Re,A}}$t.prototype.bytesPerElement=12,Fi("StructArrayLayout2i4i12",$t);class yr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe){let Re=this.length;return this.resize(Re+1),this.emplace(Re,A,F,W,te,fe,pe)}emplace(A,F,W,te,fe,pe,Re){let Ke=4*A,ft=8*A;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.uint8[ft+4]=te,this.uint8[ft+5]=fe,this.uint8[ft+6]=pe,this.uint8[ft+7]=Re,A}}yr.prototype.bytesPerElement=8,Fi("StructArrayLayout2i4ub8",yr);class Cr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F){let W=this.length;return this.resize(W+1),this.emplace(W,A,F)}emplace(A,F,W){let te=2*A;return this.float32[te+0]=F,this.float32[te+1]=W,A}}Cr.prototype.bytesPerElement=8,Fi("StructArrayLayout2f8",Cr);class ve extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe,Re,Ke,ft,Rt){let er=this.length;return this.resize(er+1),this.emplace(er,A,F,W,te,fe,pe,Re,Ke,ft,Rt)}emplace(A,F,W,te,fe,pe,Re,Ke,ft,Rt,er){let ur=10*A;return this.uint16[ur+0]=F,this.uint16[ur+1]=W,this.uint16[ur+2]=te,this.uint16[ur+3]=fe,this.uint16[ur+4]=pe,this.uint16[ur+5]=Re,this.uint16[ur+6]=Ke,this.uint16[ur+7]=ft,this.uint16[ur+8]=Rt,this.uint16[ur+9]=er,A}}ve.prototype.bytesPerElement=20,Fi("StructArrayLayout10ui20",ve);class xe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe,Re,Ke,ft,Rt,er,ur){let vr=this.length;return this.resize(vr+1),this.emplace(vr,A,F,W,te,fe,pe,Re,Ke,ft,Rt,er,ur)}emplace(A,F,W,te,fe,pe,Re,Ke,ft,Rt,er,ur,vr){let kr=12*A;return this.int16[kr+0]=F,this.int16[kr+1]=W,this.int16[kr+2]=te,this.int16[kr+3]=fe,this.uint16[kr+4]=pe,this.uint16[kr+5]=Re,this.uint16[kr+6]=Ke,this.uint16[kr+7]=ft,this.int16[kr+8]=Rt,this.int16[kr+9]=er,this.int16[kr+10]=ur,this.int16[kr+11]=vr,A}}xe.prototype.bytesPerElement=24,Fi("StructArrayLayout4i4ui4i24",xe);class Ie extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,A,F,W)}emplace(A,F,W,te){let fe=3*A;return this.float32[fe+0]=F,this.float32[fe+1]=W,this.float32[fe+2]=te,A}}Ie.prototype.bytesPerElement=12,Fi("StructArrayLayout3f12",Ie);class ze extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(A){let F=this.length;return this.resize(F+1),this.emplace(F,A)}emplace(A,F){return this.uint32[1*A+0]=F,A}}ze.prototype.bytesPerElement=4,Fi("StructArrayLayout1ul4",ze);class Qe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe,Re,Ke,ft){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,A,F,W,te,fe,pe,Re,Ke,ft)}emplace(A,F,W,te,fe,pe,Re,Ke,ft,Rt){let er=10*A,ur=5*A;return this.int16[er+0]=F,this.int16[er+1]=W,this.int16[er+2]=te,this.int16[er+3]=fe,this.int16[er+4]=pe,this.int16[er+5]=Re,this.uint32[ur+3]=Ke,this.uint16[er+8]=ft,this.uint16[er+9]=Rt,A}}Qe.prototype.bytesPerElement=20,Fi("StructArrayLayout6i1ul2ui20",Qe);class Xe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe){let Re=this.length;return this.resize(Re+1),this.emplace(Re,A,F,W,te,fe,pe)}emplace(A,F,W,te,fe,pe,Re){let Ke=6*A;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.int16[Ke+2]=te,this.int16[Ke+3]=fe,this.int16[Ke+4]=pe,this.int16[Ke+5]=Re,A}}Xe.prototype.bytesPerElement=12,Fi("StructArrayLayout2i2i2i12",Xe);class nt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe){let pe=this.length;return this.resize(pe+1),this.emplace(pe,A,F,W,te,fe)}emplace(A,F,W,te,fe,pe){let Re=4*A,Ke=8*A;return this.float32[Re+0]=F,this.float32[Re+1]=W,this.float32[Re+2]=te,this.int16[Ke+6]=fe,this.int16[Ke+7]=pe,A}}nt.prototype.bytesPerElement=16,Fi("StructArrayLayout2f1f2i16",nt);class qt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe){let Re=this.length;return this.resize(Re+1),this.emplace(Re,A,F,W,te,fe,pe)}emplace(A,F,W,te,fe,pe,Re){let Ke=16*A,ft=4*A,Rt=8*A;return this.uint8[Ke+0]=F,this.uint8[Ke+1]=W,this.float32[ft+1]=te,this.float32[ft+2]=fe,this.int16[Rt+6]=pe,this.int16[Rt+7]=Re,A}}qt.prototype.bytesPerElement=16,Fi("StructArrayLayout2ub2f2i16",qt);class Wt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,A,F,W)}emplace(A,F,W,te){let fe=3*A;return this.uint16[fe+0]=F,this.uint16[fe+1]=W,this.uint16[fe+2]=te,A}}Wt.prototype.bytesPerElement=6,Fi("StructArrayLayout3ui6",Wt);class nr extends le{_refreshViews(){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)}emplaceBack(A,F,W,te,fe,pe,Re,Ke,ft,Rt,er,ur,vr,kr,Dr,li,pi){let vn=this.length;return this.resize(vn+1),this.emplace(vn,A,F,W,te,fe,pe,Re,Ke,ft,Rt,er,ur,vr,kr,Dr,li,pi)}emplace(A,F,W,te,fe,pe,Re,Ke,ft,Rt,er,ur,vr,kr,Dr,li,pi,vn){let zi=24*A,ln=12*A,Tn=48*A;return this.int16[zi+0]=F,this.int16[zi+1]=W,this.uint16[zi+2]=te,this.uint16[zi+3]=fe,this.uint32[ln+2]=pe,this.uint32[ln+3]=Re,this.uint32[ln+4]=Ke,this.uint16[zi+10]=ft,this.uint16[zi+11]=Rt,this.uint16[zi+12]=er,this.float32[ln+7]=ur,this.float32[ln+8]=vr,this.uint8[Tn+36]=kr,this.uint8[Tn+37]=Dr,this.uint8[Tn+38]=li,this.uint32[ln+10]=pi,this.int16[zi+22]=vn,A}}nr.prototype.bytesPerElement=48,Fi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",nr);class fr extends le{_refreshViews(){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)}emplaceBack(A,F,W,te,fe,pe,Re,Ke,ft,Rt,er,ur,vr,kr,Dr,li,pi,vn,zi,ln,Tn,pa,ro,Vo,Xa,la,Mo,fo){let lo=this.length;return this.resize(lo+1),this.emplace(lo,A,F,W,te,fe,pe,Re,Ke,ft,Rt,er,ur,vr,kr,Dr,li,pi,vn,zi,ln,Tn,pa,ro,Vo,Xa,la,Mo,fo)}emplace(A,F,W,te,fe,pe,Re,Ke,ft,Rt,er,ur,vr,kr,Dr,li,pi,vn,zi,ln,Tn,pa,ro,Vo,Xa,la,Mo,fo,lo){let Wn=32*A,Ro=16*A;return this.int16[Wn+0]=F,this.int16[Wn+1]=W,this.int16[Wn+2]=te,this.int16[Wn+3]=fe,this.int16[Wn+4]=pe,this.int16[Wn+5]=Re,this.int16[Wn+6]=Ke,this.int16[Wn+7]=ft,this.uint16[Wn+8]=Rt,this.uint16[Wn+9]=er,this.uint16[Wn+10]=ur,this.uint16[Wn+11]=vr,this.uint16[Wn+12]=kr,this.uint16[Wn+13]=Dr,this.uint16[Wn+14]=li,this.uint16[Wn+15]=pi,this.uint16[Wn+16]=vn,this.uint16[Wn+17]=zi,this.uint16[Wn+18]=ln,this.uint16[Wn+19]=Tn,this.uint16[Wn+20]=pa,this.uint16[Wn+21]=ro,this.uint16[Wn+22]=Vo,this.uint32[Ro+12]=Xa,this.float32[Ro+13]=la,this.float32[Ro+14]=Mo,this.uint16[Wn+30]=fo,this.uint16[Wn+31]=lo,A}}fr.prototype.bytesPerElement=64,Fi("StructArrayLayout8i15ui1ul2f2ui64",fr);class br extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A){let F=this.length;return this.resize(F+1),this.emplace(F,A)}emplace(A,F){return this.float32[1*A+0]=F,A}}br.prototype.bytesPerElement=4,Fi("StructArrayLayout1f4",br);class Fr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,A,F,W)}emplace(A,F,W,te){let fe=3*A;return this.uint16[6*A+0]=F,this.float32[fe+1]=W,this.float32[fe+2]=te,A}}Fr.prototype.bytesPerElement=12,Fi("StructArrayLayout1ui2f12",Fr);class Hr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,A,F,W)}emplace(A,F,W,te){let fe=4*A;return this.uint32[2*A+0]=F,this.uint16[fe+2]=W,this.uint16[fe+3]=te,A}}Hr.prototype.bytesPerElement=8,Fi("StructArrayLayout1ul2ui8",Hr);class ri extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F){let W=this.length;return this.resize(W+1),this.emplace(W,A,F)}emplace(A,F,W){let te=2*A;return this.uint16[te+0]=F,this.uint16[te+1]=W,A}}ri.prototype.bytesPerElement=4,Fi("StructArrayLayout2ui4",ri);class Ci extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A){let F=this.length;return this.resize(F+1),this.emplace(F,A)}emplace(A,F){return this.uint16[1*A+0]=F,A}}Ci.prototype.bytesPerElement=2,Fi("StructArrayLayout1ui2",Ci);class cn extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F,W,te){let fe=this.length;return this.resize(fe+1),this.emplace(fe,A,F,W,te)}emplace(A,F,W,te,fe){let pe=4*A;return this.float32[pe+0]=F,this.float32[pe+1]=W,this.float32[pe+2]=te,this.float32[pe+3]=fe,A}}cn.prototype.bytesPerElement=16,Fi("StructArrayLayout4f16",cn);class sn extends ee{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new u(this.anchorPointX,this.anchorPointY)}}sn.prototype.size=20;class Ln extends Qe{get(A){return new sn(this,A)}}Fi("CollisionBoxArray",Ln);class Yn extends ee{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(A){this._structArray.uint8[this._pos1+37]=A}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(A){this._structArray.uint8[this._pos1+38]=A}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(A){this._structArray.uint32[this._pos4+10]=A}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Yn.prototype.size=48;class Aa extends nr{get(A){return new Yn(this,A)}}Fi("PlacedSymbolArray",Aa);class fa extends ee{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(A){this._structArray.uint32[this._pos4+12]=A}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}fa.prototype.size=64;class $a extends fr{get(A){return new fa(this,A)}}Fi("SymbolInstanceArray",$a);class Co extends br{getoffsetX(A){return this.float32[1*A+0]}}Fi("GlyphOffsetArray",Co);class Qa extends Mt{getx(A){return this.int16[3*A+0]}gety(A){return this.int16[3*A+1]}gettileUnitDistanceFromAnchor(A){return this.int16[3*A+2]}}Fi("SymbolLineVertexArray",Qa);class mo extends ee{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}mo.prototype.size=12;class Bo extends Fr{get(A){return new mo(this,A)}}Fi("TextAnchorOffsetArray",Bo);class Ps extends ee{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Ps.prototype.size=8;class Ts extends Hr{get(A){return new Ps(this,A)}}Fi("FeatureIndexArray",Ts);class wo extends ut{}class To extends ut{}class hl extends ut{}class Ul extends $t{}class Lu extends yr{}class au extends Cr{}class Js extends ve{}class eu extends xe{}class dc extends Ie{}class Tl extends ze{}class Al extends Xe{}class X extends qt{}class se extends Wt{}class Te extends ri{}let qe=Fe([{name:"a_pos",components:2,type:"Int16"}],4),{members:Ve}=qe;class Ye{constructor(A=[]){this.segments=A}prepareSegment(A,F,W,te){let fe=this.segments[this.segments.length-1];return A>Ye.MAX_VERTEX_ARRAY_LENGTH&&E(`Max vertices per segment is ${Ye.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${A}`),(!fe||fe.vertexLength+A>Ye.MAX_VERTEX_ARRAY_LENGTH||fe.sortKey!==te)&&(fe={vertexOffset:F.length,primitiveOffset:W.length,vertexLength:0,primitiveLength:0},te!==void 0&&(fe.sortKey=te),this.segments.push(fe)),fe}get(){return this.segments}destroy(){for(let A of this.segments)for(let F in A.vaos)A.vaos[F].destroy()}static simpleSegment(A,F,W,te){return new Ye([{vertexOffset:A,primitiveOffset:F,vertexLength:W,primitiveLength:te,vaos:{},sortKey:0}])}}function Pt(R,A){return 256*(R=M(Math.floor(R),0,255))+M(Math.floor(A),0,255)}Ye.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Fi("SegmentVector",Ye);let ot=Fe([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var Xt={exports:{}},dr={exports:{}};dr.exports=function(R,A){var F,W,te,fe,pe,Re,Ke,ft;for(W=R.length-(F=3&R.length),te=A,pe=3432918353,Re=461845907,ft=0;ft>>16)*pe&65535)<<16)&4294967295)<<15|Ke>>>17))*Re+(((Ke>>>16)*Re&65535)<<16)&4294967295)<<13|te>>>19))+((5*(te>>>16)&65535)<<16)&4294967295))+((58964+(fe>>>16)&65535)<<16);switch(Ke=0,F){case 3:Ke^=(255&R.charCodeAt(ft+2))<<16;case 2:Ke^=(255&R.charCodeAt(ft+1))<<8;case 1:te^=Ke=(65535&(Ke=(Ke=(65535&(Ke^=255&R.charCodeAt(ft)))*pe+(((Ke>>>16)*pe&65535)<<16)&4294967295)<<15|Ke>>>17))*Re+(((Ke>>>16)*Re&65535)<<16)&4294967295}return te^=R.length,te=2246822507*(65535&(te^=te>>>16))+((2246822507*(te>>>16)&65535)<<16)&4294967295,te=3266489909*(65535&(te^=te>>>13))+((3266489909*(te>>>16)&65535)<<16)&4294967295,(te^=te>>>16)>>>0};var pr=dr.exports,Ur={exports:{}};Ur.exports=function(R,A){for(var F,W=R.length,te=A^W,fe=0;W>=4;)F=1540483477*(65535&(F=255&R.charCodeAt(fe)|(255&R.charCodeAt(++fe))<<8|(255&R.charCodeAt(++fe))<<16|(255&R.charCodeAt(++fe))<<24))+((1540483477*(F>>>16)&65535)<<16),te=1540483477*(65535&te)+((1540483477*(te>>>16)&65535)<<16)^(F=1540483477*(65535&(F^=F>>>24))+((1540483477*(F>>>16)&65535)<<16)),W-=4,++fe;switch(W){case 3:te^=(255&R.charCodeAt(fe+2))<<16;case 2:te^=(255&R.charCodeAt(fe+1))<<8;case 1:te=1540483477*(65535&(te^=255&R.charCodeAt(fe)))+((1540483477*(te>>>16)&65535)<<16)}return te=1540483477*(65535&(te^=te>>>13))+((1540483477*(te>>>16)&65535)<<16),(te^=te>>>15)>>>0};var zr=pr,gi=Ur.exports;Xt.exports=zr,Xt.exports.murmur3=zr,Xt.exports.murmur2=gi;var xi=o(Xt.exports);class Wr{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(A,F,W,te){this.ids.push(ii(A)),this.positions.push(F,W,te)}getPositions(A){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let F=ii(A),W=0,te=this.ids.length-1;for(;W>1;this.ids[pe]>=F?te=pe:W=pe+1}let fe=[];for(;this.ids[W]===F;)fe.push({index:this.positions[3*W],start:this.positions[3*W+1],end:this.positions[3*W+2]}),W++;return fe}static serialize(A,F){let W=new Float64Array(A.ids),te=new Uint32Array(A.positions);return di(W,te,0,W.length-1),F&&F.push(W.buffer,te.buffer),{ids:W,positions:te}}static deserialize(A){let F=new Wr;return F.ids=A.ids,F.positions=A.positions,F.indexed=!0,F}}function ii(R){let A=+R;return!isNaN(A)&&A<=Number.MAX_SAFE_INTEGER?A:xi(String(R))}function di(R,A,F,W){for(;F>1],fe=F-1,pe=W+1;for(;;){do fe++;while(R[fe]te);if(fe>=pe)break;Li(R,fe,pe),Li(A,3*fe,3*pe),Li(A,3*fe+1,3*pe+1),Li(A,3*fe+2,3*pe+2)}pe-F`u_${te}`),this.type=W}setUniform(A,F,W){A.set(W.constantOr(this.value))}getBinding(A,F,W){return this.type==="color"?new kn(A,F):new Qr(A,F)}}class Ia{constructor(A,F){this.uniformNames=F.map(W=>`u_${W}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(A,F){this.pixelRatioFrom=F.pixelRatio,this.pixelRatioTo=A.pixelRatio,this.patternFrom=F.tlbr,this.patternTo=A.tlbr}setUniform(A,F,W,te){let fe=te==="u_pattern_to"?this.patternTo:te==="u_pattern_from"?this.patternFrom:te==="u_pixel_ratio_to"?this.pixelRatioTo:te==="u_pixel_ratio_from"?this.pixelRatioFrom:null;fe&&A.set(fe)}getBinding(A,F,W){return W.substr(0,9)==="u_pattern"?new Pn(A,F):new Qr(A,F)}}class yo{constructor(A,F,W,te){this.expression=A,this.type=W,this.maxValue=0,this.paintVertexAttributes=F.map(fe=>({name:`a_${fe}`,type:"Float32",components:W==="color"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(A,F,W,te,fe){let pe=this.paintVertexArray.length,Re=this.expression.evaluate(new rs(0),F,{},te,[],fe);this.paintVertexArray.resize(A),this._setPaintValue(pe,A,Re)}updatePaintArray(A,F,W,te){let fe=this.expression.evaluate({zoom:0},W,te);this._setPaintValue(A,F,fe)}_setPaintValue(A,F,W){if(this.type==="color"){let te=na(W);for(let fe=A;fe`u_${Re}_t`),this.type=W,this.useIntegerZoom=te,this.zoom=fe,this.maxValue=0,this.paintVertexAttributes=F.map(Re=>({name:`a_${Re}`,type:"Float32",components:W==="color"?4:2,offset:0})),this.paintVertexArray=new pe}populatePaintArray(A,F,W,te,fe){let pe=this.expression.evaluate(new rs(this.zoom),F,{},te,[],fe),Re=this.expression.evaluate(new rs(this.zoom+1),F,{},te,[],fe),Ke=this.paintVertexArray.length;this.paintVertexArray.resize(A),this._setPaintValue(Ke,A,pe,Re)}updatePaintArray(A,F,W,te){let fe=this.expression.evaluate({zoom:this.zoom},W,te),pe=this.expression.evaluate({zoom:this.zoom+1},W,te);this._setPaintValue(A,F,fe,pe)}_setPaintValue(A,F,W,te){if(this.type==="color"){let fe=na(W),pe=na(te);for(let Re=A;Re`#define HAS_UNIFORM_${te}`))}return A}getBinderAttributes(){let A=[];for(let F in this.binders){let W=this.binders[F];if(W instanceof yo||W instanceof Da)for(let te=0;te!0){this.programConfigurations={};for(let te of A)this.programConfigurations[te.id]=new Is(te,F,W);this.needsUpload=!1,this._featureMap=new Wr,this._bufferOffset=0}populatePaintArrays(A,F,W,te,fe,pe){for(let Re in this.programConfigurations)this.programConfigurations[Re].populatePaintArrays(A,F,te,fe,pe);F.id!==void 0&&this._featureMap.add(F.id,W,this._bufferOffset,A),this._bufferOffset=A,this.needsUpload=!0}updatePaintArrays(A,F,W,te){for(let fe of W)this.needsUpload=this.programConfigurations[fe.id].updatePaintArrays(A,this._featureMap,F,fe,te)||this.needsUpload}get(A){return this.programConfigurations[A]}upload(A){if(this.needsUpload){for(let F in this.programConfigurations)this.programConfigurations[F].upload(A);this.needsUpload=!1}}destroy(){for(let A in this.programConfigurations)this.programConfigurations[A].destroy()}}function Xs(R,A){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[R]||[R.replace(`${A}-`,"").replace(/-/g,"_")]}function Un(R,A,F){let W={color:{source:Cr,composite:cn},number:{source:br,composite:Cr}},te=function(fe){return{"line-pattern":{source:Js,composite:Js},"fill-pattern":{source:Js,composite:Js},"fill-extrusion-pattern":{source:Js,composite:Js}}[fe]}(R);return te&&te[F]||W[A][F]}Fi("ConstantBinder",Ea),Fi("CrossFadedConstantBinder",Ia),Fi("SourceExpressionBinder",yo),Fi("CrossFadedCompositeBinder",go),Fi("CompositeExpressionBinder",Da),Fi("ProgramConfiguration",Is,{omit:["_buffers"]}),Fi("ProgramConfigurationSet",Ms);let ja=8192,Fo=Math.pow(2,14)-1,Uo=-Fo-1;function $s(R){let A=ja/R.extent,F=R.loadGeometry();for(let W=0;Wpe.x+1||Kepe.y+1)&&E("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return F}function Sl(R,A){return{type:R.type,id:R.id,properties:R.properties,geometry:A?$s(R):[]}}function bu(R,A,F,W,te){R.emplaceBack(2*A+(W+1)/2,2*F+(te+1)/2)}class dl{constructor(A){this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(F=>F.id),this.index=A.index,this.hasPattern=!1,this.layoutVertexArray=new To,this.indexArray=new se,this.segments=new Ye,this.programConfigurations=new Ms(A.layers,A.zoom),this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(A,F,W){let te=this.layers[0],fe=[],pe=null,Re=!1;te.type==="circle"&&(pe=te.layout.get("circle-sort-key"),Re=!pe.isConstant());for(let{feature:Ke,id:ft,index:Rt,sourceLayerIndex:er}of A){let ur=this.layers[0]._featureFilter.needGeometry,vr=Sl(Ke,ur);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),vr,W))continue;let kr=Re?pe.evaluate(vr,{},W):void 0,Dr={id:ft,properties:Ke.properties,type:Ke.type,sourceLayerIndex:er,index:Rt,geometry:ur?vr.geometry:$s(Ke),patterns:{},sortKey:kr};fe.push(Dr)}Re&&fe.sort((Ke,ft)=>Ke.sortKey-ft.sortKey);for(let Ke of fe){let{geometry:ft,index:Rt,sourceLayerIndex:er}=Ke,ur=A[Rt].feature;this.addFeature(Ke,ft,Rt,W),F.featureIndex.insert(ur,ft,Rt,er,this.index)}}update(A,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,F,this.stateDependentLayers,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,Ve),this.indexBuffer=A.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(A),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(A,F,W,te){for(let fe of F)for(let pe of fe){let Re=pe.x,Ke=pe.y;if(Re<0||Re>=ja||Ke<0||Ke>=ja)continue;let ft=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,A.sortKey),Rt=ft.vertexLength;bu(this.layoutVertexArray,Re,Ke,-1,-1),bu(this.layoutVertexArray,Re,Ke,1,-1),bu(this.layoutVertexArray,Re,Ke,1,1),bu(this.layoutVertexArray,Re,Ke,-1,1),this.indexArray.emplaceBack(Rt,Rt+1,Rt+2),this.indexArray.emplaceBack(Rt,Rt+3,Rt+2),ft.vertexLength+=4,ft.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,A,W,{},te)}}function Sc(R,A){for(let F=0;F1){if(Lr(R,A))return!0;for(let W=0;W1?F:F.sub(A)._mult(te)._add(A))}function vi(R,A){let F,W,te,fe=!1;for(let pe=0;peA.y!=te.y>A.y&&A.x<(te.x-W.x)*(A.y-W.y)/(te.y-W.y)+W.x&&(fe=!fe)}return fe}function Ni(R,A){let F=!1;for(let W=0,te=R.length-1;WA.y!=pe.y>A.y&&A.x<(pe.x-fe.x)*(A.y-fe.y)/(pe.y-fe.y)+fe.x&&(F=!F)}return F}function qi(R,A,F){let W=F[0],te=F[2];if(R.xte.x&&A.x>te.x||R.yte.y&&A.y>te.y)return!1;let fe=z(R,A,F[0]);return fe!==z(R,A,F[1])||fe!==z(R,A,F[2])||fe!==z(R,A,F[3])}function Si(R,A,F){let W=A.paint.get(R).value;return W.kind==="constant"?W.value:F.programConfigurations.get(A.id).getMaxValue(R)}function Vn(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function Qi(R,A,F,W,te){if(!A[0]&&!A[1])return R;let fe=u.convert(A)._mult(te);F==="viewport"&&fe._rotate(-W);let pe=[];for(let Re=0;Resi(li,Dr))}(ft,Ke),vr=er?Rt*Re:Rt;for(let kr of te)for(let Dr of kr){let li=er?Dr:si(Dr,Ke),pi=vr,vn=qn([],[Dr.x,Dr.y,0,1],Ke);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?pi*=vn[3]/pe.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(pi*=pe.cameraToCenterDistance/vn[3]),Me(ur,li,pi))return!0}return!1}}function si(R,A){let F=qn([],[R.x,R.y,0,1],A);return new u(F[0]/F[3],F[1]/F[3])}class mn extends dl{}let Ji;Fi("HeatmapBucket",mn,{omit:["layers"]});var Ui={get paint(){return Ji=Ji||new ue({"heatmap-radius":new oo(ce.paint_heatmap["heatmap-radius"]),"heatmap-weight":new oo(ce.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Va(ce.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Ku(ce.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Va(ce.paint_heatmap["heatmap-opacity"])})}};function Bi(R,{width:A,height:F},W,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==A*F*W)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${A*F*W}`)}else te=new Uint8Array(A*F*W);return R.width=A,R.height=F,R.data=te,R}function pn(R,{width:A,height:F},W){if(A===R.width&&F===R.height)return;let te=Bi({},{width:A,height:F},W);Nn(R,te,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,A),height:Math.min(R.height,F)},W),R.width=A,R.height=F,R.data=te.data}function Nn(R,A,F,W,te,fe){if(te.width===0||te.height===0)return A;if(te.width>R.width||te.height>R.height||F.x>R.width-te.width||F.y>R.height-te.height)throw new RangeError("out of range source coordinates for image copy");if(te.width>A.width||te.height>A.height||W.x>A.width-te.width||W.y>A.height-te.height)throw new RangeError("out of range destination coordinates for image copy");let pe=R.data,Re=A.data;if(pe===Re)throw new Error("srcData equals dstData, so image is already copied");for(let Ke=0;Ke{A[R.evaluationKey]=Ke;let ft=R.expression.evaluate(A);te.data[pe+Re+0]=Math.floor(255*ft.r/ft.a),te.data[pe+Re+1]=Math.floor(255*ft.g/ft.a),te.data[pe+Re+2]=Math.floor(255*ft.b/ft.a),te.data[pe+Re+3]=Math.floor(255*ft.a)};if(R.clips)for(let pe=0,Re=0;pe80*F){Re=1/0,Ke=1/0;let Rt=-1/0,er=-1/0;for(let ur=F;urRt&&(Rt=vr),kr>er&&(er=kr)}ft=Math.max(Rt-Re,er-Ke),ft=ft!==0?32767/ft:0}return Vl(fe,pe,F,Re,Ke,ft,0),pe}function Qs(R,A,F,W,te){let fe;if(te===function(pe,Re,Ke,ft){let Rt=0;for(let er=Re,ur=Ke-ft;er0)for(let pe=A;pe=A;pe-=W)fe=Nt(pe/W|0,R[pe],R[pe+1],fe);return fe&&ne(fe,fe.next)&&(Ne(fe),fe=fe.next),fe}function al(R,A){if(!R)return R;A||(A=R);let F,W=R;do if(F=!1,W.steiner||!ne(W,W.next)&&de(W.prev,W,W.next)!==0)W=W.next;else{if(Ne(W),W=A=W.prev,W===W.next)break;F=!0}while(F||W!==A);return A}function Vl(R,A,F,W,te,fe,pe){if(!R)return;!pe&&fe&&function(Ke,ft,Rt,er){let ur=Ke;do ur.z===0&&(ur.z=D(ur.x,ur.y,ft,Rt,er)),ur.prevZ=ur.prev,ur.nextZ=ur.next,ur=ur.next;while(ur!==Ke);ur.prevZ.nextZ=null,ur.prevZ=null,function(vr){let kr,Dr=1;do{let li,pi=vr;vr=null;let vn=null;for(kr=0;pi;){kr++;let zi=pi,ln=0;for(let pa=0;pa0||Tn>0&&zi;)ln!==0&&(Tn===0||!zi||pi.z<=zi.z)?(li=pi,pi=pi.nextZ,ln--):(li=zi,zi=zi.nextZ,Tn--),vn?vn.nextZ=li:vr=li,li.prevZ=vn,vn=li;pi=zi}vn.nextZ=null,Dr*=2}while(kr>1)}(ur)}(R,W,te,fe);let Re=R;for(;R.prev!==R.next;){let Ke=R.prev,ft=R.next;if(fe?Vs(R,W,te,fe):ss(R))A.push(Ke.i,R.i,ft.i),Ne(R),R=ft.next,Re=ft.next;else if((R=ft)===Re){pe?pe===1?Vl(R=Ys(al(R),A),A,F,W,te,fe,2):pe===2&&wa(R,A,F,W,te,fe):Vl(al(R),A,F,W,te,fe,1);break}}}function ss(R){let A=R.prev,F=R,W=R.next;if(de(A,F,W)>=0)return!1;let te=A.x,fe=F.x,pe=W.x,Re=A.y,Ke=F.y,ft=W.y,Rt=tefe?te>pe?te:pe:fe>pe?fe:pe,vr=Re>Ke?Re>ft?Re:ft:Ke>ft?Ke:ft,kr=W.next;for(;kr!==A;){if(kr.x>=Rt&&kr.x<=ur&&kr.y>=er&&kr.y<=vr&&O(te,Re,fe,Ke,pe,ft,kr.x,kr.y)&&de(kr.prev,kr,kr.next)>=0)return!1;kr=kr.next}return!0}function Vs(R,A,F,W){let te=R.prev,fe=R,pe=R.next;if(de(te,fe,pe)>=0)return!1;let Re=te.x,Ke=fe.x,ft=pe.x,Rt=te.y,er=fe.y,ur=pe.y,vr=ReKe?Re>ft?Re:ft:Ke>ft?Ke:ft,li=Rt>er?Rt>ur?Rt:ur:er>ur?er:ur,pi=D(vr,kr,A,F,W),vn=D(Dr,li,A,F,W),zi=R.prevZ,ln=R.nextZ;for(;zi&&zi.z>=pi&&ln&&ln.z<=vn;){if(zi.x>=vr&&zi.x<=Dr&&zi.y>=kr&&zi.y<=li&&zi!==te&&zi!==pe&&O(Re,Rt,Ke,er,ft,ur,zi.x,zi.y)&&de(zi.prev,zi,zi.next)>=0||(zi=zi.prevZ,ln.x>=vr&&ln.x<=Dr&&ln.y>=kr&&ln.y<=li&&ln!==te&&ln!==pe&&O(Re,Rt,Ke,er,ft,ur,ln.x,ln.y)&&de(ln.prev,ln,ln.next)>=0))return!1;ln=ln.nextZ}for(;zi&&zi.z>=pi;){if(zi.x>=vr&&zi.x<=Dr&&zi.y>=kr&&zi.y<=li&&zi!==te&&zi!==pe&&O(Re,Rt,Ke,er,ft,ur,zi.x,zi.y)&&de(zi.prev,zi,zi.next)>=0)return!1;zi=zi.prevZ}for(;ln&&ln.z<=vn;){if(ln.x>=vr&&ln.x<=Dr&&ln.y>=kr&&ln.y<=li&&ln!==te&&ln!==pe&&O(Re,Rt,Ke,er,ft,ur,ln.x,ln.y)&&de(ln.prev,ln,ln.next)>=0)return!1;ln=ln.nextZ}return!0}function Ys(R,A){let F=R;do{let W=F.prev,te=F.next.next;!ne(W,te)&&we(W,F,F.next,te)&&Yt(W,te)&&Yt(te,W)&&(A.push(W.i,F.i,te.i),Ne(F),Ne(F.next),F=R=te),F=F.next}while(F!==R);return al(F)}function wa(R,A,F,W,te,fe){let pe=R;do{let Re=pe.next.next;for(;Re!==pe.prev;){if(pe.i!==Re.i&&K(pe,Re)){let Ke=cr(pe,Re);return pe=al(pe,pe.next),Ke=al(Ke,Ke.next),Vl(pe,A,F,W,te,fe,0),void Vl(Ke,A,F,W,te,fe,0)}Re=Re.next}pe=pe.next}while(pe!==R)}function ol(R,A){return R.x-A.x}function io(R,A){let F=function(te,fe){let pe=fe,Re=te.x,Ke=te.y,ft,Rt=-1/0;do{if(Ke<=pe.y&&Ke>=pe.next.y&&pe.next.y!==pe.y){let Dr=pe.x+(Ke-pe.y)*(pe.next.x-pe.x)/(pe.next.y-pe.y);if(Dr<=Re&&Dr>Rt&&(Rt=Dr,ft=pe.x=pe.x&&pe.x>=ur&&Re!==pe.x&&O(Keft.x||pe.x===ft.x&&Y(ft,pe)))&&(ft=pe,kr=Dr)}pe=pe.next}while(pe!==er);return ft}(R,A);if(!F)return A;let W=cr(F,R);return al(W,W.next),al(F,F.next)}function Y(R,A){return de(R.prev,R,A.prev)<0&&de(A.next,R,R.next)<0}function D(R,A,F,W,te){return(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-F)*te|0)|R<<8))|R<<4))|R<<2))|R<<1))|(A=1431655765&((A=858993459&((A=252645135&((A=16711935&((A=(A-W)*te|0)|A<<8))|A<<4))|A<<2))|A<<1))<<1}function J(R){let A=R,F=R;do(A.x=(R-pe)*(fe-Re)&&(R-pe)*(W-Re)>=(F-pe)*(A-Re)&&(F-pe)*(fe-Re)>=(te-pe)*(W-Re)}function K(R,A){return R.next.i!==A.i&&R.prev.i!==A.i&&!function(F,W){let te=F;do{if(te.i!==F.i&&te.next.i!==F.i&&te.i!==W.i&&te.next.i!==W.i&&we(te,te.next,F,W))return!0;te=te.next}while(te!==F);return!1}(R,A)&&(Yt(R,A)&&Yt(A,R)&&function(F,W){let te=F,fe=!1,pe=(F.x+W.x)/2,Re=(F.y+W.y)/2;do te.y>Re!=te.next.y>Re&&te.next.y!==te.y&&pe<(te.next.x-te.x)*(Re-te.y)/(te.next.y-te.y)+te.x&&(fe=!fe),te=te.next;while(te!==F);return fe}(R,A)&&(de(R.prev,R,A.prev)||de(R,A.prev,A))||ne(R,A)&&de(R.prev,R,R.next)>0&&de(A.prev,A,A.next)>0)}function de(R,A,F){return(A.y-R.y)*(F.x-A.x)-(A.x-R.x)*(F.y-A.y)}function ne(R,A){return R.x===A.x&&R.y===A.y}function we(R,A,F,W){let te=ht(de(R,A,F)),fe=ht(de(R,A,W)),pe=ht(de(F,W,R)),Re=ht(de(F,W,A));return te!==fe&&pe!==Re||!(te!==0||!Oe(R,F,A))||!(fe!==0||!Oe(R,W,A))||!(pe!==0||!Oe(F,R,W))||!(Re!==0||!Oe(F,A,W))}function Oe(R,A,F){return A.x<=Math.max(R.x,F.x)&&A.x>=Math.min(R.x,F.x)&&A.y<=Math.max(R.y,F.y)&&A.y>=Math.min(R.y,F.y)}function ht(R){return R>0?1:R<0?-1:0}function Yt(R,A){return de(R.prev,R,R.next)<0?de(R,A,R.next)>=0&&de(R,R.prev,A)>=0:de(R,A,R.prev)<0||de(R,R.next,A)<0}function cr(R,A){let F=$e(R.i,R.x,R.y),W=$e(A.i,A.x,A.y),te=R.next,fe=A.prev;return R.next=A,A.prev=R,F.next=te,te.prev=F,W.next=F,F.prev=W,fe.next=W,W.prev=fe,W}function Nt(R,A,F,W){let te=$e(R,A,F);return W?(te.next=W.next,te.prev=W,W.next.prev=te,W.next=te):(te.prev=te,te.next=te),te}function Ne(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function $e(R,A,F){return{i:R,x:A,y:F,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function st(R,A,F){let W=F.patternDependencies,te=!1;for(let fe of A){let pe=fe.paint.get(`${R}-pattern`);pe.isConstant()||(te=!0);let Re=pe.constantOr(null);Re&&(te=!0,W[Re.to]=!0,W[Re.from]=!0)}return te}function It(R,A,F,W,te){let fe=te.patternDependencies;for(let pe of A){let Re=pe.paint.get(`${R}-pattern`).value;if(Re.kind!=="constant"){let Ke=Re.evaluate({zoom:W-1},F,{},te.availableImages),ft=Re.evaluate({zoom:W},F,{},te.availableImages),Rt=Re.evaluate({zoom:W+1},F,{},te.availableImages);Ke=Ke&&Ke.name?Ke.name:Ke,ft=ft&&ft.name?ft.name:ft,Rt=Rt&&Rt.name?Rt.name:Rt,fe[Ke]=!0,fe[ft]=!0,fe[Rt]=!0,F.patterns[pe.id]={min:Ke,mid:ft,max:Rt}}}return F}class Bt{constructor(A){this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(F=>F.id),this.index=A.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new hl,this.indexArray=new se,this.indexArray2=new Te,this.programConfigurations=new Ms(A.layers,A.zoom),this.segments=new Ye,this.segments2=new Ye,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(A,F,W){this.hasPattern=st("fill",this.layers,F);let te=this.layers[0].layout.get("fill-sort-key"),fe=!te.isConstant(),pe=[];for(let{feature:Re,id:Ke,index:ft,sourceLayerIndex:Rt}of A){let er=this.layers[0]._featureFilter.needGeometry,ur=Sl(Re,er);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),ur,W))continue;let vr=fe?te.evaluate(ur,{},W,F.availableImages):void 0,kr={id:Ke,properties:Re.properties,type:Re.type,sourceLayerIndex:Rt,index:ft,geometry:er?ur.geometry:$s(Re),patterns:{},sortKey:vr};pe.push(kr)}fe&&pe.sort((Re,Ke)=>Re.sortKey-Ke.sortKey);for(let Re of pe){let{geometry:Ke,index:ft,sourceLayerIndex:Rt}=Re;if(this.hasPattern){let er=It("fill",this.layers,Re,this.zoom,F);this.patternFeatures.push(er)}else this.addFeature(Re,Ke,ft,W,{});F.featureIndex.insert(A[ft].feature,Ke,ft,Rt,this.index)}}update(A,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,F,this.stateDependentLayers,W)}addFeatures(A,F,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,F,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,Ml),this.indexBuffer=A.createIndexBuffer(this.indexArray),this.indexBuffer2=A.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(A),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(A,F,W,te,fe){for(let pe of Cf(F,500)){let Re=0;for(let vr of pe)Re+=vr.length;let Ke=this.segments.prepareSegment(Re,this.layoutVertexArray,this.indexArray),ft=Ke.vertexLength,Rt=[],er=[];for(let vr of pe){if(vr.length===0)continue;vr!==pe[0]&&er.push(Rt.length/2);let kr=this.segments2.prepareSegment(vr.length,this.layoutVertexArray,this.indexArray2),Dr=kr.vertexLength;this.layoutVertexArray.emplaceBack(vr[0].x,vr[0].y),this.indexArray2.emplaceBack(Dr+vr.length-1,Dr),Rt.push(vr[0].x),Rt.push(vr[0].y);for(let li=1;li>3}if(te--,W===1||W===2)fe+=R.readSVarint(),pe+=R.readSVarint(),W===1&&(A&&Re.push(A),A=[]),A.push(new Br(fe,pe));else{if(W!==7)throw new Error("unknown command "+W);A&&A.push(A[0].clone())}}return A&&Re.push(A),Re},ci.prototype.bbox=function(){var R=this._pbf;R.pos=this._geometry;for(var A=R.readVarint()+R.pos,F=1,W=0,te=0,fe=0,pe=1/0,Re=-1/0,Ke=1/0,ft=-1/0;R.pos>3}if(W--,F===1||F===2)(te+=R.readSVarint())Re&&(Re=te),(fe+=R.readSVarint())ft&&(ft=fe);else if(F!==7)throw new Error("unknown command "+F)}return[pe,Ke,Re,ft]},ci.prototype.toGeoJSON=function(R,A,F){var W,te,fe=this.extent*Math.pow(2,F),pe=this.extent*R,Re=this.extent*A,Ke=this.loadGeometry(),ft=ci.types[this.type];function Rt(vr){for(var kr=0;kr>3;te=pe===1?W.readString():pe===2?W.readFloat():pe===3?W.readDouble():pe===4?W.readVarint64():pe===5?W.readVarint():pe===6?W.readSVarint():pe===7?W.readBoolean():null}return te}(F))}Oi.prototype.feature=function(R){if(R<0||R>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[R];var A=this._pbf.readVarint()+this._pbf.pos;return new tn(this._pbf,A,this.extent,this._keys,this._values)};var on=Ei;function zn(R,A,F){if(R===3){var W=new on(F,F.readVarint()+F.pos);W.length&&(A[W.name]=W)}}_r.VectorTile=function(R,A){this.layers=R.readFields(zn,{},A)},_r.VectorTileFeature=Di,_r.VectorTileLayer=Ei;let Ja=_r.VectorTileFeature.types,co=Math.pow(2,13);function ts(R,A,F,W,te,fe,pe,Re){R.emplaceBack(A,F,2*Math.floor(W*co)+pe,te*co*2,fe*co*2,Math.round(Re))}class so{constructor(A){this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(F=>F.id),this.index=A.index,this.hasPattern=!1,this.layoutVertexArray=new Ul,this.centroidVertexArray=new wo,this.indexArray=new se,this.programConfigurations=new Ms(A.layers,A.zoom),this.segments=new Ye,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(A,F,W){this.features=[],this.hasPattern=st("fill-extrusion",this.layers,F);for(let{feature:te,id:fe,index:pe,sourceLayerIndex:Re}of A){let Ke=this.layers[0]._featureFilter.needGeometry,ft=Sl(te,Ke);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),ft,W))continue;let Rt={id:fe,sourceLayerIndex:Re,index:pe,geometry:Ke?ft.geometry:$s(te),properties:te.properties,type:te.type,patterns:{}};this.hasPattern?this.features.push(It("fill-extrusion",this.layers,Rt,this.zoom,F)):this.addFeature(Rt,Rt.geometry,pe,W,{}),F.featureIndex.insert(te,Rt.geometry,pe,Re,this.index,!0)}}addFeatures(A,F,W){for(let te of this.features){let{geometry:fe}=te;this.addFeature(te,fe,te.index,F,W)}}update(A,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,F,this.stateDependentLayers,W)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,lr),this.centroidVertexBuffer=A.createVertexBuffer(this.centroidVertexArray,vt.members,!0),this.indexBuffer=A.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(A),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(A,F,W,te,fe){for(let pe of Cf(F,500)){let Re={x:0,y:0,vertexCount:0},Ke=0;for(let kr of pe)Ke+=kr.length;let ft=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let kr of pe){if(kr.length===0||ms(kr))continue;let Dr=0;for(let li=0;li=1){let vn=kr[li-1];if(!Yo(pi,vn)){ft.vertexLength+4>Ye.MAX_VERTEX_ARRAY_LENGTH&&(ft=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let zi=pi.sub(vn)._perp()._unit(),ln=vn.dist(pi);Dr+ln>32768&&(Dr=0),ts(this.layoutVertexArray,pi.x,pi.y,zi.x,zi.y,0,0,Dr),ts(this.layoutVertexArray,pi.x,pi.y,zi.x,zi.y,0,1,Dr),Re.x+=2*pi.x,Re.y+=2*pi.y,Re.vertexCount+=2,Dr+=ln,ts(this.layoutVertexArray,vn.x,vn.y,zi.x,zi.y,0,0,Dr),ts(this.layoutVertexArray,vn.x,vn.y,zi.x,zi.y,0,1,Dr),Re.x+=2*vn.x,Re.y+=2*vn.y,Re.vertexCount+=2;let Tn=ft.vertexLength;this.indexArray.emplaceBack(Tn,Tn+2,Tn+1),this.indexArray.emplaceBack(Tn+1,Tn+2,Tn+3),ft.vertexLength+=4,ft.primitiveLength+=2}}}}if(ft.vertexLength+Ke>Ye.MAX_VERTEX_ARRAY_LENGTH&&(ft=this.segments.prepareSegment(Ke,this.layoutVertexArray,this.indexArray)),Ja[A.type]!=="Polygon")continue;let Rt=[],er=[],ur=ft.vertexLength;for(let kr of pe)if(kr.length!==0){kr!==pe[0]&&er.push(Rt.length/2);for(let Dr=0;Drja)||R.y===A.y&&(R.y<0||R.y>ja)}function ms(R){return R.every(A=>A.x<0)||R.every(A=>A.x>ja)||R.every(A=>A.y<0)||R.every(A=>A.y>ja)}let ou;Fi("FillExtrusionBucket",so,{omit:["layers","features"]});var Cv={get paint(){return ou=ou||new ue({"fill-extrusion-opacity":new Va(ce["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new oo(ce["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Va(ce["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Va(ce["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Vc(ce["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new oo(ce["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new oo(ce["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Va(ce["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Lv extends B{constructor(A){super(A,Cv)}createBucket(A){return new so(A)}queryRadius(){return Vn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(A,F,W,te,fe,pe,Re,Ke){let ft=Qi(A,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),pe.angle,Re),Rt=this.paint.get("fill-extrusion-height").evaluate(F,W),er=this.paint.get("fill-extrusion-base").evaluate(F,W),ur=function(kr,Dr,li,pi){let vn=[];for(let zi of kr){let ln=[zi.x,zi.y,0,1];qn(ln,ln,Dr),vn.push(new u(ln[0]/ln[3],ln[1]/ln[3]))}return vn}(ft,Ke),vr=function(kr,Dr,li,pi){let vn=[],zi=[],ln=pi[8]*Dr,Tn=pi[9]*Dr,pa=pi[10]*Dr,ro=pi[11]*Dr,Vo=pi[8]*li,Xa=pi[9]*li,la=pi[10]*li,Mo=pi[11]*li;for(let fo of kr){let lo=[],Wn=[];for(let Ro of fo){let uo=Ro.x,$o=Ro.y,Ju=pi[0]*uo+pi[4]*$o+pi[12],Ou=pi[1]*uo+pi[5]*$o+pi[13],kh=pi[2]*uo+pi[6]*$o+pi[14],Qv=pi[3]*uo+pi[7]*$o+pi[15],ud=kh+pa,Ch=Qv+ro,Gd=Ju+Vo,Hd=Ou+Xa,jd=kh+la,Af=Qv+Mo,Lh=new u((Ju+ln)/Ch,(Ou+Tn)/Ch);Lh.z=ud/Ch,lo.push(Lh);let Ed=new u(Gd/Af,Hd/Af);Ed.z=jd/Af,Wn.push(Ed)}vn.push(lo),zi.push(Wn)}return[vn,zi]}(te,er,Rt,Ke);return function(kr,Dr,li){let pi=1/0;bt(li,Dr)&&(pi=Kv(li,Dr[0]));for(let vn=0;vnF.id),this.index=A.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(F=>{this.gradients[F.id]={}}),this.layoutVertexArray=new Lu,this.layoutVertexArray2=new au,this.indexArray=new se,this.programConfigurations=new Ms(A.layers,A.zoom),this.segments=new Ye,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(A,F,W){this.hasPattern=st("line",this.layers,F);let te=this.layers[0].layout.get("line-sort-key"),fe=!te.isConstant(),pe=[];for(let{feature:Re,id:Ke,index:ft,sourceLayerIndex:Rt}of A){let er=this.layers[0]._featureFilter.needGeometry,ur=Sl(Re,er);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),ur,W))continue;let vr=fe?te.evaluate(ur,{},W):void 0,kr={id:Ke,properties:Re.properties,type:Re.type,sourceLayerIndex:Rt,index:ft,geometry:er?ur.geometry:$s(Re),patterns:{},sortKey:vr};pe.push(kr)}fe&&pe.sort((Re,Ke)=>Re.sortKey-Ke.sortKey);for(let Re of pe){let{geometry:Ke,index:ft,sourceLayerIndex:Rt}=Re;if(this.hasPattern){let er=It("line",this.layers,Re,this.zoom,F);this.patternFeatures.push(er)}else this.addFeature(Re,Ke,ft,W,{});F.featureIndex.insert(A[ft].feature,Ke,ft,Rt,this.index)}}update(A,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,F,this.stateDependentLayers,W)}addFeatures(A,F,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,F,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=A.createVertexBuffer(this.layoutVertexArray2,mp)),this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,gp),this.indexBuffer=A.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(A),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(A){if(A.properties&&Object.prototype.hasOwnProperty.call(A.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(A.properties,"mapbox_clip_end"))return{start:+A.properties.mapbox_clip_start,end:+A.properties.mapbox_clip_end}}addFeature(A,F,W,te,fe){let pe=this.layers[0].layout,Re=pe.get("line-join").evaluate(A,{}),Ke=pe.get("line-cap"),ft=pe.get("line-miter-limit"),Rt=pe.get("line-round-limit");this.lineClips=this.lineFeatureClips(A);for(let er of F)this.addLine(er,A,Re,Ke,ft,Rt);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,A,W,fe,te)}addLine(A,F,W,te,fe,pe){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let pi=0;pi=2&&A[Ke-1].equals(A[Ke-2]);)Ke--;let ft=0;for(;ft0;if(ro&&pi>ft){let Mo=ur.dist(vr);if(Mo>2*Rt){let fo=ur.sub(ur.sub(vr)._mult(Rt/Mo)._round());this.updateDistance(vr,fo),this.addCurrentVertex(fo,Dr,0,0,er),vr=fo}}let Xa=vr&&kr,la=Xa?W:Re?"butt":te;if(Xa&&la==="round"&&(Tnfe&&(la="bevel"),la==="bevel"&&(Tn>2&&(la="flipbevel"),Tn100)vn=li.mult(-1);else{let Mo=Tn*Dr.add(li).mag()/Dr.sub(li).mag();vn._perp()._mult(Mo*(Vo?-1:1))}this.addCurrentVertex(ur,vn,0,0,er),this.addCurrentVertex(ur,vn.mult(-1),0,0,er)}else if(la==="bevel"||la==="fakeround"){let Mo=-Math.sqrt(Tn*Tn-1),fo=Vo?Mo:0,lo=Vo?0:Mo;if(vr&&this.addCurrentVertex(ur,Dr,fo,lo,er),la==="fakeround"){let Wn=Math.round(180*pa/Math.PI/20);for(let Ro=1;Ro2*Rt){let fo=ur.add(kr.sub(ur)._mult(Rt/Mo)._round());this.updateDistance(ur,fo),this.addCurrentVertex(fo,li,0,0,er),ur=fo}}}}addCurrentVertex(A,F,W,te,fe,pe=!1){let Re=F.y*te-F.x,Ke=-F.y-F.x*te;this.addHalfVertex(A,F.x+F.y*W,F.y-F.x*W,pe,!1,W,fe),this.addHalfVertex(A,Re,Ke,pe,!0,-te,fe),this.distance>Pv/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(A,F,W,te,fe,pe))}addHalfVertex({x:A,y:F},W,te,fe,pe,Re,Ke){let ft=.5*(this.lineClips?this.scaledDistance*(Pv-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((A<<1)+(fe?1:0),(F<<1)+(pe?1:0),Math.round(63*W)+128,Math.round(63*te)+128,1+(Re===0?0:Re<0?-1:1)|(63&ft)<<2,ft>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Rt=Ke.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Rt),Ke.primitiveLength++),pe?this.e2=Rt:this.e1=Rt}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(A,F){this.distance+=A.dist(F),this.updateScaledDistance()}}let Iv,hy;Fi("LineBucket",Jv,{omit:["layers","patternFeatures"]});var dg={get paint(){return hy=hy||new ue({"line-opacity":new oo(ce.paint_line["line-opacity"]),"line-color":new oo(ce.paint_line["line-color"]),"line-translate":new Va(ce.paint_line["line-translate"]),"line-translate-anchor":new Va(ce.paint_line["line-translate-anchor"]),"line-width":new oo(ce.paint_line["line-width"]),"line-gap-width":new oo(ce.paint_line["line-gap-width"]),"line-offset":new oo(ce.paint_line["line-offset"]),"line-blur":new oo(ce.paint_line["line-blur"]),"line-dasharray":new hc(ce.paint_line["line-dasharray"]),"line-pattern":new Vc(ce.paint_line["line-pattern"]),"line-gradient":new Ku(ce.paint_line["line-gradient"])})},get layout(){return Iv=Iv||new ue({"line-cap":new Va(ce.layout_line["line-cap"]),"line-join":new oo(ce.layout_line["line-join"]),"line-miter-limit":new Va(ce.layout_line["line-miter-limit"]),"line-round-limit":new Va(ce.layout_line["line-round-limit"]),"line-sort-key":new oo(ce.layout_line["line-sort-key"])})}};class oh extends oo{possiblyEvaluate(A,F){return F=new rs(Math.floor(F.zoom),{now:F.now,fadeDuration:F.fadeDuration,zoomHistory:F.zoomHistory,transition:F.transition}),super.possiblyEvaluate(A,F)}evaluate(A,F,W,te){return F=L({},F,{zoom:Math.floor(F.zoom)}),super.evaluate(A,F,W,te)}}let vg;class dy extends B{constructor(A){super(A,dg),this.gradientVersion=0,vg||(vg=new oh(dg.paint.properties["line-width"].specification),vg.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(A){if(A==="line-gradient"){let F=this.gradientExpression();this.stepInterpolant=!!function(W){return W._styleExpression!==void 0}(F)&&F._styleExpression.expression instanceof _n,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(A,F){super.recalculate(A,F),this.paint._values["line-floorwidth"]=vg.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,A)}createBucket(A){return new Jv(A)}queryRadius(A){let F=A,W=Zh(Si("line-width",this,F),Si("line-gap-width",this,F)),te=Si("line-offset",this,F);return W/2+Math.abs(te)+Vn(this.paint.get("line-translate"))}queryIntersectsFeature(A,F,W,te,fe,pe,Re){let Ke=Qi(A,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),pe.angle,Re),ft=Re/2*Zh(this.paint.get("line-width").evaluate(F,W),this.paint.get("line-gap-width").evaluate(F,W)),Rt=this.paint.get("line-offset").evaluate(F,W);return Rt&&(te=function(er,ur){let vr=[];for(let kr=0;kr=3){for(let li=0;li0?A+2*R:R}let am=Fe([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),k1=Fe([{name:"a_projected_pos",components:3,type:"Float32"}],4);Fe([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let C1=Fe([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Fe([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let vy=Fe([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),om=Fe([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function sm(R,A,F){return R.sections.forEach(W=>{W.text=function(te,fe,pe){let Re=fe.layout.get("text-transform").evaluate(pe,{});return Re==="uppercase"?te=te.toLocaleUpperCase():Re==="lowercase"&&(te=te.toLocaleLowerCase()),ys.applyArabicShaping&&(te=ys.applyArabicShaping(te)),te}(W.text,A,F)}),R}Fe([{name:"triangle",components:3,type:"Uint16"}]),Fe([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Fe([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),Fe([{type:"Float32",name:"offsetX"}]),Fe([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Fe([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let vc={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};var tu=24,Sd=wu,py=function(R,A,F,W,te){var fe,pe,Re=8*te-W-1,Ke=(1<>1,Rt=-7,er=F?te-1:0,ur=F?-1:1,vr=R[A+er];for(er+=ur,fe=vr&(1<<-Rt)-1,vr>>=-Rt,Rt+=Re;Rt>0;fe=256*fe+R[A+er],er+=ur,Rt-=8);for(pe=fe&(1<<-Rt)-1,fe>>=-Rt,Rt+=W;Rt>0;pe=256*pe+R[A+er],er+=ur,Rt-=8);if(fe===0)fe=1-ft;else{if(fe===Ke)return pe?NaN:1/0*(vr?-1:1);pe+=Math.pow(2,W),fe-=ft}return(vr?-1:1)*pe*Math.pow(2,fe-W)},L1=function(R,A,F,W,te,fe){var pe,Re,Ke,ft=8*fe-te-1,Rt=(1<>1,ur=te===23?Math.pow(2,-24)-Math.pow(2,-77):0,vr=W?0:fe-1,kr=W?1:-1,Dr=A<0||A===0&&1/A<0?1:0;for(A=Math.abs(A),isNaN(A)||A===1/0?(Re=isNaN(A)?1:0,pe=Rt):(pe=Math.floor(Math.log(A)/Math.LN2),A*(Ke=Math.pow(2,-pe))<1&&(pe--,Ke*=2),(A+=pe+er>=1?ur/Ke:ur*Math.pow(2,1-er))*Ke>=2&&(pe++,Ke/=2),pe+er>=Rt?(Re=0,pe=Rt):pe+er>=1?(Re=(A*Ke-1)*Math.pow(2,te),pe+=er):(Re=A*Math.pow(2,er-1)*Math.pow(2,te),pe=0));te>=8;R[F+vr]=255&Re,vr+=kr,Re/=256,te-=8);for(pe=pe<0;R[F+vr]=255&pe,vr+=kr,pe/=256,ft-=8);R[F+vr-kr]|=128*Dr};function wu(R){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(R)?R:new Uint8Array(R||0),this.pos=0,this.type=0,this.length=this.buf.length}wu.Varint=0,wu.Fixed64=1,wu.Bytes=2,wu.Fixed32=5;var Kx=4294967296,lm=1/Kx,Bw=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");function Rv(R){return R.type===wu.Bytes?R.readVarint()+R.pos:R.pos+1}function um(R,A,F){return F?4294967296*A+(R>>>0):4294967296*(A>>>0)+(R>>>0)}function Nw(R,A,F){var W=A<=16383?1:A<=2097151?2:A<=268435455?3:Math.floor(Math.log(A)/(7*Math.LN2));F.realloc(W);for(var te=F.pos-1;te>=R;te--)F.buf[te+W]=F.buf[te]}function Jx(R,A){for(var F=0;F>>8,R[F+2]=A>>>16,R[F+3]=A>>>24}function MC(R,A){return(R[A]|R[A+1]<<8|R[A+2]<<16)+(R[A+3]<<24)}wu.prototype={destroy:function(){this.buf=null},readFields:function(R,A,F){for(F=F||this.length;this.pos>3,fe=this.pos;this.type=7&W,R(te,A,this),this.pos===fe&&this.skip(W)}return A},readMessage:function(R,A){return this.readFields(R,A,this.readVarint()+this.pos)},readFixed32:function(){var R=gy(this.buf,this.pos);return this.pos+=4,R},readSFixed32:function(){var R=MC(this.buf,this.pos);return this.pos+=4,R},readFixed64:function(){var R=gy(this.buf,this.pos)+gy(this.buf,this.pos+4)*Kx;return this.pos+=8,R},readSFixed64:function(){var R=gy(this.buf,this.pos)+MC(this.buf,this.pos+4)*Kx;return this.pos+=8,R},readFloat:function(){var R=py(this.buf,this.pos,!0,23,4);return this.pos+=4,R},readDouble:function(){var R=py(this.buf,this.pos,!0,52,8);return this.pos+=8,R},readVarint:function(R){var A,F,W=this.buf;return A=127&(F=W[this.pos++]),F<128?A:(A|=(127&(F=W[this.pos++]))<<7,F<128?A:(A|=(127&(F=W[this.pos++]))<<14,F<128?A:(A|=(127&(F=W[this.pos++]))<<21,F<128?A:function(te,fe,pe){var Re,Ke,ft=pe.buf;if(Re=(112&(Ke=ft[pe.pos++]))>>4,Ke<128||(Re|=(127&(Ke=ft[pe.pos++]))<<3,Ke<128)||(Re|=(127&(Ke=ft[pe.pos++]))<<10,Ke<128)||(Re|=(127&(Ke=ft[pe.pos++]))<<17,Ke<128)||(Re|=(127&(Ke=ft[pe.pos++]))<<24,Ke<128)||(Re|=(1&(Ke=ft[pe.pos++]))<<31,Ke<128))return um(te,Re,fe);throw new Error("Expected varint not more than 10 bytes")}(A|=(15&(F=W[this.pos]))<<28,R,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var R=this.readVarint();return R%2==1?(R+1)/-2:R/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var R=this.readVarint()+this.pos,A=this.pos;return this.pos=R,R-A>=12&&Bw?function(F,W,te){return Bw.decode(F.subarray(W,te))}(this.buf,A,R):function(F,W,te){for(var fe="",pe=W;pe239?4:Rt>223?3:Rt>191?2:1;if(pe+ur>te)break;ur===1?Rt<128&&(er=Rt):ur===2?(192&(Re=F[pe+1]))==128&&(er=(31&Rt)<<6|63&Re)<=127&&(er=null):ur===3?(Ke=F[pe+2],(192&(Re=F[pe+1]))==128&&(192&Ke)==128&&((er=(15&Rt)<<12|(63&Re)<<6|63&Ke)<=2047||er>=55296&&er<=57343)&&(er=null)):ur===4&&(Ke=F[pe+2],ft=F[pe+3],(192&(Re=F[pe+1]))==128&&(192&Ke)==128&&(192&ft)==128&&((er=(15&Rt)<<18|(63&Re)<<12|(63&Ke)<<6|63&ft)<=65535||er>=1114112)&&(er=null)),er===null?(er=65533,ur=1):er>65535&&(er-=65536,fe+=String.fromCharCode(er>>>10&1023|55296),er=56320|1023&er),fe+=String.fromCharCode(er),pe+=ur}return fe}(this.buf,A,R)},readBytes:function(){var R=this.readVarint()+this.pos,A=this.buf.subarray(this.pos,R);return this.pos=R,A},readPackedVarint:function(R,A){if(this.type!==wu.Bytes)return R.push(this.readVarint(A));var F=Rv(this);for(R=R||[];this.pos127;);else if(A===wu.Bytes)this.pos=this.readVarint()+this.pos;else if(A===wu.Fixed32)this.pos+=4;else{if(A!==wu.Fixed64)throw new Error("Unimplemented type: "+A);this.pos+=8}},writeTag:function(R,A){this.writeVarint(R<<3|A)},realloc:function(R){for(var A=this.length||16;A268435455||R<0?function(A,F){var W,te;if(A>=0?(W=A%4294967296|0,te=A/4294967296|0):(te=~(-A/4294967296),4294967295^(W=~(-A%4294967296))?W=W+1|0:(W=0,te=te+1|0)),A>=18446744073709552e3||A<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");F.realloc(10),function(fe,pe,Re){Re.buf[Re.pos++]=127&fe|128,fe>>>=7,Re.buf[Re.pos++]=127&fe|128,fe>>>=7,Re.buf[Re.pos++]=127&fe|128,fe>>>=7,Re.buf[Re.pos++]=127&fe|128,Re.buf[Re.pos]=127&(fe>>>=7)}(W,0,F),function(fe,pe){var Re=(7&fe)<<4;pe.buf[pe.pos++]|=Re|((fe>>>=3)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe)))))}(te,F)}(R,this):(this.realloc(4),this.buf[this.pos++]=127&R|(R>127?128:0),R<=127||(this.buf[this.pos++]=127&(R>>>=7)|(R>127?128:0),R<=127||(this.buf[this.pos++]=127&(R>>>=7)|(R>127?128:0),R<=127||(this.buf[this.pos++]=R>>>7&127))))},writeSVarint:function(R){this.writeVarint(R<0?2*-R-1:2*R)},writeBoolean:function(R){this.writeVarint(!!R)},writeString:function(R){R=String(R),this.realloc(4*R.length),this.pos++;var A=this.pos;this.pos=function(W,te,fe){for(var pe,Re,Ke=0;Ke55295&&pe<57344){if(!Re){pe>56319||Ke+1===te.length?(W[fe++]=239,W[fe++]=191,W[fe++]=189):Re=pe;continue}if(pe<56320){W[fe++]=239,W[fe++]=191,W[fe++]=189,Re=pe;continue}pe=Re-55296<<10|pe-56320|65536,Re=null}else Re&&(W[fe++]=239,W[fe++]=191,W[fe++]=189,Re=null);pe<128?W[fe++]=pe:(pe<2048?W[fe++]=pe>>6|192:(pe<65536?W[fe++]=pe>>12|224:(W[fe++]=pe>>18|240,W[fe++]=pe>>12&63|128),W[fe++]=pe>>6&63|128),W[fe++]=63&pe|128)}return fe}(this.buf,R,this.pos);var F=this.pos-A;F>=128&&Nw(A,F,this),this.pos=A-1,this.writeVarint(F),this.pos+=F},writeFloat:function(R){this.realloc(4),L1(this.buf,R,this.pos,!0,23,4),this.pos+=4},writeDouble:function(R){this.realloc(8),L1(this.buf,R,this.pos,!0,52,8),this.pos+=8},writeBytes:function(R){var A=R.length;this.writeVarint(A),this.realloc(A);for(var F=0;F=128&&Nw(F,W,this),this.pos=F-1,this.writeVarint(W),this.pos+=W},writeMessage:function(R,A,F){this.writeTag(R,wu.Bytes),this.writeRawMessage(A,F)},writePackedVarint:function(R,A){A.length&&this.writeMessage(R,Jx,A)},writePackedSVarint:function(R,A){A.length&&this.writeMessage(R,H9,A)},writePackedBoolean:function(R,A){A.length&&this.writeMessage(R,X9,A)},writePackedFloat:function(R,A){A.length&&this.writeMessage(R,j9,A)},writePackedDouble:function(R,A){A.length&&this.writeMessage(R,W9,A)},writePackedFixed32:function(R,A){A.length&&this.writeMessage(R,OQ,A)},writePackedSFixed32:function(R,A){A.length&&this.writeMessage(R,Z9,A)},writePackedFixed64:function(R,A){A.length&&this.writeMessage(R,Y9,A)},writePackedSFixed64:function(R,A){A.length&&this.writeMessage(R,K9,A)},writeBytesField:function(R,A){this.writeTag(R,wu.Bytes),this.writeBytes(A)},writeFixed32Field:function(R,A){this.writeTag(R,wu.Fixed32),this.writeFixed32(A)},writeSFixed32Field:function(R,A){this.writeTag(R,wu.Fixed32),this.writeSFixed32(A)},writeFixed64Field:function(R,A){this.writeTag(R,wu.Fixed64),this.writeFixed64(A)},writeSFixed64Field:function(R,A){this.writeTag(R,wu.Fixed64),this.writeSFixed64(A)},writeVarintField:function(R,A){this.writeTag(R,wu.Varint),this.writeVarint(A)},writeSVarintField:function(R,A){this.writeTag(R,wu.Varint),this.writeSVarint(A)},writeStringField:function(R,A){this.writeTag(R,wu.Bytes),this.writeString(A)},writeFloatField:function(R,A){this.writeTag(R,wu.Fixed32),this.writeFloat(A)},writeDoubleField:function(R,A){this.writeTag(R,wu.Fixed64),this.writeDouble(A)},writeBooleanField:function(R,A){this.writeVarintField(R,!!A)}};var uS=o(Sd);let cS=3;function BQ(R,A,F){R===1&&F.readMessage(J9,A)}function J9(R,A,F){if(R===3){let{id:W,bitmap:te,width:fe,height:pe,left:Re,top:Ke,advance:ft}=F.readMessage(EC,{});A.push({id:W,bitmap:new aa({width:fe+2*cS,height:pe+2*cS},te),metrics:{width:fe,height:pe,left:Re,top:Ke,advance:ft}})}}function EC(R,A,F){R===1?A.id=F.readVarint():R===2?A.bitmap=F.readBytes():R===3?A.width=F.readVarint():R===4?A.height=F.readVarint():R===5?A.left=F.readSVarint():R===6?A.top=F.readSVarint():R===7&&(A.advance=F.readVarint())}let kC=cS;function fS(R){let A=0,F=0;for(let pe of R)A+=pe.w*pe.h,F=Math.max(F,pe.w);R.sort((pe,Re)=>Re.h-pe.h);let W=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(A/.95)),F),h:1/0}],te=0,fe=0;for(let pe of R)for(let Re=W.length-1;Re>=0;Re--){let Ke=W[Re];if(!(pe.w>Ke.w||pe.h>Ke.h)){if(pe.x=Ke.x,pe.y=Ke.y,fe=Math.max(fe,pe.y+pe.h),te=Math.max(te,pe.x+pe.w),pe.w===Ke.w&&pe.h===Ke.h){let ft=W.pop();Re=0&&W>=A&&Gw[this.text.charCodeAt(W)];W--)F--;this.text=this.text.substring(A,F),this.sectionIndex=this.sectionIndex.slice(A,F)}substring(A,F){let W=new P1;return W.text=this.text.substring(A,F),W.sectionIndex=this.sectionIndex.slice(A,F),W.sections=this.sections,W}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((A,F)=>Math.max(A,this.sections[F].scale),0)}addTextSection(A,F){this.text+=A.text,this.sections.push(Qx.forText(A.scale,A.fontStack||F));let W=this.sections.length-1;for(let te=0;te=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function eb(R,A,F,W,te,fe,pe,Re,Ke,ft,Rt,er,ur,vr,kr){let Dr=P1.fromFeature(R,te),li;er===i.ah.vertical&&Dr.verticalizePunctuation();let{processBidirectionalText:pi,processStyledBidirectionalText:vn}=ys;if(pi&&Dr.sections.length===1){li=[];let Tn=pi(Dr.toString(),I1(Dr,ft,fe,A,W,vr));for(let pa of Tn){let ro=new P1;ro.text=pa,ro.sections=Dr.sections;for(let Vo=0;Vo0&&tp>Df&&(Df=tp)}else{let Gc=ro[ru.fontStack],Yf=Gc&&Gc[$u];if(Yf&&Yf.rect)O1=Yf.rect,hf=Yf.metrics;else{let tp=pa[ru.fontStack],yg=tp&&tp[$u];if(!yg)continue;hf=yg.metrics}zv=(Lh-ru.scale)*tu}ep?(Tn.verticalizable=!0,Yh.push({glyph:$u,imageName:p0,x:$o,y:Ju+zv,vertical:ep,scale:ru.scale,fontStack:ru.fontStack,sectionIndex:pc,metrics:hf,rect:O1}),$o+=Gp*ru.scale+Wn):(Yh.push({glyph:$u,imageName:p0,x:$o,y:Ju+zv,vertical:ep,scale:ru.scale,fontStack:ru.fontStack,sectionIndex:pc,metrics:hf,rect:O1}),$o+=hf.advance*ru.scale+Wn)}Yh.length!==0&&(Ou=Math.max($o-Wn,Ou),cm(Yh,0,Yh.length-1,Qv,Df)),$o=0;let Fv=la*Lh+Df;cd.lineOffset=Math.max(Df,Ed),Ju+=Fv,kh=Math.max(Fv,kh),++ud}var Ch;let Gd=Ju-Eh,{horizontalAlign:Hd,verticalAlign:jd}=jw(Mo);(function(Af,Lh,Ed,cd,Yh,Df,Fv,uv,ru){let pc=(Lh-Ed)*Yh,$u=0;$u=Df!==Fv?-uv*cd-Eh:(-cd*ru+.5)*Fv;for(let zv of Af)for(let hf of zv.positionedGlyphs)hf.x+=pc,hf.y+=$u})(Tn.positionedLines,Qv,Hd,jd,Ou,kh,la,Gd,Xa.length),Tn.top+=-jd*Gd,Tn.bottom=Tn.top+Gd,Tn.left+=-Hd*Ou,Tn.right=Tn.left+Ou}(ln,A,F,W,li,pe,Re,Ke,er,ft,ur,kr),!function(Tn){for(let pa of Tn)if(pa.positionedGlyphs.length!==0)return!1;return!0}(zi)&&ln}let Gw={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},$9={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},Q9={40:!0};function CC(R,A,F,W,te,fe){if(A.imageName){let pe=W[A.imageName];return pe?pe.displaySize[0]*A.scale*tu/fe+te:0}{let pe=F[A.fontStack],Re=pe&&pe[R];return Re?Re.metrics.advance*A.scale+te:0}}function LC(R,A,F,W){let te=Math.pow(R-A,2);return W?R=0,ft=0;for(let er=0;erft){let Rt=Math.ceil(fe/ft);te*=Rt/pe,pe=Rt}return{x1:W,y1:te,x2:W+fe,y2:te+pe}}function RC(R,A,F,W,te,fe){let pe=R.image,Re;if(pe.content){let li=pe.content,pi=pe.pixelRatio||1;Re=[li[0]/pi,li[1]/pi,pe.displaySize[0]-li[2]/pi,pe.displaySize[1]-li[3]/pi]}let Ke=A.left*fe,ft=A.right*fe,Rt,er,ur,vr;F==="width"||F==="both"?(vr=te[0]+Ke-W[3],er=te[0]+ft+W[1]):(vr=te[0]+(Ke+ft-pe.displaySize[0])/2,er=vr+pe.displaySize[0]);let kr=A.top*fe,Dr=A.bottom*fe;return F==="height"||F==="both"?(Rt=te[1]+kr-W[0],ur=te[1]+Dr+W[2]):(Rt=te[1]+(kr+Dr-pe.displaySize[1])/2,ur=Rt+pe.displaySize[1]),{image:pe,top:Rt,right:er,bottom:ur,left:vr,collisionPadding:Re}}let rb=255,v0=128,fm=rb*v0;function DC(R,A){let{expression:F}=A;if(F.kind==="constant")return{kind:"constant",layoutSize:F.evaluate(new rs(R+1))};if(F.kind==="source")return{kind:"source"};{let{zoomStops:W,interpolationType:te}=F,fe=0;for(;fepe.id),this.index=A.index,this.pixelRatio=A.pixelRatio,this.sourceLayerIndex=A.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Ii([]),this.placementViewportMatrix=Ii([]);let F=this.layers[0]._unevaluatedLayout._values;this.textSizeData=DC(this.zoom,F["text-size"]),this.iconSizeData=DC(this.zoom,F["icon-size"]);let W=this.layers[0].layout,te=W.get("symbol-sort-key"),fe=W.get("symbol-z-order");this.canOverlap=hS(W,"text-overlap","text-allow-overlap")!=="never"||hS(W,"icon-overlap","icon-allow-overlap")!=="never"||W.get("text-ignore-placement")||W.get("icon-ignore-placement"),this.sortFeaturesByKey=fe!=="viewport-y"&&!te.isConstant(),this.sortFeaturesByY=(fe==="viewport-y"||fe==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,W.get("symbol-placement")==="point"&&(this.writingModes=W.get("text-writing-mode").map(pe=>i.ah[pe])),this.stateDependentLayerIds=this.layers.filter(pe=>pe.isStateDependent()).map(pe=>pe.id),this.sourceID=A.sourceID}createArrays(){this.text=new pS(new Ms(this.layers,this.zoom,A=>/^text/.test(A))),this.icon=new pS(new Ms(this.layers,this.zoom,A=>/^icon/.test(A))),this.glyphOffsetArray=new Co,this.lineVertexArray=new Qa,this.symbolInstances=new $a,this.textAnchorOffsets=new Bo}calculateGlyphDependencies(A,F,W,te,fe){for(let pe=0;pe0)&&(pe.value.kind!=="constant"||pe.value.value.length>0),Rt=Ke.value.kind!=="constant"||!!Ke.value.value||Object.keys(Ke.parameters).length>0,er=fe.get("symbol-sort-key");if(this.features=[],!ft&&!Rt)return;let ur=F.iconDependencies,vr=F.glyphDependencies,kr=F.availableImages,Dr=new rs(this.zoom);for(let{feature:li,id:pi,index:vn,sourceLayerIndex:zi}of A){let ln=te._featureFilter.needGeometry,Tn=Sl(li,ln);if(!te._featureFilter.filter(Dr,Tn,W))continue;let pa,ro;if(ln||(Tn.geometry=$s(li)),ft){let Xa=te.getValueAndResolveTokens("text-field",Tn,W,kr),la=ti.factory(Xa),Mo=this.hasRTLText=this.hasRTLText||vS(la);(!Mo||ys.getRTLTextPluginStatus()==="unavailable"||Mo&&ys.isParsed())&&(pa=sm(la,te,Tn))}if(Rt){let Xa=te.getValueAndResolveTokens("icon-image",Tn,W,kr);ro=Xa instanceof en?Xa:en.fromString(Xa)}if(!pa&&!ro)continue;let Vo=this.sortFeaturesByKey?er.evaluate(Tn,{},W):void 0;if(this.features.push({id:pi,text:pa,icon:ro,index:vn,sourceLayerIndex:zi,geometry:Tn.geometry,properties:li.properties,type:tq[li.type],sortKey:Vo}),ro&&(ur[ro.name]=!0),pa){let Xa=pe.evaluate(Tn,{},W).join(","),la=fe.get("text-rotation-alignment")!=="viewport"&&fe.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(i.ah.vertical)>=0;for(let Mo of pa.sections)if(Mo.image)ur[Mo.image.name]=!0;else{let fo=Ka(pa.toString()),lo=Mo.fontStack||Xa,Wn=vr[lo]=vr[lo]||{};this.calculateGlyphDependencies(Mo.text,Wn,la,this.allowVerticalPlacement,fo)}}}fe.get("symbol-placement")==="line"&&(this.features=function(li){let pi={},vn={},zi=[],ln=0;function Tn(Xa){zi.push(li[Xa]),ln++}function pa(Xa,la,Mo){let fo=vn[Xa];return delete vn[Xa],vn[la]=fo,zi[fo].geometry[0].pop(),zi[fo].geometry[0]=zi[fo].geometry[0].concat(Mo[0]),fo}function ro(Xa,la,Mo){let fo=pi[la];return delete pi[la],pi[Xa]=fo,zi[fo].geometry[0].shift(),zi[fo].geometry[0]=Mo[0].concat(zi[fo].geometry[0]),fo}function Vo(Xa,la,Mo){let fo=Mo?la[0][la[0].length-1]:la[0][0];return`${Xa}:${fo.x}:${fo.y}`}for(let Xa=0;XaXa.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((li,pi)=>li.sortKey-pi.sortKey)}update(A,F,W){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(A,F,this.layers,W),this.icon.programConfigurations.updatePaintArrays(A,F,this.layers,W))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(A){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(A),this.iconCollisionBox.upload(A)),this.text.upload(A,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(A,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(A,F){let W=this.lineVertexArray.length;if(A.segment!==void 0){let te=A.dist(F[A.segment+1]),fe=A.dist(F[A.segment]),pe={};for(let Re=A.segment+1;Re=0;Re--)pe[Re]={x:F[Re].x,y:F[Re].y,tileUnitDistanceFromAnchor:fe},Re>0&&(fe+=F[Re-1].dist(F[Re]));for(let Re=0;Re0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(A,F){let W=A.placedSymbolArray.get(F),te=W.vertexStartIndex+4*W.numGlyphs;for(let fe=W.vertexStartIndex;fete[Re]-te[Ke]||fe[Ke]-fe[Re]),pe}addToSortKeyRanges(A,F){let W=this.sortKeyRanges[this.sortKeyRanges.length-1];W&&W.sortKey===F?W.symbolInstanceEnd=A+1:this.sortKeyRanges.push({sortKey:F,symbolInstanceStart:A,symbolInstanceEnd:A+1})}sortFeatures(A){if(this.sortFeaturesByY&&this.sortedAngle!==A&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(A),this.sortedAngle=A,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let F of this.symbolInstanceIndexes){let W=this.symbolInstances.get(F);this.featureSortOrder.push(W.featureIndex),[W.rightJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.leftJustifiedTextSymbolIndex].forEach((te,fe,pe)=>{te>=0&&pe.indexOf(te)===fe&&this.addIndicesForPlacedSymbol(this.text,te)}),W.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,W.verticalPlacedTextSymbolIndex),W.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.placedIconSymbolIndex),W.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Tf,ib;Fi("SymbolBucket",R1,{omit:["layers","collisionBoxArray","features","compareText"]}),R1.MAX_GLYPHS=65535,R1.addDynamicAttributes=dS;var Xw={get paint(){return ib=ib||new ue({"icon-opacity":new oo(ce.paint_symbol["icon-opacity"]),"icon-color":new oo(ce.paint_symbol["icon-color"]),"icon-halo-color":new oo(ce.paint_symbol["icon-halo-color"]),"icon-halo-width":new oo(ce.paint_symbol["icon-halo-width"]),"icon-halo-blur":new oo(ce.paint_symbol["icon-halo-blur"]),"icon-translate":new Va(ce.paint_symbol["icon-translate"]),"icon-translate-anchor":new Va(ce.paint_symbol["icon-translate-anchor"]),"text-opacity":new oo(ce.paint_symbol["text-opacity"]),"text-color":new oo(ce.paint_symbol["text-color"],{runtimeType:jt,getOverride:R=>R.textColor,hasOverride:R=>!!R.textColor}),"text-halo-color":new oo(ce.paint_symbol["text-halo-color"]),"text-halo-width":new oo(ce.paint_symbol["text-halo-width"]),"text-halo-blur":new oo(ce.paint_symbol["text-halo-blur"]),"text-translate":new Va(ce.paint_symbol["text-translate"]),"text-translate-anchor":new Va(ce.paint_symbol["text-translate-anchor"])})},get layout(){return Tf=Tf||new ue({"symbol-placement":new Va(ce.layout_symbol["symbol-placement"]),"symbol-spacing":new Va(ce.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Va(ce.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new oo(ce.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Va(ce.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Va(ce.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Va(ce.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Va(ce.layout_symbol["icon-ignore-placement"]),"icon-optional":new Va(ce.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Va(ce.layout_symbol["icon-rotation-alignment"]),"icon-size":new oo(ce.layout_symbol["icon-size"]),"icon-text-fit":new Va(ce.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Va(ce.layout_symbol["icon-text-fit-padding"]),"icon-image":new oo(ce.layout_symbol["icon-image"]),"icon-rotate":new oo(ce.layout_symbol["icon-rotate"]),"icon-padding":new oo(ce.layout_symbol["icon-padding"]),"icon-keep-upright":new Va(ce.layout_symbol["icon-keep-upright"]),"icon-offset":new oo(ce.layout_symbol["icon-offset"]),"icon-anchor":new oo(ce.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Va(ce.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Va(ce.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Va(ce.layout_symbol["text-rotation-alignment"]),"text-field":new oo(ce.layout_symbol["text-field"]),"text-font":new oo(ce.layout_symbol["text-font"]),"text-size":new oo(ce.layout_symbol["text-size"]),"text-max-width":new oo(ce.layout_symbol["text-max-width"]),"text-line-height":new Va(ce.layout_symbol["text-line-height"]),"text-letter-spacing":new oo(ce.layout_symbol["text-letter-spacing"]),"text-justify":new oo(ce.layout_symbol["text-justify"]),"text-radial-offset":new oo(ce.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Va(ce.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new oo(ce.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new oo(ce.layout_symbol["text-anchor"]),"text-max-angle":new Va(ce.layout_symbol["text-max-angle"]),"text-writing-mode":new Va(ce.layout_symbol["text-writing-mode"]),"text-rotate":new oo(ce.layout_symbol["text-rotate"]),"text-padding":new Va(ce.layout_symbol["text-padding"]),"text-keep-upright":new Va(ce.layout_symbol["text-keep-upright"]),"text-transform":new oo(ce.layout_symbol["text-transform"]),"text-offset":new oo(ce.layout_symbol["text-offset"]),"text-allow-overlap":new Va(ce.layout_symbol["text-allow-overlap"]),"text-overlap":new Va(ce.layout_symbol["text-overlap"]),"text-ignore-placement":new Va(ce.layout_symbol["text-ignore-placement"]),"text-optional":new Va(ce.layout_symbol["text-optional"])})}};class nb{constructor(A){if(A.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=A.property.overrides?A.property.overrides.runtimeType:Tt,this.defaultValue=A}evaluate(A){if(A.formattedSection){let F=this.defaultValue.property.overrides;if(F&&F.hasOverride(A.formattedSection))return F.getOverride(A.formattedSection)}return A.feature&&A.featureState?this.defaultValue.evaluate(A.feature,A.featureState):this.defaultValue.property.specification.default}eachChild(A){this.defaultValue.isConstant()||A(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Fi("FormatSectionOverride",nb,{omit:["defaultValue"]});class my extends B{constructor(A){super(A,Xw)}recalculate(A,F){if(super.recalculate(A,F),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),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"){let W=this.layout.get("text-writing-mode");if(W){let te=[];for(let fe of W)te.indexOf(fe)<0&&te.push(fe);this.layout._values["text-writing-mode"]=te}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(A,F,W,te){let fe=this.layout.get(A).evaluate(F,{},W,te),pe=this._unevaluatedLayout._values[A];return pe.isDataDriven()||Dc(pe.value)||!fe?fe:function(Re,Ke){return Ke.replace(/{([^{}]+)}/g,(ft,Rt)=>Re&&Rt in Re?String(Re[Rt]):"")}(F.properties,fe)}createBucket(A){return new R1(A)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let A of Xw.paint.overridableProperties){if(!my.hasPaintOverride(this.layout,A))continue;let F=this.paint.get(A),W=new nb(F),te=new Eu(W,F.property.specification),fe=null;fe=F.value.kind==="constant"||F.value.kind==="source"?new bc("source",te):new hu("composite",te,F.value.zoomStops),this.paint._values[A]=new xu(F.property,fe,F.parameters)}}_handleOverridablePaintPropertyUpdate(A,F,W){return!(!this.layout||F.isDataDriven()||W.isDataDriven())&&my.hasPaintOverride(this.layout,A)}static hasPaintOverride(A,F){let W=A.get("text-field"),te=Xw.paint.properties[F],fe=!1,pe=Re=>{for(let Ke of Re)if(te.overrides&&te.overrides.hasOverride(Ke))return void(fe=!0)};if(W.value.kind==="constant"&&W.value.value instanceof ti)pe(W.value.value.sections);else if(W.value.kind==="source"){let Re=ft=>{fe||(ft instanceof ua&&Mn(ft.value)===ei?pe(ft.value.sections):ft instanceof Yl?pe(ft.sections):ft.eachChild(Re))},Ke=W.value;Ke._styleExpression&&Re(Ke._styleExpression.expression)}return fe}}let FC;var ab={get paint(){return FC=FC||new ue({"background-color":new Va(ce.paint_background["background-color"]),"background-pattern":new hc(ce.paint_background["background-pattern"]),"background-opacity":new Va(ce.paint_background["background-opacity"])})}};class iq extends B{constructor(A){super(A,ab)}}let gS;var zC={get paint(){return gS=gS||new ue({"raster-opacity":new Va(ce.paint_raster["raster-opacity"]),"raster-hue-rotate":new Va(ce.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Va(ce.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Va(ce.paint_raster["raster-brightness-max"]),"raster-saturation":new Va(ce.paint_raster["raster-saturation"]),"raster-contrast":new Va(ce.paint_raster["raster-contrast"]),"raster-resampling":new Va(ce.paint_raster["raster-resampling"]),"raster-fade-duration":new Va(ce.paint_raster["raster-fade-duration"])})}};class ob extends B{constructor(A){super(A,zC)}}class mS extends B{constructor(A){super(A,{}),this.onAdd=F=>{this.implementation.onAdd&&this.implementation.onAdd(F,F.painter.context.gl)},this.onRemove=F=>{this.implementation.onRemove&&this.implementation.onRemove(F,F.painter.context.gl)},this.implementation=A}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class yS{constructor(A){this._methodToThrottle=A,this._triggered=!1,typeof MessageChannel!="undefined"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let _S=63710088e-1;class pg{constructor(A,F){if(isNaN(A)||isNaN(F))throw new Error(`Invalid LngLat object: (${A}, ${F})`);if(this.lng=+A,this.lat=+F,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new pg(T(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(A){let F=Math.PI/180,W=this.lat*F,te=A.lat*F,fe=Math.sin(W)*Math.sin(te)+Math.cos(W)*Math.cos(te)*Math.cos((A.lng-this.lng)*F);return _S*Math.acos(Math.min(fe,1))}static convert(A){if(A instanceof pg)return A;if(Array.isArray(A)&&(A.length===2||A.length===3))return new pg(Number(A[0]),Number(A[1]));if(!Array.isArray(A)&&typeof A=="object"&&A!==null)return new pg(Number("lng"in A?A.lng:A.lon),Number(A.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 [, ]")}}let D1=2*Math.PI*_S;function qC(R){return D1*Math.cos(R*Math.PI/180)}function Zw(R){return(180+R)/360}function OC(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function Yw(R,A){return R/qC(A)}function sb(R){return 360/Math.PI*Math.atan(Math.exp((180-360*R)*Math.PI/180))-90}class lb{constructor(A,F,W=0){this.x=+A,this.y=+F,this.z=+W}static fromLngLat(A,F=0){let W=pg.convert(A);return new lb(Zw(W.lng),OC(W.lat),Yw(F,W.lat))}toLngLat(){return new pg(360*this.x-180,sb(this.y))}toAltitude(){return this.z*qC(sb(this.y))}meterInMercatorCoordinateUnits(){return 1/D1*(A=sb(this.y),1/Math.cos(A*Math.PI/180));var A}}function yp(R,A,F){var W=2*Math.PI*6378137/256/Math.pow(2,F);return[R*W-2*Math.PI*6378137/2,A*W-2*Math.PI*6378137/2]}class xS{constructor(A,F,W){if(!function(te,fe,pe){return!(te<0||te>25||pe<0||pe>=Math.pow(2,te)||fe<0||fe>=Math.pow(2,te))}(A,F,W))throw new Error(`x=${F}, y=${W}, z=${A} outside of bounds. 0<=x<${Math.pow(2,A)}, 0<=y<${Math.pow(2,A)} 0<=z<=25 `);this.z=A,this.x=F,this.y=W,this.key=ub(0,A,A,F,W)}equals(A){return this.z===A.z&&this.x===A.x&&this.y===A.y}url(A,F,W){let te=(pe=this.y,Re=this.z,Ke=yp(256*(fe=this.x),256*(pe=Math.pow(2,Re)-pe-1),Re),ft=yp(256*(fe+1),256*(pe+1),Re),Ke[0]+","+Ke[1]+","+ft[0]+","+ft[1]);var fe,pe,Re,Ke,ft;let Rt=function(er,ur,vr){let kr,Dr="";for(let li=er;li>0;li--)kr=1<1?"@2x":"").replace(/{quadkey}/g,Rt).replace(/{bbox-epsg-3857}/g,te)}isChildOf(A){let F=this.z-A.z;return F>0&&A.x===this.x>>F&&A.y===this.y>>F}getTilePoint(A){let F=Math.pow(2,this.z);return new u((A.x*F-this.x)*ja,(A.y*F-this.y)*ja)}toString(){return`${this.z}/${this.x}/${this.y}`}}class BC{constructor(A,F){this.wrap=A,this.canonical=F,this.key=ub(A,F.z,F.z,F.x,F.y)}}class $v{constructor(A,F,W,te,fe){if(A= z; overscaledZ = ${A}; z = ${W}`);this.overscaledZ=A,this.wrap=F,this.canonical=new xS(W,+te,+fe),this.key=ub(F,A,W,te,fe)}clone(){return new $v(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(A){return this.overscaledZ===A.overscaledZ&&this.wrap===A.wrap&&this.canonical.equals(A.canonical)}scaledTo(A){if(A>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${A}; overscaledZ = ${this.overscaledZ}`);let F=this.canonical.z-A;return A>this.canonical.z?new $v(A,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new $v(A,this.wrap,A,this.canonical.x>>F,this.canonical.y>>F)}calculateScaledKey(A,F){if(A>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${A}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-A;return A>this.canonical.z?ub(this.wrap*+F,A,this.canonical.z,this.canonical.x,this.canonical.y):ub(this.wrap*+F,A,A,this.canonical.x>>W,this.canonical.y>>W)}isChildOf(A){if(A.wrap!==this.wrap)return!1;let F=this.canonical.z-A.canonical.z;return A.overscaledZ===0||A.overscaledZ>F&&A.canonical.y===this.canonical.y>>F}children(A){if(this.overscaledZ>=A)return[new $v(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let F=this.canonical.z+1,W=2*this.canonical.x,te=2*this.canonical.y;return[new $v(F,this.wrap,F,W,te),new $v(F,this.wrap,F,W+1,te),new $v(F,this.wrap,F,W,te+1),new $v(F,this.wrap,F,W+1,te+1)]}isLessThan(A){return this.wrapA.wrap)&&(this.overscaledZA.overscaledZ)&&(this.canonical.xA.canonical.x)&&this.canonical.ythis.max&&(this.max=er),er=this.dim+1||F<-1||F>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(F+1)*this.stride+(A+1)}unpack(A,F,W){return A*this.redFactor+F*this.greenFactor+W*this.blueFactor-this.baseShift}getPixels(){return new Ki({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(A,F,W){if(this.dim!==A.dim)throw new Error("dem dimension mismatch");let te=F*this.dim,fe=F*this.dim+this.dim,pe=W*this.dim,Re=W*this.dim+this.dim;switch(F){case-1:te=fe-1;break;case 1:fe=te+1}switch(W){case-1:pe=Re-1;break;case 1:Re=pe+1}let Ke=-F*this.dim,ft=-W*this.dim;for(let Rt=pe;Rt=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${A} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[A]}}class bS{constructor(A,F,W,te,fe){this.type="Feature",this._vectorTileFeature=A,A._z=F,A._x=W,A._y=te,this.properties=A.properties,this.id=fe}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(A){this._geometry=A}toJSON(){let A={geometry:this.geometry};for(let F in this)F!=="_geometry"&&F!=="_vectorTileFeature"&&(A[F]=this[F]);return A}}class yy{constructor(A,F){this.tileID=A,this.x=A.canonical.x,this.y=A.canonical.y,this.z=A.canonical.z,this.grid=new $i(ja,16,0),this.grid3D=new $i(ja,16,0),this.featureIndexArray=new Ts,this.promoteId=F}insert(A,F,W,te,fe,pe){let Re=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(W,te,fe);let Ke=pe?this.grid3D:this.grid;for(let ft=0;ft=0&&er[3]>=0&&Ke.insert(Re,er[0],er[1],er[2],er[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new _r.VectorTile(new uS(this.rawTileData)).layers,this.sourceLayerCoder=new UC(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(A,F,W,te){this.loadVTLayers();let fe=A.params||{},pe=ja/A.tileSize/A.scale,Re=Fc(fe.filter),Ke=A.queryGeometry,ft=A.queryPadding*pe,Rt=GC(Ke),er=this.grid.query(Rt.minX-ft,Rt.minY-ft,Rt.maxX+ft,Rt.maxY+ft),ur=GC(A.cameraQueryGeometry),vr=this.grid3D.query(ur.minX-ft,ur.minY-ft,ur.maxX+ft,ur.maxY+ft,(li,pi,vn,zi)=>function(ln,Tn,pa,ro,Vo){for(let la of ln)if(Tn<=la.x&&pa<=la.y&&ro>=la.x&&Vo>=la.y)return!0;let Xa=[new u(Tn,pa),new u(Tn,Vo),new u(ro,Vo),new u(ro,pa)];if(ln.length>2){for(let la of Xa)if(Ni(ln,la))return!0}for(let la=0;la(zi||(zi=$s(ln)),Tn.queryIntersectsFeature(Ke,ln,pa,zi,this.z,A.transform,pe,A.pixelPosMatrix)))}return kr}loadMatchingFeature(A,F,W,te,fe,pe,Re,Ke,ft,Rt,er){let ur=this.bucketLayerIDs[F];if(pe&&!function(li,pi){for(let vn=0;vn=0)return!0;return!1}(pe,ur))return;let vr=this.sourceLayerCoder.decode(W),kr=this.vtLayers[vr].feature(te);if(fe.needGeometry){let li=Sl(kr,!0);if(!fe.filter(new rs(this.tileID.overscaledZ),li,this.tileID.canonical))return}else if(!fe.filter(new rs(this.tileID.overscaledZ),kr))return;let Dr=this.getId(kr,vr);for(let li=0;li{let Re=A instanceof Ac?A.get(pe):null;return Re&&Re.evaluate?Re.evaluate(F,W,te):Re})}function GC(R){let A=1/0,F=1/0,W=-1/0,te=-1/0;for(let fe of R)A=Math.min(A,fe.x),F=Math.min(F,fe.y),W=Math.max(W,fe.x),te=Math.max(te,fe.y);return{minX:A,minY:F,maxX:W,maxY:te}}function nq(R,A){return A-R}function HC(R,A,F,W,te){let fe=[];for(let pe=0;pe=W&&er.x>=W||(Rt.x>=W?Rt=new u(W,Rt.y+(W-Rt.x)/(er.x-Rt.x)*(er.y-Rt.y))._round():er.x>=W&&(er=new u(W,Rt.y+(W-Rt.x)/(er.x-Rt.x)*(er.y-Rt.y))._round()),Rt.y>=te&&er.y>=te||(Rt.y>=te?Rt=new u(Rt.x+(te-Rt.y)/(er.y-Rt.y)*(er.x-Rt.x),te)._round():er.y>=te&&(er=new u(Rt.x+(te-Rt.y)/(er.y-Rt.y)*(er.x-Rt.x),te)._round()),Ke&&Rt.equals(Ke[Ke.length-1])||(Ke=[Rt],fe.push(Ke)),Ke.push(er)))))}}return fe}Fi("FeatureIndex",yy,{omit:["rawTileData","sourceLayerCoder"]});class gg extends u{constructor(A,F,W,te){super(A,F),this.angle=W,te!==void 0&&(this.segment=te)}clone(){return new gg(this.x,this.y,this.angle,this.segment)}}function wS(R,A,F,W,te){if(A.segment===void 0||F===0)return!0;let fe=A,pe=A.segment+1,Re=0;for(;Re>-F/2;){if(pe--,pe<0)return!1;Re-=R[pe].dist(fe),fe=R[pe]}Re+=R[pe].dist(R[pe+1]),pe++;let Ke=[],ft=0;for(;ReW;)ft-=Ke.shift().angleDelta;if(ft>te)return!1;pe++,Re+=Rt.dist(er)}return!0}function jC(R){let A=0;for(let F=0;Fft){let kr=(ft-Ke)/vr,Dr=Lo.number(er.x,ur.x,kr),li=Lo.number(er.y,ur.y,kr),pi=new gg(Dr,li,ur.angleTo(er),Rt);return pi._round(),!pe||wS(R,pi,Re,pe,A)?pi:void 0}Ke+=vr}}function oq(R,A,F,W,te,fe,pe,Re,Ke){let ft=WC(W,fe,pe),Rt=XC(W,te),er=Rt*pe,ur=R[0].x===0||R[0].x===Ke||R[0].y===0||R[0].y===Ke;return A-er=0&&ln=0&&Tn=0&&ur+ft<=Rt){let pa=new gg(ln,Tn,vn,kr);pa._round(),W&&!wS(R,pa,fe,W,te)||vr.push(pa)}}er+=pi}return Re||vr.length||pe||(vr=ZC(R,er/2,F,W,te,fe,pe,!0,Ke)),vr}Fi("Anchor",gg);let F1=Md;function YC(R,A,F,W){let te=[],fe=R.image,pe=fe.pixelRatio,Re=fe.paddedRect.w-2*F1,Ke=fe.paddedRect.h-2*F1,ft={x1:R.left,y1:R.top,x2:R.right,y2:R.bottom},Rt=fe.stretchX||[[0,Re]],er=fe.stretchY||[[0,Ke]],ur=(Wn,Ro)=>Wn+Ro[1]-Ro[0],vr=Rt.reduce(ur,0),kr=er.reduce(ur,0),Dr=Re-vr,li=Ke-kr,pi=0,vn=vr,zi=0,ln=kr,Tn=0,pa=Dr,ro=0,Vo=li;if(fe.content&&W){let Wn=fe.content,Ro=Wn[2]-Wn[0],uo=Wn[3]-Wn[1];(fe.textFitWidth||fe.textFitHeight)&&(ft=IC(R)),pi=mg(Rt,0,Wn[0]),zi=mg(er,0,Wn[1]),vn=mg(Rt,Wn[0],Wn[2]),ln=mg(er,Wn[1],Wn[3]),Tn=Wn[0]-pi,ro=Wn[1]-zi,pa=Ro-vn,Vo=uo-ln}let Xa=ft.x1,la=ft.y1,Mo=ft.x2-Xa,fo=ft.y2-la,lo=(Wn,Ro,uo,$o)=>{let Ju=Kw(Wn.stretch-pi,vn,Mo,Xa),Ou=z1(Wn.fixed-Tn,pa,Wn.stretch,vr),kh=Kw(Ro.stretch-zi,ln,fo,la),Qv=z1(Ro.fixed-ro,Vo,Ro.stretch,kr),ud=Kw(uo.stretch-pi,vn,Mo,Xa),Ch=z1(uo.fixed-Tn,pa,uo.stretch,vr),Gd=Kw($o.stretch-zi,ln,fo,la),Hd=z1($o.fixed-ro,Vo,$o.stretch,kr),jd=new u(Ju,kh),Af=new u(ud,kh),Lh=new u(ud,Gd),Ed=new u(Ju,Gd),cd=new u(Ou/pe,Qv/pe),Yh=new u(Ch/pe,Hd/pe),Df=A*Math.PI/180;if(Df){let ru=Math.sin(Df),pc=Math.cos(Df),$u=[pc,-ru,ru,pc];jd._matMult($u),Af._matMult($u),Ed._matMult($u),Lh._matMult($u)}let Fv=Wn.stretch+Wn.fixed,uv=Ro.stretch+Ro.fixed;return{tl:jd,tr:Af,bl:Ed,br:Lh,tex:{x:fe.paddedRect.x+F1+Fv,y:fe.paddedRect.y+F1+uv,w:uo.stretch+uo.fixed-Fv,h:$o.stretch+$o.fixed-uv},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:cd,pixelOffsetBR:Yh,minFontScaleX:pa/pe/Mo,minFontScaleY:Vo/pe/fo,isSDF:F}};if(W&&(fe.stretchX||fe.stretchY)){let Wn=KC(Rt,Dr,vr),Ro=KC(er,li,kr);for(let uo=0;uo0&&(Dr=Math.max(10,Dr),this.circleDiameter=Dr)}else{let ur=!((er=pe.image)===null||er===void 0)&&er.content&&(pe.image.textFitWidth||pe.image.textFitHeight)?IC(pe):{x1:pe.left,y1:pe.top,x2:pe.right,y2:pe.bottom};ur.y1=ur.y1*Re-Ke[0],ur.y2=ur.y2*Re+Ke[2],ur.x1=ur.x1*Re-Ke[3],ur.x2=ur.x2*Re+Ke[1];let vr=pe.collisionPadding;if(vr&&(ur.x1-=vr[0]*Re,ur.y1-=vr[1]*Re,ur.x2+=vr[2]*Re,ur.y2+=vr[3]*Re),Rt){let kr=new u(ur.x1,ur.y1),Dr=new u(ur.x2,ur.y1),li=new u(ur.x1,ur.y2),pi=new u(ur.x2,ur.y2),vn=Rt*Math.PI/180;kr._rotate(vn),Dr._rotate(vn),li._rotate(vn),pi._rotate(vn),ur.x1=Math.min(kr.x,Dr.x,li.x,pi.x),ur.x2=Math.max(kr.x,Dr.x,li.x,pi.x),ur.y1=Math.min(kr.y,Dr.y,li.y,pi.y),ur.y2=Math.max(kr.y,Dr.y,li.y,pi.y)}A.emplaceBack(F.x,F.y,ur.x1,ur.y1,ur.x2,ur.y2,W,te,fe)}this.boxEndIndex=A.length}}class Vp{constructor(A=[],F=(W,te)=>Wte?1:0){if(this.data=A,this.length=this.data.length,this.compare=F,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(A){this.data.push(A),this._up(this.length++)}pop(){if(this.length===0)return;let A=this.data[0],F=this.data.pop();return--this.length>0&&(this.data[0]=F,this._down(0)),A}peek(){return this.data[0]}_up(A){let{data:F,compare:W}=this,te=F[A];for(;A>0;){let fe=A-1>>1,pe=F[fe];if(W(te,pe)>=0)break;F[A]=pe,A=fe}F[A]=te}_down(A){let{data:F,compare:W}=this,te=this.length>>1,fe=F[A];for(;A=0)break;F[A]=F[pe],A=pe}F[A]=fe}}function sq(R,A=1,F=!1){let W=1/0,te=1/0,fe=-1/0,pe=-1/0,Re=R[0];for(let vr=0;vrfe)&&(fe=kr.x),(!vr||kr.y>pe)&&(pe=kr.y)}let Ke=Math.min(fe-W,pe-te),ft=Ke/2,Rt=new Vp([],lq);if(Ke===0)return new u(W,te);for(let vr=W;vrer.d||!er.d)&&(er=vr,F&&console.log("found best %d after %d probes",Math.round(1e4*vr.d)/1e4,ur)),vr.max-er.d<=A||(ft=vr.h/2,Rt.push(new q1(vr.p.x-ft,vr.p.y-ft,ft,R)),Rt.push(new q1(vr.p.x+ft,vr.p.y-ft,ft,R)),Rt.push(new q1(vr.p.x-ft,vr.p.y+ft,ft,R)),Rt.push(new q1(vr.p.x+ft,vr.p.y+ft,ft,R)),ur+=4)}return F&&(console.log(`num probes: ${ur}`),console.log(`best distance: ${er.d}`)),er.p}function lq(R,A){return A.max-R.max}function q1(R,A,F,W){this.p=new u(R,A),this.h=F,this.d=function(te,fe){let pe=!1,Re=1/0;for(let Ke=0;Kete.y!=kr.y>te.y&&te.x<(kr.x-vr.x)*(te.y-vr.y)/(kr.y-vr.y)+vr.x&&(pe=!pe),Re=Math.min(Re,Nr(te,vr,kr))}}return(pe?1:-1)*Math.sqrt(Re)}(this.p,W),this.max=this.d+this.h*Math.SQRT2}var ld;i.aq=void 0,(ld=i.aq||(i.aq={}))[ld.center=1]="center",ld[ld.left=2]="left",ld[ld.right=3]="right",ld[ld.top=4]="top",ld[ld.bottom=5]="bottom",ld[ld["top-left"]=6]="top-left",ld[ld["top-right"]=7]="top-right",ld[ld["bottom-left"]=8]="bottom-left",ld[ld["bottom-right"]=9]="bottom-right";let vm=7,_y=Number.POSITIVE_INFINITY;function TS(R,A){return A[1]!==_y?function(F,W,te){let fe=0,pe=0;switch(W=Math.abs(W),te=Math.abs(te),F){case"top-right":case"top-left":case"top":pe=te-vm;break;case"bottom-right":case"bottom-left":case"bottom":pe=-te+vm}switch(F){case"top-right":case"bottom-right":case"right":fe=-W;break;case"top-left":case"bottom-left":case"left":fe=W}return[fe,pe]}(R,A[0],A[1]):function(F,W){let te=0,fe=0;W<0&&(W=0);let pe=W/Math.SQRT2;switch(F){case"top-right":case"top-left":fe=pe-vm;break;case"bottom-right":case"bottom-left":fe=-pe+vm;break;case"bottom":fe=-W+vm;break;case"top":fe=W-vm}switch(F){case"top-right":case"bottom-right":te=-pe;break;case"top-left":case"bottom-left":te=pe;break;case"left":te=W;break;case"right":te=-W}return[te,fe]}(R,A[0])}function JC(R,A,F){var W;let te=R.layout,fe=(W=te.get("text-variable-anchor-offset"))===null||W===void 0?void 0:W.evaluate(A,{},F);if(fe){let Re=fe.values,Ke=[];for(let ft=0;ftur*tu);Rt.startsWith("top")?er[1]-=vm:Rt.startsWith("bottom")&&(er[1]+=vm),Ke[ft+1]=er}return new Zi(Ke)}let pe=te.get("text-variable-anchor");if(pe){let Re;Re=R._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[te.get("text-radial-offset").evaluate(A,{},F)*tu,_y]:te.get("text-offset").evaluate(A,{},F).map(ft=>ft*tu);let Ke=[];for(let ft of pe)Ke.push(ft,TS(ft,Re));return new Zi(Ke)}return null}function AS(R){switch(R){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function uq(R,A,F,W,te,fe,pe,Re,Ke,ft,Rt){let er=fe.textMaxSize.evaluate(A,{});er===void 0&&(er=pe);let ur=R.layers[0].layout,vr=ur.get("icon-offset").evaluate(A,{},Rt),kr=QC(F.horizontal),Dr=pe/24,li=R.tilePixelRatio*Dr,pi=R.tilePixelRatio*er/24,vn=R.tilePixelRatio*Re,zi=R.tilePixelRatio*ur.get("symbol-spacing"),ln=ur.get("text-padding")*R.tilePixelRatio,Tn=function(Wn,Ro,uo,$o=1){let Ju=Wn.get("icon-padding").evaluate(Ro,{},uo),Ou=Ju&&Ju.values;return[Ou[0]*$o,Ou[1]*$o,Ou[2]*$o,Ou[3]*$o]}(ur,A,Rt,R.tilePixelRatio),pa=ur.get("text-max-angle")/180*Math.PI,ro=ur.get("text-rotation-alignment")!=="viewport"&&ur.get("symbol-placement")!=="point",Vo=ur.get("icon-rotation-alignment")==="map"&&ur.get("symbol-placement")!=="point",Xa=ur.get("symbol-placement"),la=zi/2,Mo=ur.get("icon-text-fit"),fo;W&&Mo!=="none"&&(R.allowVerticalPlacement&&F.vertical&&(fo=RC(W,F.vertical,Mo,ur.get("icon-text-fit-padding"),vr,Dr)),kr&&(W=RC(W,kr,Mo,ur.get("icon-text-fit-padding"),vr,Dr)));let lo=(Wn,Ro)=>{Ro.x<0||Ro.x>=ja||Ro.y<0||Ro.y>=ja||function(uo,$o,Ju,Ou,kh,Qv,ud,Ch,Gd,Hd,jd,Af,Lh,Ed,cd,Yh,Df,Fv,uv,ru,pc,$u,zv,hf,O1){let p0=uo.addToLineVertexArray($o,Ju),Gp,ep,Gc,Yf,tp=0,yg=0,cv=0,B1=0,CS=-1,e3=-1,g0={},xy=xi("");if(uo.allowVerticalPlacement&&Ou.vertical){let kd=Ch.layout.get("text-rotate").evaluate(pc,{},hf)+90;Gc=new dm(Gd,$o,Hd,jd,Af,Ou.vertical,Lh,Ed,cd,kd),ud&&(Yf=new dm(Gd,$o,Hd,jd,Af,ud,Df,Fv,cd,kd))}if(kh){let kd=Ch.layout.get("icon-rotate").evaluate(pc,{}),rp=Ch.layout.get("icon-text-fit")!=="none",pm=YC(kh,kd,zv,rp),Wd=ud?YC(ud,kd,zv,rp):void 0;ep=new dm(Gd,$o,Hd,jd,Af,kh,Df,Fv,!1,kd),tp=4*pm.length;let Cd=uo.iconSizeData,xp=null;Cd.kind==="source"?(xp=[v0*Ch.layout.get("icon-size").evaluate(pc,{})],xp[0]>fm&&E(`${uo.layerIds[0]}: Value for "icon-size" is >= ${rb}. Reduce your "icon-size".`)):Cd.kind==="composite"&&(xp=[v0*$u.compositeIconSizes[0].evaluate(pc,{},hf),v0*$u.compositeIconSizes[1].evaluate(pc,{},hf)],(xp[0]>fm||xp[1]>fm)&&E(`${uo.layerIds[0]}: Value for "icon-size" is >= ${rb}. Reduce your "icon-size".`)),uo.addSymbols(uo.icon,pm,xp,ru,uv,pc,i.ah.none,$o,p0.lineStartIndex,p0.lineLength,-1,hf),CS=uo.icon.placedSymbolArray.length-1,Wd&&(yg=4*Wd.length,uo.addSymbols(uo.icon,Wd,xp,ru,uv,pc,i.ah.vertical,$o,p0.lineStartIndex,p0.lineLength,-1,hf),e3=uo.icon.placedSymbolArray.length-1)}let Kh=Object.keys(Ou.horizontal);for(let kd of Kh){let rp=Ou.horizontal[kd];if(!Gp){xy=xi(rp.text);let Wd=Ch.layout.get("text-rotate").evaluate(pc,{},hf);Gp=new dm(Gd,$o,Hd,jd,Af,rp,Lh,Ed,cd,Wd)}let pm=rp.positionedLines.length===1;if(cv+=$C(uo,$o,rp,Qv,Ch,cd,pc,Yh,p0,Ou.vertical?i.ah.horizontal:i.ah.horizontalOnly,pm?Kh:[kd],g0,CS,$u,hf),pm)break}Ou.vertical&&(B1+=$C(uo,$o,Ou.vertical,Qv,Ch,cd,pc,Yh,p0,i.ah.vertical,["vertical"],g0,e3,$u,hf));let hq=Gp?Gp.boxStartIndex:uo.collisionBoxArray.length,t3=Gp?Gp.boxEndIndex:uo.collisionBoxArray.length,m0=Gc?Gc.boxStartIndex:uo.collisionBoxArray.length,fv=Gc?Gc.boxEndIndex:uo.collisionBoxArray.length,i6=ep?ep.boxStartIndex:uo.collisionBoxArray.length,dq=ep?ep.boxEndIndex:uo.collisionBoxArray.length,n6=Yf?Yf.boxStartIndex:uo.collisionBoxArray.length,vq=Yf?Yf.boxEndIndex:uo.collisionBoxArray.length,_p=-1,hb=(kd,rp)=>kd&&kd.circleDiameter?Math.max(kd.circleDiameter,rp):rp;_p=hb(Gp,_p),_p=hb(Gc,_p),_p=hb(ep,_p),_p=hb(Yf,_p);let r3=_p>-1?1:0;r3&&(_p*=O1/tu),uo.glyphOffsetArray.length>=R1.MAX_GLYPHS&&E("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),pc.sortKey!==void 0&&uo.addToSortKeyRanges(uo.symbolInstances.length,pc.sortKey);let LS=JC(Ch,pc,hf),[pq,gq]=function(kd,rp){let pm=kd.length,Wd=rp==null?void 0:rp.values;if((Wd==null?void 0:Wd.length)>0)for(let Cd=0;Cd=0?g0.right:-1,g0.center>=0?g0.center:-1,g0.left>=0?g0.left:-1,g0.vertical||-1,CS,e3,xy,hq,t3,m0,fv,i6,dq,n6,vq,Hd,cv,B1,tp,yg,r3,0,Lh,_p,pq,gq)}(R,Ro,Wn,F,W,te,fo,R.layers[0],R.collisionBoxArray,A.index,A.sourceLayerIndex,R.index,li,[ln,ln,ln,ln],ro,Ke,vn,Tn,Vo,vr,A,fe,ft,Rt,pe)};if(Xa==="line")for(let Wn of HC(A.geometry,0,0,ja,ja)){let Ro=oq(Wn,zi,pa,F.vertical||kr,W,24,pi,R.overscaling,ja);for(let uo of Ro)kr&&cq(R,kr.text,la,uo)||lo(Wn,uo)}else if(Xa==="line-center"){for(let Wn of A.geometry)if(Wn.length>1){let Ro=aq(Wn,pa,F.vertical||kr,W,24,pi);Ro&&lo(Wn,Ro)}}else if(A.type==="Polygon")for(let Wn of Cf(A.geometry,0)){let Ro=sq(Wn,16);lo(Wn[0],new gg(Ro.x,Ro.y,0))}else if(A.type==="LineString")for(let Wn of A.geometry)lo(Wn,new gg(Wn[0].x,Wn[0].y,0));else if(A.type==="Point")for(let Wn of A.geometry)for(let Ro of Wn)lo([Ro],new gg(Ro.x,Ro.y,0))}function $C(R,A,F,W,te,fe,pe,Re,Ke,ft,Rt,er,ur,vr,kr){let Dr=function(vn,zi,ln,Tn,pa,ro,Vo,Xa){let la=Tn.layout.get("text-rotate").evaluate(ro,{})*Math.PI/180,Mo=[];for(let fo of zi.positionedLines)for(let lo of fo.positionedGlyphs){if(!lo.rect)continue;let Wn=lo.rect||{},Ro=kC+1,uo=!0,$o=1,Ju=0,Ou=(pa||Xa)&&lo.vertical,kh=lo.metrics.advance*lo.scale/2;if(Xa&&zi.verticalizable&&(Ju=fo.lineOffset/2-(lo.imageName?-(tu-lo.metrics.width*lo.scale)/2:(lo.scale-1)*tu)),lo.imageName){let ru=Vo[lo.imageName];uo=ru.sdf,$o=ru.pixelRatio,Ro=Md/$o}let Qv=pa?[lo.x+kh,lo.y]:[0,0],ud=pa?[0,0]:[lo.x+kh+ln[0],lo.y+ln[1]-Ju],Ch=[0,0];Ou&&(Ch=ud,ud=[0,0]);let Gd=lo.metrics.isDoubleResolution?2:1,Hd=(lo.metrics.left-Ro)*lo.scale-kh+ud[0],jd=(-lo.metrics.top-Ro)*lo.scale+ud[1],Af=Hd+Wn.w/Gd*lo.scale/$o,Lh=jd+Wn.h/Gd*lo.scale/$o,Ed=new u(Hd,jd),cd=new u(Af,jd),Yh=new u(Hd,Lh),Df=new u(Af,Lh);if(Ou){let ru=new u(-kh,kh-Eh),pc=-Math.PI/2,$u=tu/2-kh,zv=new u(5-Eh-$u,-(lo.imageName?$u:0)),hf=new u(...Ch);Ed._rotateAround(pc,ru)._add(zv)._add(hf),cd._rotateAround(pc,ru)._add(zv)._add(hf),Yh._rotateAround(pc,ru)._add(zv)._add(hf),Df._rotateAround(pc,ru)._add(zv)._add(hf)}if(la){let ru=Math.sin(la),pc=Math.cos(la),$u=[pc,-ru,ru,pc];Ed._matMult($u),cd._matMult($u),Yh._matMult($u),Df._matMult($u)}let Fv=new u(0,0),uv=new u(0,0);Mo.push({tl:Ed,tr:cd,bl:Yh,br:Df,tex:Wn,writingMode:zi.writingMode,glyphOffset:Qv,sectionIndex:lo.sectionIndex,isSDF:uo,pixelOffsetTL:Fv,pixelOffsetBR:uv,minFontScaleX:0,minFontScaleY:0})}return Mo}(0,F,Re,te,fe,pe,W,R.allowVerticalPlacement),li=R.textSizeData,pi=null;li.kind==="source"?(pi=[v0*te.layout.get("text-size").evaluate(pe,{})],pi[0]>fm&&E(`${R.layerIds[0]}: Value for "text-size" is >= ${rb}. Reduce your "text-size".`)):li.kind==="composite"&&(pi=[v0*vr.compositeTextSizes[0].evaluate(pe,{},kr),v0*vr.compositeTextSizes[1].evaluate(pe,{},kr)],(pi[0]>fm||pi[1]>fm)&&E(`${R.layerIds[0]}: Value for "text-size" is >= ${rb}. Reduce your "text-size".`)),R.addSymbols(R.text,Dr,pi,Re,fe,pe,ft,A,Ke.lineStartIndex,Ke.lineLength,ur,kr);for(let vn of Rt)er[vn]=R.text.placedSymbolArray.length-1;return 4*Dr.length}function QC(R){for(let A in R)return R[A];return null}function cq(R,A,F,W){let te=R.compareText;if(A in te){let fe=te[A];for(let pe=fe.length-1;pe>=0;pe--)if(W.dist(fe[pe])>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let fe=e6[15&W];if(!fe)throw new Error("Unrecognized array type.");let[pe]=new Uint16Array(A,2,1),[Re]=new Uint32Array(A,4,1);return new SS(Re,pe,fe,A)}constructor(A,F=64,W=Float64Array,te){if(isNaN(A)||A<0)throw new Error(`Unpexpected numItems value: ${A}.`);this.numItems=+A,this.nodeSize=Math.min(Math.max(+F,2),65535),this.ArrayType=W,this.IndexArrayType=A<65536?Uint16Array:Uint32Array;let fe=e6.indexOf(this.ArrayType),pe=2*A*this.ArrayType.BYTES_PER_ELEMENT,Re=A*this.IndexArrayType.BYTES_PER_ELEMENT,Ke=(8-Re%8)%8;if(fe<0)throw new Error(`Unexpected typed array class: ${W}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,A),this.coords=new this.ArrayType(this.data,8+Re+Ke,2*A),this._pos=2*A,this._finished=!0):(this.data=new ArrayBuffer(8+pe+Re+Ke),this.ids=new this.IndexArrayType(this.data,8,A),this.coords=new this.ArrayType(this.data,8+Re+Ke,2*A),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+fe]),new Uint16Array(this.data,2,1)[0]=F,new Uint32Array(this.data,4,1)[0]=A)}add(A,F){let W=this._pos>>1;return this.ids[W]=W,this.coords[this._pos++]=A,this.coords[this._pos++]=F,W}finish(){let A=this._pos>>1;if(A!==this.numItems)throw new Error(`Added ${A} items when expected ${this.numItems}.`);return Jw(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(A,F,W,te){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:fe,coords:pe,nodeSize:Re}=this,Ke=[0,fe.length-1,0],ft=[];for(;Ke.length;){let Rt=Ke.pop()||0,er=Ke.pop()||0,ur=Ke.pop()||0;if(er-ur<=Re){for(let li=ur;li<=er;li++){let pi=pe[2*li],vn=pe[2*li+1];pi>=A&&pi<=W&&vn>=F&&vn<=te&&ft.push(fe[li])}continue}let vr=ur+er>>1,kr=pe[2*vr],Dr=pe[2*vr+1];kr>=A&&kr<=W&&Dr>=F&&Dr<=te&&ft.push(fe[vr]),(Rt===0?A<=kr:F<=Dr)&&(Ke.push(ur),Ke.push(vr-1),Ke.push(1-Rt)),(Rt===0?W>=kr:te>=Dr)&&(Ke.push(vr+1),Ke.push(er),Ke.push(1-Rt))}return ft}within(A,F,W){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:te,coords:fe,nodeSize:pe}=this,Re=[0,te.length-1,0],Ke=[],ft=W*W;for(;Re.length;){let Rt=Re.pop()||0,er=Re.pop()||0,ur=Re.pop()||0;if(er-ur<=pe){for(let li=ur;li<=er;li++)r6(fe[2*li],fe[2*li+1],A,F)<=ft&&Ke.push(te[li]);continue}let vr=ur+er>>1,kr=fe[2*vr],Dr=fe[2*vr+1];r6(kr,Dr,A,F)<=ft&&Ke.push(te[vr]),(Rt===0?A-W<=kr:F-W<=Dr)&&(Re.push(ur),Re.push(vr-1),Re.push(1-Rt)),(Rt===0?A+W>=kr:F+W>=Dr)&&(Re.push(vr+1),Re.push(er),Re.push(1-Rt))}return Ke}}function Jw(R,A,F,W,te,fe){if(te-W<=F)return;let pe=W+te>>1;t6(R,A,pe,W,te,fe),Jw(R,A,F,W,pe-1,1-fe),Jw(R,A,F,pe+1,te,1-fe)}function t6(R,A,F,W,te,fe){for(;te>W;){if(te-W>600){let ft=te-W+1,Rt=F-W+1,er=Math.log(ft),ur=.5*Math.exp(2*er/3),vr=.5*Math.sqrt(er*ur*(ft-ur)/ft)*(Rt-ft/2<0?-1:1);t6(R,A,F,Math.max(W,Math.floor(F-Rt*ur/ft+vr)),Math.min(te,Math.floor(F+(ft-Rt)*ur/ft+vr)),fe)}let pe=A[2*F+fe],Re=W,Ke=te;for(cb(R,A,W,F),A[2*te+fe]>pe&&cb(R,A,W,te);Repe;)Ke--}A[2*W+fe]===pe?cb(R,A,W,Ke):(Ke++,cb(R,A,Ke,te)),Ke<=F&&(W=Ke+1),F<=Ke&&(te=Ke-1)}}function cb(R,A,F,W){MS(R,F,W),MS(A,2*F,2*W),MS(A,2*F+1,2*W+1)}function MS(R,A,F){let W=R[A];R[A]=R[F],R[F]=W}function r6(R,A,F,W){let te=R-F,fe=A-W;return te*te+fe*fe}var $w;i.bg=void 0,($w=i.bg||(i.bg={})).create="create",$w.load="load",$w.fullLoad="fullLoad";let fb=null,sh=[],ES=1e3/60,kS="loadTime",Qw="fullLoadTime",fq={mark(R){performance.mark(R)},frame(R){let A=R;fb!=null&&sh.push(A-fb),fb=A},clearMetrics(){fb=null,sh=[],performance.clearMeasures(kS),performance.clearMeasures(Qw);for(let R in i.bg)performance.clearMarks(i.bg[R])},getPerformanceMetrics(){performance.measure(kS,i.bg.create,i.bg.load),performance.measure(Qw,i.bg.create,i.bg.fullLoad);let R=performance.getEntriesByName(kS)[0].duration,A=performance.getEntriesByName(Qw)[0].duration,F=sh.length,W=1/(sh.reduce((fe,pe)=>fe+pe,0)/F/1e3),te=sh.filter(fe=>fe>ES).reduce((fe,pe)=>fe+(pe-ES)/ES,0);return{loadTime:R,fullLoadTime:A,fps:W,percentDroppedFrames:te/(F+te)*100,totalFrames:F}}};i.$=class extends Jt{},i.A=yi,i.B=dn,i.C=function(R){if(V==null){let A=R.navigator?R.navigator.userAgent:null;V=!!R.safari||!(!A||!(/\b(iPad|iPhone|iPod)\b/.test(A)||A.match("Safari")&&!A.match("Chrome")))}return V},i.D=Va,i.E=Pe,i.F=class{constructor(R,A){this.target=R,this.mapId=A,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new yS(()=>this.process()),this.subscription=function(F,W,te,fe){return F.addEventListener(W,te,!1),{unsubscribe:()=>{F.removeEventListener(W,te,!1)}}}(this.target,"message",F=>this.receive(F)),this.globalScope=q(self)?R:window}registerMessageHandler(R,A){this.messageHandlers[R]=A}sendAsync(R,A){return new Promise((F,W)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[te]={resolve:F,reject:W},A&&A.signal.addEventListener("abort",()=>{delete this.resolveRejects[te];let Re={id:te,type:"",origin:location.origin,targetMapId:R.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Re)},{once:!0});let fe=[],pe=Object.assign(Object.assign({},R),{id:te,sourceMapId:this.mapId,origin:location.origin,data:La(R.data,fe)});this.target.postMessage(pe,{transfer:fe})})}receive(R){let A=R.data,F=A.id;if(!(A.origin!=="file://"&&location.origin!=="file://"&&A.origin!=="resource://android"&&location.origin!=="resource://android"&&A.origin!==location.origin||A.targetMapId&&this.mapId!==A.targetMapId)){if(A.type===""){delete this.tasks[F];let W=this.abortControllers[F];return delete this.abortControllers[F],void(W&&W.abort())}if(q(self)||A.mustQueue)return this.tasks[F]=A,this.taskQueue.push(F),void this.invoker.trigger();this.processTask(F,A)}}process(){if(this.taskQueue.length===0)return;let R=this.taskQueue.shift(),A=this.tasks[R];delete this.tasks[R],this.taskQueue.length>0&&this.invoker.trigger(),A&&this.processTask(R,A)}processTask(R,A){return a(this,void 0,void 0,function*(){if(A.type===""){let te=this.resolveRejects[R];return delete this.resolveRejects[R],te?void(A.error?te.reject(Ua(A.error)):te.resolve(Ua(A.data))):void 0}if(!this.messageHandlers[A.type])return void this.completeTask(R,new Error(`Could not find a registered handler for ${A.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let F=Ua(A.data),W=new AbortController;this.abortControllers[R]=W;try{let te=yield this.messageHandlers[A.type](A.sourceMapId,F,W);this.completeTask(R,null,te)}catch(te){this.completeTask(R,te)}})}completeTask(R,A,F){let W=[];delete this.abortControllers[R];let te={id:R,type:"",sourceMapId:this.mapId,origin:location.origin,error:A?La(A):null,data:La(F,W)};this.target.postMessage(te,{transfer:W})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},i.G=Ce,i.H=function(){var R=new yi(16);return yi!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=0,R[12]=0,R[13]=0,R[14]=0),R[0]=1,R[5]=1,R[10]=1,R[15]=1,R},i.I=Uw,i.J=function(R,A,F){var W,te,fe,pe,Re,Ke,ft,Rt,er,ur,vr,kr,Dr=F[0],li=F[1],pi=F[2];return A===R?(R[12]=A[0]*Dr+A[4]*li+A[8]*pi+A[12],R[13]=A[1]*Dr+A[5]*li+A[9]*pi+A[13],R[14]=A[2]*Dr+A[6]*li+A[10]*pi+A[14],R[15]=A[3]*Dr+A[7]*li+A[11]*pi+A[15]):(te=A[1],fe=A[2],pe=A[3],Re=A[4],Ke=A[5],ft=A[6],Rt=A[7],er=A[8],ur=A[9],vr=A[10],kr=A[11],R[0]=W=A[0],R[1]=te,R[2]=fe,R[3]=pe,R[4]=Re,R[5]=Ke,R[6]=ft,R[7]=Rt,R[8]=er,R[9]=ur,R[10]=vr,R[11]=kr,R[12]=W*Dr+Re*li+er*pi+A[12],R[13]=te*Dr+Ke*li+ur*pi+A[13],R[14]=fe*Dr+ft*li+vr*pi+A[14],R[15]=pe*Dr+Rt*li+kr*pi+A[15]),R},i.K=function(R,A,F){var W=F[0],te=F[1],fe=F[2];return R[0]=A[0]*W,R[1]=A[1]*W,R[2]=A[2]*W,R[3]=A[3]*W,R[4]=A[4]*te,R[5]=A[5]*te,R[6]=A[6]*te,R[7]=A[7]*te,R[8]=A[8]*fe,R[9]=A[9]*fe,R[10]=A[10]*fe,R[11]=A[11]*fe,R[12]=A[12],R[13]=A[13],R[14]=A[14],R[15]=A[15],R},i.L=ui,i.M=function(R,A){let F={};for(let W=0;W{let A=window.document.createElement("video");return A.muted=!0,new Promise(F=>{A.onloadstart=()=>{F(A)};for(let W of R){let te=window.document.createElement("source");ke(W)||(A.crossOrigin="Anonymous"),te.src=W,A.appendChild(te)}})},i.a4=function(){return x++},i.a5=Ln,i.a6=R1,i.a7=Fc,i.a8=Sl,i.a9=bS,i.aA=function(R){if(R.type==="custom")return new mS(R);switch(R.type){case"background":return new iq(R);case"circle":return new fi(R);case"fill":return new _t(R);case"fill-extrusion":return new Lv(R);case"heatmap":return new sa(R);case"hillshade":return new Zs(R);case"line":return new dy(R);case"raster":return new ob(R);case"symbol":return new my(R)}},i.aB=g,i.aC=function(R,A){if(!R)return[{command:"setStyle",args:[A]}];let F=[];try{if(!mt(R.version,A.version))return[{command:"setStyle",args:[A]}];mt(R.center,A.center)||F.push({command:"setCenter",args:[A.center]}),mt(R.zoom,A.zoom)||F.push({command:"setZoom",args:[A.zoom]}),mt(R.bearing,A.bearing)||F.push({command:"setBearing",args:[A.bearing]}),mt(R.pitch,A.pitch)||F.push({command:"setPitch",args:[A.pitch]}),mt(R.sprite,A.sprite)||F.push({command:"setSprite",args:[A.sprite]}),mt(R.glyphs,A.glyphs)||F.push({command:"setGlyphs",args:[A.glyphs]}),mt(R.transition,A.transition)||F.push({command:"setTransition",args:[A.transition]}),mt(R.light,A.light)||F.push({command:"setLight",args:[A.light]}),mt(R.terrain,A.terrain)||F.push({command:"setTerrain",args:[A.terrain]}),mt(R.sky,A.sky)||F.push({command:"setSky",args:[A.sky]}),mt(R.projection,A.projection)||F.push({command:"setProjection",args:[A.projection]});let W={},te=[];(function(pe,Re,Ke,ft){let Rt;for(Rt in Re=Re||{},pe=pe||{})Object.prototype.hasOwnProperty.call(pe,Rt)&&(Object.prototype.hasOwnProperty.call(Re,Rt)||ct(Rt,Ke,ft));for(Rt in Re)Object.prototype.hasOwnProperty.call(Re,Rt)&&(Object.prototype.hasOwnProperty.call(pe,Rt)?mt(pe[Rt],Re[Rt])||(pe[Rt].type==="geojson"&&Re[Rt].type==="geojson"&&Vt(pe,Re,Rt)?Ht(Ke,{command:"setGeoJSONSourceData",args:[Rt,Re[Rt].data]}):ar(Rt,Re,Ke,ft)):at(Rt,Re,Ke))})(R.sources,A.sources,te,W);let fe=[];R.layers&&R.layers.forEach(pe=>{"source"in pe&&W[pe.source]?F.push({command:"removeLayer",args:[pe.id]}):fe.push(pe)}),F=F.concat(te),function(pe,Re,Ke){Re=Re||[];let ft=(pe=pe||[]).map(tt),Rt=Re.map(tt),er=pe.reduce(je,{}),ur=Re.reduce(je,{}),vr=ft.slice(),kr=Object.create(null),Dr,li,pi,vn,zi;for(let ln=0,Tn=0;ln@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(F,W,te,fe)=>{let pe=te||fe;return A[W]=!pe||pe.toLowerCase(),""}),A["max-age"]){let F=parseInt(A["max-age"],10);isNaN(F)?delete A["max-age"]:A["max-age"]=F}return A},i.ab=function(R,A){let F=[];for(let W in R)W in A||F.push(W);return F},i.ac=M,i.ad=function(R,A,F){var W=Math.sin(F),te=Math.cos(F),fe=A[0],pe=A[1],Re=A[2],Ke=A[3],ft=A[4],Rt=A[5],er=A[6],ur=A[7];return A!==R&&(R[8]=A[8],R[9]=A[9],R[10]=A[10],R[11]=A[11],R[12]=A[12],R[13]=A[13],R[14]=A[14],R[15]=A[15]),R[0]=fe*te+ft*W,R[1]=pe*te+Rt*W,R[2]=Re*te+er*W,R[3]=Ke*te+ur*W,R[4]=ft*te-fe*W,R[5]=Rt*te-pe*W,R[6]=er*te-Re*W,R[7]=ur*te-Ke*W,R},i.ae=function(R){var A=new yi(16);return A[0]=R[0],A[1]=R[1],A[2]=R[2],A[3]=R[3],A[4]=R[4],A[5]=R[5],A[6]=R[6],A[7]=R[7],A[8]=R[8],A[9]=R[9],A[10]=R[10],A[11]=R[11],A[12]=R[12],A[13]=R[13],A[14]=R[14],A[15]=R[15],A},i.af=qn,i.ag=function(R,A){let F=0,W=0;if(R.kind==="constant")W=R.layoutSize;else if(R.kind!=="source"){let{interpolationType:te,minZoom:fe,maxZoom:pe}=R,Re=te?M(ko.interpolationFactor(te,A,fe,pe),0,1):0;R.kind==="camera"?W=Lo.number(R.minSize,R.maxSize,Re):F=Re}return{uSizeT:F,uSize:W}},i.ai=function(R,{uSize:A,uSizeT:F},{lowerSize:W,upperSize:te}){return R.kind==="source"?W/v0:R.kind==="composite"?Lo.number(W/v0,te/v0,F):A},i.aj=dS,i.ak=function(R,A,F,W){let te=A.y-R.y,fe=A.x-R.x,pe=W.y-F.y,Re=W.x-F.x,Ke=pe*fe-Re*te;if(Ke===0)return null;let ft=(Re*(R.y-F.y)-pe*(R.x-F.x))/Ke;return new u(R.x+ft*fe,R.y+ft*te)},i.al=HC,i.am=Sc,i.an=Ii,i.ao=function(R){let A=1/0,F=1/0,W=-1/0,te=-1/0;for(let fe of R)A=Math.min(A,fe.x),F=Math.min(F,fe.y),W=Math.max(W,fe.x),te=Math.max(te,fe.y);return[A,F,W,te]},i.ap=tu,i.ar=hS,i.as=function(R,A){var F=A[0],W=A[1],te=A[2],fe=A[3],pe=A[4],Re=A[5],Ke=A[6],ft=A[7],Rt=A[8],er=A[9],ur=A[10],vr=A[11],kr=A[12],Dr=A[13],li=A[14],pi=A[15],vn=F*Re-W*pe,zi=F*Ke-te*pe,ln=F*ft-fe*pe,Tn=W*Ke-te*Re,pa=W*ft-fe*Re,ro=te*ft-fe*Ke,Vo=Rt*Dr-er*kr,Xa=Rt*li-ur*kr,la=Rt*pi-vr*kr,Mo=er*li-ur*Dr,fo=er*pi-vr*Dr,lo=ur*pi-vr*li,Wn=vn*lo-zi*fo+ln*Mo+Tn*la-pa*Xa+ro*Vo;return Wn?(R[0]=(Re*lo-Ke*fo+ft*Mo)*(Wn=1/Wn),R[1]=(te*fo-W*lo-fe*Mo)*Wn,R[2]=(Dr*ro-li*pa+pi*Tn)*Wn,R[3]=(ur*pa-er*ro-vr*Tn)*Wn,R[4]=(Ke*la-pe*lo-ft*Xa)*Wn,R[5]=(F*lo-te*la+fe*Xa)*Wn,R[6]=(li*ln-kr*ro-pi*zi)*Wn,R[7]=(Rt*ro-ur*ln+vr*zi)*Wn,R[8]=(pe*fo-Re*la+ft*Vo)*Wn,R[9]=(W*la-F*fo-fe*Vo)*Wn,R[10]=(kr*pa-Dr*ln+pi*vn)*Wn,R[11]=(er*ln-Rt*pa-vr*vn)*Wn,R[12]=(Re*Xa-pe*Mo-Ke*Vo)*Wn,R[13]=(F*Mo-W*Xa+te*Vo)*Wn,R[14]=(Dr*zi-kr*Tn-li*vn)*Wn,R[15]=(Rt*Tn-er*zi+ur*vn)*Wn,R):null},i.at=AS,i.au=jw,i.av=SS,i.aw=function(){let R={},A=ce.$version;for(let F in ce.$root){let W=ce.$root[F];if(W.required){let te=null;te=F==="version"?A:W.type==="array"?[]:{},te!=null&&(R[F]=te)}}return R},i.ax=Zn,i.ay=re,i.az=function(R){R=R.slice();let A=Object.create(null);for(let F=0;F25||W<0||W>=1||F<0||F>=1)},i.bc=function(R,A){return R[0]=A[0],R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=A[1],R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=A[2],R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R},i.bd=class extends Mt{},i.be=_S,i.bf=fq,i.bh=ge,i.bi=function(R,A){_e.REGISTERED_PROTOCOLS[R]=A},i.bj=function(R){delete _e.REGISTERED_PROTOCOLS[R]},i.bk=function(R,A){let F={};for(let te=0;telo*tu)}let Xa=pe?"center":F.get("text-justify").evaluate(ft,{},R.canonical),la=F.get("symbol-placement")==="point"?F.get("text-max-width").evaluate(ft,{},R.canonical)*tu:1/0,Mo=()=>{R.bucket.allowVerticalPlacement&&Ka(ln)&&(kr.vertical=eb(Dr,R.glyphMap,R.glyphPositions,R.imagePositions,Rt,la,fe,ro,"left",pa,pi,i.ah.vertical,!0,ur,er))};if(!pe&&Vo){let fo=new Set;if(Xa==="auto")for(let Wn=0;Wna(void 0,void 0,void 0,function*(){if(R.byteLength===0)return createImageBitmap(new ImageData(1,1));let A=new Blob([new Uint8Array(R)],{type:"image/png"});try{return createImageBitmap(A)}catch(F){throw new Error(`Could not load image because of ${F.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),i.e=L,i.f=R=>new Promise((A,F)=>{let W=new Image;W.onload=()=>{A(W),URL.revokeObjectURL(W.src),W.onload=null,window.requestAnimationFrame(()=>{W.src=Z})},W.onerror=()=>F(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."));let te=new Blob([new Uint8Array(R)],{type:"image/png"});W.src=R.byteLength?URL.createObjectURL(te):Z}),i.g=Ee,i.h=(R,A)=>Se(L(R,{type:"json"}),A),i.i=q,i.j=me,i.k=Le,i.l=(R,A)=>Se(L(R,{type:"arrayBuffer"}),A),i.m=Se,i.n=function(R){return new uS(R).readFields(BQ,[])},i.o=aa,i.p=fS,i.q=ue,i.r=Wi,i.s=ke,i.t=Yi,i.u=Mi,i.v=ce,i.w=E,i.x=function([R,A,F]){return A+=90,A*=Math.PI/180,F*=Math.PI/180,{x:R*Math.cos(A)*Math.sin(F),y:R*Math.sin(A)*Math.sin(F),z:R*Math.cos(F)}},i.y=Lo,i.z=rs}),r("worker",["./shared"],function(i){"use strict";class a{constructor(Ge){this.keyCache={},Ge&&this.replace(Ge)}replace(Ge){this._layerConfigs={},this._layers={},this.update(Ge,[])}update(Ge,Je){for(let et of Ge){this._layerConfigs[et.id]=et;let xt=this._layers[et.id]=i.aA(et);xt._featureFilter=i.a7(xt.filter),this.keyCache[et.id]&&delete this.keyCache[et.id]}for(let et of Je)delete this.keyCache[et],delete this._layerConfigs[et],delete this._layers[et];this.familiesBySource={};let We=i.bk(Object.values(this._layerConfigs),this.keyCache);for(let et of We){let xt=et.map(Ir=>this._layers[Ir.id]),At=xt[0];if(At.visibility==="none")continue;let Kt=At.source||"",Qt=this.familiesBySource[Kt];Qt||(Qt=this.familiesBySource[Kt]={});let Mr=At.sourceLayer||"_geojsonTileLayer",Gr=Qt[Mr];Gr||(Gr=Qt[Mr]=[]),Gr.push(xt)}}}class o{constructor(Ge){let Je={},We=[];for(let Kt in Ge){let Qt=Ge[Kt],Mr=Je[Kt]={};for(let Gr in Qt){let Ir=Qt[+Gr];if(!Ir||Ir.bitmap.width===0||Ir.bitmap.height===0)continue;let Yr={x:0,y:0,w:Ir.bitmap.width+2,h:Ir.bitmap.height+2};We.push(Yr),Mr[Gr]={rect:Yr,metrics:Ir.metrics}}}let{w:et,h:xt}=i.p(We),At=new i.o({width:et||1,height:xt||1});for(let Kt in Ge){let Qt=Ge[Kt];for(let Mr in Qt){let Gr=Qt[+Mr];if(!Gr||Gr.bitmap.width===0||Gr.bitmap.height===0)continue;let Ir=Je[Kt][Mr].rect;i.o.copy(Gr.bitmap,At,{x:0,y:0},{x:Ir.x+1,y:Ir.y+1},Gr.bitmap)}}this.image=At,this.positions=Je}}i.bl("GlyphAtlas",o);class s{constructor(Ge){this.tileID=new i.S(Ge.tileID.overscaledZ,Ge.tileID.wrap,Ge.tileID.canonical.z,Ge.tileID.canonical.x,Ge.tileID.canonical.y),this.uid=Ge.uid,this.zoom=Ge.zoom,this.pixelRatio=Ge.pixelRatio,this.tileSize=Ge.tileSize,this.source=Ge.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ge.showCollisionBoxes,this.collectResourceTiming=!!Ge.collectResourceTiming,this.returnDependencies=!!Ge.returnDependencies,this.promoteId=Ge.promoteId,this.inFlightDependencies=[]}parse(Ge,Je,We,et){return i._(this,void 0,void 0,function*(){this.status="parsing",this.data=Ge,this.collisionBoxArray=new i.a5;let xt=new i.bm(Object.keys(Ge.layers).sort()),At=new i.bn(this.tileID,this.promoteId);At.bucketLayerIDs=[];let Kt={},Qt={featureIndex:At,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:We},Mr=Je.familiesBySource[this.source];for(let Qn in Mr){let Vi=Ge.layers[Qn];if(!Vi)continue;Vi.version===1&&i.w(`Vector tile source "${this.source}" layer "${Qn}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let Kn=xt.encode(Qn),Jn=[];for(let Gt=0;Gt=wt.maxzoom||wt.visibility!=="none"&&(l(Gt,this.zoom,We),(Kt[wt.id]=wt.createBucket({index:At.bucketLayerIDs.length,layers:Gt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Kn,sourceID:this.source})).populate(Jn,Qt,this.tileID.canonical),At.bucketLayerIDs.push(Gt.map(tr=>tr.id)))}}let Gr=i.aF(Qt.glyphDependencies,Qn=>Object.keys(Qn).map(Number));this.inFlightDependencies.forEach(Qn=>Qn==null?void 0:Qn.abort()),this.inFlightDependencies=[];let Ir=Promise.resolve({});if(Object.keys(Gr).length){let Qn=new AbortController;this.inFlightDependencies.push(Qn),Ir=et.sendAsync({type:"GG",data:{stacks:Gr,source:this.source,tileID:this.tileID,type:"glyphs"}},Qn)}let Yr=Object.keys(Qt.iconDependencies),_i=Promise.resolve({});if(Yr.length){let Qn=new AbortController;this.inFlightDependencies.push(Qn),_i=et.sendAsync({type:"GI",data:{icons:Yr,source:this.source,tileID:this.tileID,type:"icons"}},Qn)}let Pi=Object.keys(Qt.patternDependencies),ai=Promise.resolve({});if(Pi.length){let Qn=new AbortController;this.inFlightDependencies.push(Qn),ai=et.sendAsync({type:"GI",data:{icons:Pi,source:this.source,tileID:this.tileID,type:"patterns"}},Qn)}let[mi,un,Fn]=yield Promise.all([Ir,_i,ai]),An=new o(mi),Hn=new i.bo(un,Fn);for(let Qn in Kt){let Vi=Kt[Qn];Vi instanceof i.a6?(l(Vi.layers,this.zoom,We),i.bp({bucket:Vi,glyphMap:mi,glyphPositions:An.positions,imageMap:un,imagePositions:Hn.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Vi.hasPattern&&(Vi instanceof i.bq||Vi instanceof i.br||Vi instanceof i.bs)&&(l(Vi.layers,this.zoom,We),Vi.addFeatures(Qt,this.tileID.canonical,Hn.patternPositions))}return this.status="done",{buckets:Object.values(Kt).filter(Qn=>!Qn.isEmpty()),featureIndex:At,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:An.image,imageAtlas:Hn,glyphMap:this.returnDependencies?mi:null,iconMap:this.returnDependencies?un:null,glyphPositions:this.returnDependencies?An.positions:null}})}}function l(gt,Ge,Je){let We=new i.z(Ge);for(let et of gt)et.recalculate(We,Je)}class u{constructor(Ge,Je,We){this.actor=Ge,this.layerIndex=Je,this.availableImages=We,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Ge,Je){return i._(this,void 0,void 0,function*(){let We=yield i.l(Ge.request,Je);try{return{vectorTile:new i.bt.VectorTile(new i.bu(We.data)),rawData:We.data,cacheControl:We.cacheControl,expires:We.expires}}catch(et){let xt=new Uint8Array(We.data),At=`Unable to parse the tile at ${Ge.request.url}, `;throw At+=xt[0]===31&&xt[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${et.message}`,new Error(At)}})}loadTile(Ge){return i._(this,void 0,void 0,function*(){let Je=Ge.uid,We=!!(Ge&&Ge.request&&Ge.request.collectResourceTiming)&&new i.bv(Ge.request),et=new s(Ge);this.loading[Je]=et;let xt=new AbortController;et.abort=xt;try{let At=yield this.loadVectorTile(Ge,xt);if(delete this.loading[Je],!At)return null;let Kt=At.rawData,Qt={};At.expires&&(Qt.expires=At.expires),At.cacheControl&&(Qt.cacheControl=At.cacheControl);let Mr={};if(We){let Ir=We.finish();Ir&&(Mr.resourceTiming=JSON.parse(JSON.stringify(Ir)))}et.vectorTile=At.vectorTile;let Gr=et.parse(At.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Je]=et,this.fetching[Je]={rawTileData:Kt,cacheControl:Qt,resourceTiming:Mr};try{let Ir=yield Gr;return i.e({rawTileData:Kt.slice(0)},Ir,Qt,Mr)}finally{delete this.fetching[Je]}}catch(At){throw delete this.loading[Je],et.status="done",this.loaded[Je]=et,At}})}reloadTile(Ge){return i._(this,void 0,void 0,function*(){let Je=Ge.uid;if(!this.loaded||!this.loaded[Je])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let We=this.loaded[Je];if(We.showCollisionBoxes=Ge.showCollisionBoxes,We.status==="parsing"){let et=yield We.parse(We.vectorTile,this.layerIndex,this.availableImages,this.actor),xt;if(this.fetching[Je]){let{rawTileData:At,cacheControl:Kt,resourceTiming:Qt}=this.fetching[Je];delete this.fetching[Je],xt=i.e({rawTileData:At.slice(0)},et,Kt,Qt)}else xt=et;return xt}if(We.status==="done"&&We.vectorTile)return We.parse(We.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Ge){return i._(this,void 0,void 0,function*(){let Je=this.loading,We=Ge.uid;Je&&Je[We]&&Je[We].abort&&(Je[We].abort.abort(),delete Je[We])})}removeTile(Ge){return i._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Ge.uid]&&delete this.loaded[Ge.uid]})}}class c{constructor(){this.loaded={}}loadTile(Ge){return i._(this,void 0,void 0,function*(){let{uid:Je,encoding:We,rawImageData:et,redFactor:xt,greenFactor:At,blueFactor:Kt,baseShift:Qt}=Ge,Mr=et.width+2,Gr=et.height+2,Ir=i.b(et)?new i.R({width:Mr,height:Gr},yield i.bw(et,-1,-1,Mr,Gr)):et,Yr=new i.bx(Je,Ir,We,xt,At,Kt,Qt);return this.loaded=this.loaded||{},this.loaded[Je]=Yr,Yr})}removeTile(Ge){let Je=this.loaded,We=Ge.uid;Je&&Je[We]&&delete Je[We]}}function f(gt,Ge){if(gt.length!==0){h(gt[0],Ge);for(var Je=1;Je=Math.abs(Kt)?Je-Qt+Kt:Kt-Qt+Je,Je=Qt}Je+We>=0!=!!Ge&>.reverse()}var d=i.by(function gt(Ge,Je){var We,et=Ge&&Ge.type;if(et==="FeatureCollection")for(We=0;We>31}function q(gt,Ge){for(var Je=gt.loadGeometry(),We=gt.type,et=0,xt=0,At=Je.length,Kt=0;Ktgt},j=Math.fround||(N=new Float32Array(1),gt=>(N[0]=+gt,N[0]));var N;let H=3,ie=5,ae=6;class _e{constructor(Ge){this.options=Object.assign(Object.create(Z),Ge),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Ge){let{log:Je,minZoom:We,maxZoom:et}=this.options;Je&&console.time("total time");let xt=`prepare ${Ge.length} points`;Je&&console.time(xt),this.points=Ge;let At=[];for(let Qt=0;Qt=We;Qt--){let Mr=+Date.now();Kt=this.trees[Qt]=this._createTree(this._cluster(Kt,Qt)),Je&&console.log("z%d: %d clusters in %dms",Qt,Kt.numItems,+Date.now()-Mr)}return Je&&console.timeEnd("total time"),this}getClusters(Ge,Je){let We=((Ge[0]+180)%360+360)%360-180,et=Math.max(-90,Math.min(90,Ge[1])),xt=Ge[2]===180?180:((Ge[2]+180)%360+360)%360-180,At=Math.max(-90,Math.min(90,Ge[3]));if(Ge[2]-Ge[0]>=360)We=-180,xt=180;else if(We>xt){let Ir=this.getClusters([We,et,180,At],Je),Yr=this.getClusters([-180,et,xt,At],Je);return Ir.concat(Yr)}let Kt=this.trees[this._limitZoom(Je)],Qt=Kt.range(ge(We),re(At),ge(xt),re(et)),Mr=Kt.data,Gr=[];for(let Ir of Qt){let Yr=this.stride*Ir;Gr.push(Mr[Yr+ie]>1?Ee(Mr,Yr,this.clusterProps):this.points[Mr[Yr+H]])}return Gr}getChildren(Ge){let Je=this._getOriginId(Ge),We=this._getOriginZoom(Ge),et="No cluster with the specified id.",xt=this.trees[We];if(!xt)throw new Error(et);let At=xt.data;if(Je*this.stride>=At.length)throw new Error(et);let Kt=this.options.radius/(this.options.extent*Math.pow(2,We-1)),Qt=xt.within(At[Je*this.stride],At[Je*this.stride+1],Kt),Mr=[];for(let Gr of Qt){let Ir=Gr*this.stride;At[Ir+4]===Ge&&Mr.push(At[Ir+ie]>1?Ee(At,Ir,this.clusterProps):this.points[At[Ir+H]])}if(Mr.length===0)throw new Error(et);return Mr}getLeaves(Ge,Je,We){let et=[];return this._appendLeaves(et,Ge,Je=Je||10,We=We||0,0),et}getTile(Ge,Je,We){let et=this.trees[this._limitZoom(Ge)],xt=Math.pow(2,Ge),{extent:At,radius:Kt}=this.options,Qt=Kt/At,Mr=(We-Qt)/xt,Gr=(We+1+Qt)/xt,Ir={features:[]};return this._addTileFeatures(et.range((Je-Qt)/xt,Mr,(Je+1+Qt)/xt,Gr),et.data,Je,We,xt,Ir),Je===0&&this._addTileFeatures(et.range(1-Qt/xt,Mr,1,Gr),et.data,xt,We,xt,Ir),Je===xt-1&&this._addTileFeatures(et.range(0,Mr,Qt/xt,Gr),et.data,-1,We,xt,Ir),Ir.features.length?Ir:null}getClusterExpansionZoom(Ge){let Je=this._getOriginZoom(Ge)-1;for(;Je<=this.options.maxZoom;){let We=this.getChildren(Ge);if(Je++,We.length!==1)break;Ge=We[0].properties.cluster_id}return Je}_appendLeaves(Ge,Je,We,et,xt){let At=this.getChildren(Je);for(let Kt of At){let Qt=Kt.properties;if(Qt&&Qt.cluster?xt+Qt.point_count<=et?xt+=Qt.point_count:xt=this._appendLeaves(Ge,Qt.cluster_id,We,et,xt):xt1,Gr,Ir,Yr;if(Mr)Gr=Ce(Je,Qt,this.clusterProps),Ir=Je[Qt],Yr=Je[Qt+1];else{let ai=this.points[Je[Qt+H]];Gr=ai.properties;let[mi,un]=ai.geometry.coordinates;Ir=ge(mi),Yr=re(un)}let _i={type:1,geometry:[[Math.round(this.options.extent*(Ir*xt-We)),Math.round(this.options.extent*(Yr*xt-et))]],tags:Gr},Pi;Pi=Mr||this.options.generateId?Je[Qt+H]:this.points[Je[Qt+H]].id,Pi!==void 0&&(_i.id=Pi),At.features.push(_i)}}_limitZoom(Ge){return Math.max(this.options.minZoom,Math.min(Math.floor(+Ge),this.options.maxZoom+1))}_cluster(Ge,Je){let{radius:We,extent:et,reduce:xt,minPoints:At}=this.options,Kt=We/(et*Math.pow(2,Je)),Qt=Ge.data,Mr=[],Gr=this.stride;for(let Ir=0;IrJe&&(mi+=Qt[Fn+ie])}if(mi>ai&&mi>=At){let un,Fn=Yr*ai,An=_i*ai,Hn=-1,Qn=((Ir/Gr|0)<<5)+(Je+1)+this.points.length;for(let Vi of Pi){let Kn=Vi*Gr;if(Qt[Kn+2]<=Je)continue;Qt[Kn+2]=Je;let Jn=Qt[Kn+ie];Fn+=Qt[Kn]*Jn,An+=Qt[Kn+1]*Jn,Qt[Kn+4]=Qn,xt&&(un||(un=this._map(Qt,Ir,!0),Hn=this.clusterProps.length,this.clusterProps.push(un)),xt(un,this._map(Qt,Kn)))}Qt[Ir+4]=Qn,Mr.push(Fn/mi,An/mi,1/0,Qn,-1,mi),xt&&Mr.push(Hn)}else{for(let un=0;un1)for(let un of Pi){let Fn=un*Gr;if(!(Qt[Fn+2]<=Je)){Qt[Fn+2]=Je;for(let An=0;An>5}_getOriginZoom(Ge){return(Ge-this.points.length)%32}_map(Ge,Je,We){if(Ge[Je+ie]>1){let At=this.clusterProps[Ge[Je+ae]];return We?Object.assign({},At):At}let et=this.points[Ge[Je+H]].properties,xt=this.options.map(et);return We&&xt===et?Object.assign({},xt):xt}}function Ee(gt,Ge,Je){return{type:"Feature",id:gt[Ge+H],properties:Ce(gt,Ge,Je),geometry:{type:"Point",coordinates:[(We=gt[Ge],360*(We-.5)),Se(gt[Ge+1])]}};var We}function Ce(gt,Ge,Je){let We=gt[Ge+ie],et=We>=1e4?`${Math.round(We/1e3)}k`:We>=1e3?Math.round(We/100)/10+"k":We,xt=gt[Ge+ae],At=xt===-1?{}:Object.assign({},Je[xt]);return Object.assign(At,{cluster:!0,cluster_id:gt[Ge+H],point_count:We,point_count_abbreviated:et})}function ge(gt){return gt/360+.5}function re(gt){let Ge=Math.sin(gt*Math.PI/180),Je=.5-.25*Math.log((1+Ge)/(1-Ge))/Math.PI;return Je<0?0:Je>1?1:Je}function Se(gt){let Ge=(180-360*gt)*Math.PI/180;return 360*Math.atan(Math.exp(Ge))/Math.PI-90}function ke(gt,Ge,Je,We){let et=We,xt=Ge+(Je-Ge>>1),At,Kt=Je-Ge,Qt=gt[Ge],Mr=gt[Ge+1],Gr=gt[Je],Ir=gt[Je+1];for(let Yr=Ge+3;Yret)At=Yr,et=_i;else if(_i===et){let Pi=Math.abs(Yr-xt);PiWe&&(At-Ge>3&&ke(gt,Ge,At,We),gt[At+2]=et,Je-At>3&&ke(gt,At,Je,We))}function be(gt,Ge,Je,We,et,xt){let At=et-Je,Kt=xt-We;if(At!==0||Kt!==0){let Qt=((gt-Je)*At+(Ge-We)*Kt)/(At*At+Kt*Kt);Qt>1?(Je=et,We=xt):Qt>0&&(Je+=At*Qt,We+=Kt*Qt)}return At=gt-Je,Kt=Ge-We,At*At+Kt*Kt}function Be(gt,Ge,Je,We){let et={id:gt==null?null:gt,type:Ge,geometry:Je,tags:We,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Ge==="Point"||Ge==="MultiPoint"||Ge==="LineString")Le(et,Je);else if(Ge==="Polygon")Le(et,Je[0]);else if(Ge==="MultiLineString")for(let xt of Je)Le(et,xt);else if(Ge==="MultiPolygon")for(let xt of Je)Le(et,xt[0]);return et}function Le(gt,Ge){for(let Je=0;Je0&&(At+=We?(et*Gr-Mr*xt)/2:Math.sqrt(Math.pow(Mr-et,2)+Math.pow(Gr-xt,2))),et=Mr,xt=Gr}let Kt=Ge.length-3;Ge[2]=1,ke(Ge,0,Kt,Je),Ge[Kt+2]=1,Ge.size=Math.abs(At),Ge.start=0,Ge.end=Ge.size}function He(gt,Ge,Je,We){for(let et=0;et1?1:Je}function Ht(gt,Ge,Je,We,et,xt,At,Kt){if(We/=Ge,xt>=(Je/=Ge)&&At=We)return null;let Qt=[];for(let Mr of gt){let Gr=Mr.geometry,Ir=Mr.type,Yr=et===0?Mr.minX:Mr.minY,_i=et===0?Mr.maxX:Mr.maxY;if(Yr>=Je&&_i=We)continue;let Pi=[];if(Ir==="Point"||Ir==="MultiPoint")at(Gr,Pi,Je,We,et);else if(Ir==="LineString")ct(Gr,Pi,Je,We,et,!1,Kt.lineMetrics);else if(Ir==="MultiLineString")Vt(Gr,Pi,Je,We,et,!1);else if(Ir==="Polygon")Vt(Gr,Pi,Je,We,et,!0);else if(Ir==="MultiPolygon")for(let ai of Gr){let mi=[];Vt(ai,mi,Je,We,et,!0),mi.length&&Pi.push(mi)}if(Pi.length){if(Kt.lineMetrics&&Ir==="LineString"){for(let ai of Pi)Qt.push(Be(Mr.id,Ir,ai,Mr.tags));continue}Ir!=="LineString"&&Ir!=="MultiLineString"||(Pi.length===1?(Ir="LineString",Pi=Pi[0]):Ir="MultiLineString"),Ir!=="Point"&&Ir!=="MultiPoint"||(Ir=Pi.length===3?"Point":"MultiPoint"),Qt.push(Be(Mr.id,Ir,Pi,Mr.tags))}}return Qt.length?Qt:null}function at(gt,Ge,Je,We,et){for(let xt=0;xt=Je&&At<=We&&rr(Ge,gt[xt],gt[xt+1],gt[xt+2])}}function ct(gt,Ge,Je,We,et,xt,At){let Kt=ar(gt),Qt=et===0?tt:je,Mr,Gr,Ir=gt.start;for(let mi=0;miJe&&(Gr=Qt(Kt,un,Fn,Hn,Qn,Je),At&&(Kt.start=Ir+Mr*Gr)):Vi>We?Kn=Je&&(Gr=Qt(Kt,un,Fn,Hn,Qn,Je),Jn=!0),Kn>We&&Vi<=We&&(Gr=Qt(Kt,un,Fn,Hn,Qn,We),Jn=!0),!xt&&Jn&&(At&&(Kt.end=Ir+Mr*Gr),Ge.push(Kt),Kt=ar(gt)),At&&(Ir+=Mr)}let Yr=gt.length-3,_i=gt[Yr],Pi=gt[Yr+1],ai=et===0?_i:Pi;ai>=Je&&ai<=We&&rr(Kt,_i,Pi,gt[Yr+2]),Yr=Kt.length-3,xt&&Yr>=3&&(Kt[Yr]!==Kt[0]||Kt[Yr+1]!==Kt[1])&&rr(Kt,Kt[0],Kt[1],Kt[2]),Kt.length&&Ge.push(Kt)}function ar(gt){let Ge=[];return Ge.size=gt.size,Ge.start=gt.start,Ge.end=gt.end,Ge}function Vt(gt,Ge,Je,We,et,xt){for(let At of gt)ct(At,Ge,Je,We,et,xt,!1)}function rr(gt,Ge,Je,We){gt.push(Ge,Je,We)}function tt(gt,Ge,Je,We,et,xt){let At=(xt-Ge)/(We-Ge);return rr(gt,xt,Je+(et-Je)*At,1),At}function je(gt,Ge,Je,We,et,xt){let At=(xt-Je)/(et-Je);return rr(gt,Ge+(We-Ge)*At,xt,1),At}function Ue(gt,Ge){let Je=[];for(let We=0;We0&&Ge.size<(et?At:We))return void(Je.numPoints+=Ge.length/3);let Kt=[];for(let Qt=0;QtAt)&&(Je.numSimplified++,Kt.push(Ge[Qt],Ge[Qt+1])),Je.numPoints++;et&&function(Qt,Mr){let Gr=0;for(let Ir=0,Yr=Qt.length,_i=Yr-2;Ir0===Mr)for(let Ir=0,Yr=Qt.length;Ir24)throw new Error("maxZoom should be in the 0-24 range");if(Je.promoteId&&Je.generateId)throw new Error("promoteId and generateId cannot be used together.");let et=function(xt,At){let Kt=[];if(xt.type==="FeatureCollection")for(let Qt=0;Qt1&&console.time("creation"),_i=this.tiles[Yr]=Tt(Ge,Je,We,et,Mr),this.tileCoords.push({z:Je,x:We,y:et}),Gr)){Gr>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Je,We,et,_i.numFeatures,_i.numPoints,_i.numSimplified),console.timeEnd("creation"));let Jn=`z${Je}`;this.stats[Jn]=(this.stats[Jn]||0)+1,this.total++}if(_i.source=Ge,xt==null){if(Je===Mr.indexMaxZoom||_i.numPoints<=Mr.indexMaxPoints)continue}else{if(Je===Mr.maxZoom||Je===xt)continue;if(xt!=null){let Jn=xt-Je;if(We!==At>>Jn||et!==Kt>>Jn)continue}}if(_i.source=null,Ge.length===0)continue;Gr>1&&console.time("clipping");let Pi=.5*Mr.buffer/Mr.extent,ai=.5-Pi,mi=.5+Pi,un=1+Pi,Fn=null,An=null,Hn=null,Qn=null,Vi=Ht(Ge,Ir,We-Pi,We+mi,0,_i.minX,_i.maxX,Mr),Kn=Ht(Ge,Ir,We+ai,We+un,0,_i.minX,_i.maxX,Mr);Ge=null,Vi&&(Fn=Ht(Vi,Ir,et-Pi,et+mi,1,_i.minY,_i.maxY,Mr),An=Ht(Vi,Ir,et+ai,et+un,1,_i.minY,_i.maxY,Mr),Vi=null),Kn&&(Hn=Ht(Kn,Ir,et-Pi,et+mi,1,_i.minY,_i.maxY,Mr),Qn=Ht(Kn,Ir,et+ai,et+un,1,_i.minY,_i.maxY,Mr),Kn=null),Gr>1&&console.timeEnd("clipping"),Qt.push(Fn||[],Je+1,2*We,2*et),Qt.push(An||[],Je+1,2*We,2*et+1),Qt.push(Hn||[],Je+1,2*We+1,2*et),Qt.push(Qn||[],Je+1,2*We+1,2*et+1)}}getTile(Ge,Je,We){Ge=+Ge,Je=+Je,We=+We;let et=this.options,{extent:xt,debug:At}=et;if(Ge<0||Ge>24)return null;let Kt=1<1&&console.log("drilling down to z%d-%d-%d",Ge,Je,We);let Mr,Gr=Ge,Ir=Je,Yr=We;for(;!Mr&&Gr>0;)Gr--,Ir>>=1,Yr>>=1,Mr=this.tiles[or(Gr,Ir,Yr)];return Mr&&Mr.source?(At>1&&(console.log("found parent tile z%d-%d-%d",Gr,Ir,Yr),console.time("drilling down")),this.splitTile(Mr.source,Gr,Ir,Yr,Ge,Je,We),At>1&&console.timeEnd("drilling down"),this.tiles[Qt]?rt(this.tiles[Qt],xt):null):null}}function or(gt,Ge,Je){return 32*((1<{Ir.properties=_i;let Pi={};for(let ai of Yr)Pi[ai]=Qt[ai].evaluate(Gr,Ir);return Pi},At.reduce=(_i,Pi)=>{Ir.properties=Pi;for(let ai of Yr)Gr.accumulated=_i[ai],_i[ai]=Mr[ai].evaluate(Gr,Ir)},At}(Ge)).load((yield this._pendingData).features):(et=yield this._pendingData,new jt(et,Ge.geojsonVtOptions)),this.loaded={};let xt={};if(We){let At=We.finish();At&&(xt.resourceTiming={},xt.resourceTiming[Ge.source]=JSON.parse(JSON.stringify(At)))}return xt}catch(xt){if(delete this._pendingRequest,i.bB(xt))return{abandoned:!0};throw xt}var et})}getData(){return i._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Ge){let Je=this.loaded;return Je&&Je[Ge.uid]?super.reloadTile(Ge):this.loadTile(Ge)}loadAndProcessGeoJSON(Ge,Je){return i._(this,void 0,void 0,function*(){let We=yield this.loadGeoJSON(Ge,Je);if(delete this._pendingRequest,typeof We!="object")throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`);if(d(We,!0),Ge.filter){let et=i.bC(Ge.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(et.result==="error")throw new Error(et.value.map(At=>`${At.key}: ${At.message}`).join(", "));We={type:"FeatureCollection",features:We.features.filter(At=>et.value.evaluate({zoom:0},At))}}return We})}loadGeoJSON(Ge,Je){return i._(this,void 0,void 0,function*(){let{promoteId:We}=Ge;if(Ge.request){let et=yield i.h(Ge.request,Je);return this._dataUpdateable=Ar(et.data,We)?ei(et.data,We):void 0,et.data}if(typeof Ge.data=="string")try{let et=JSON.parse(Ge.data);return this._dataUpdateable=Ar(et,We)?ei(et,We):void 0,et}catch(et){throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`)}if(!Ge.dataDiff)throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Ge.source}`);return function(et,xt,At){var Kt,Qt,Mr,Gr;if(xt.removeAll&&et.clear(),xt.remove)for(let Ir of xt.remove)et.delete(Ir);if(xt.add)for(let Ir of xt.add){let Yr=mr(Ir,At);Yr!=null&&et.set(Yr,Ir)}if(xt.update)for(let Ir of xt.update){let Yr=et.get(Ir.id);if(Yr==null)continue;let _i=!Ir.removeAllProperties&&(((Kt=Ir.removeProperties)===null||Kt===void 0?void 0:Kt.length)>0||((Qt=Ir.addOrUpdateProperties)===null||Qt===void 0?void 0:Qt.length)>0);if((Ir.newGeometry||Ir.removeAllProperties||_i)&&(Yr=Object.assign({},Yr),et.set(Ir.id,Yr),_i&&(Yr.properties=Object.assign({},Yr.properties))),Ir.newGeometry&&(Yr.geometry=Ir.newGeometry),Ir.removeAllProperties)Yr.properties={};else if(((Mr=Ir.removeProperties)===null||Mr===void 0?void 0:Mr.length)>0)for(let Pi of Ir.removeProperties)Object.prototype.hasOwnProperty.call(Yr.properties,Pi)&&delete Yr.properties[Pi];if(((Gr=Ir.addOrUpdateProperties)===null||Gr===void 0?void 0:Gr.length)>0)for(let{key:Pi,value:ai}of Ir.addOrUpdateProperties)Yr.properties[Pi]=ai}}(this._dataUpdateable,Ge.dataDiff,We),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Ge){return i._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Ge){return this._geoJSONIndex.getClusterExpansionZoom(Ge.clusterId)}getClusterChildren(Ge){return this._geoJSONIndex.getChildren(Ge.clusterId)}getClusterLeaves(Ge){return this._geoJSONIndex.getLeaves(Ge.clusterId,Ge.limit,Ge.offset)}}class jr{constructor(Ge){this.self=Ge,this.actor=new i.F(Ge),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Je,We)=>{if(this.externalWorkerSourceTypes[Je])throw new Error(`Worker source with name "${Je}" already registered.`);this.externalWorkerSourceTypes[Je]=We},this.self.addProtocol=i.bi,this.self.removeProtocol=i.bj,this.self.registerRTLTextPlugin=Je=>{if(i.bD.isParsed())throw new Error("RTL text plugin already registered.");i.bD.setMethods(Je)},this.actor.registerMessageHandler("LDT",(Je,We)=>this._getDEMWorkerSource(Je,We.source).loadTile(We)),this.actor.registerMessageHandler("RDT",(Je,We)=>i._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Je,We.source).removeTile(We)})),this.actor.registerMessageHandler("GCEZ",(Je,We)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,We.type,We.source).getClusterExpansionZoom(We)})),this.actor.registerMessageHandler("GCC",(Je,We)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,We.type,We.source).getClusterChildren(We)})),this.actor.registerMessageHandler("GCL",(Je,We)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,We.type,We.source).getClusterLeaves(We)})),this.actor.registerMessageHandler("LD",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).loadData(We)),this.actor.registerMessageHandler("GD",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).getData()),this.actor.registerMessageHandler("LT",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).loadTile(We)),this.actor.registerMessageHandler("RT",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).reloadTile(We)),this.actor.registerMessageHandler("AT",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).abortTile(We)),this.actor.registerMessageHandler("RMT",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).removeTile(We)),this.actor.registerMessageHandler("RS",(Je,We)=>i._(this,void 0,void 0,function*(){if(!this.workerSources[Je]||!this.workerSources[Je][We.type]||!this.workerSources[Je][We.type][We.source])return;let et=this.workerSources[Je][We.type][We.source];delete this.workerSources[Je][We.type][We.source],et.removeSource!==void 0&&et.removeSource(We)})),this.actor.registerMessageHandler("RM",Je=>i._(this,void 0,void 0,function*(){delete this.layerIndexes[Je],delete this.availableImages[Je],delete this.workerSources[Je],delete this.demWorkerSources[Je]})),this.actor.registerMessageHandler("SR",(Je,We)=>i._(this,void 0,void 0,function*(){this.referrer=We})),this.actor.registerMessageHandler("SRPS",(Je,We)=>this._syncRTLPluginState(Je,We)),this.actor.registerMessageHandler("IS",(Je,We)=>i._(this,void 0,void 0,function*(){this.self.importScripts(We)})),this.actor.registerMessageHandler("SI",(Je,We)=>this._setImages(Je,We)),this.actor.registerMessageHandler("UL",(Je,We)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Je).update(We.layers,We.removedIds)})),this.actor.registerMessageHandler("SL",(Je,We)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Je).replace(We)}))}_setImages(Ge,Je){return i._(this,void 0,void 0,function*(){this.availableImages[Ge]=Je;for(let We in this.workerSources[Ge]){let et=this.workerSources[Ge][We];for(let xt in et)et[xt].availableImages=Je}})}_syncRTLPluginState(Ge,Je){return i._(this,void 0,void 0,function*(){if(i.bD.isParsed())return i.bD.getState();if(Je.pluginStatus!=="loading")return i.bD.setState(Je),Je;let We=Je.pluginURL;if(this.self.importScripts(We),i.bD.isParsed()){let et={pluginStatus:"loaded",pluginURL:We};return i.bD.setState(et),et}throw i.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${We}`)})}_getAvailableImages(Ge){let Je=this.availableImages[Ge];return Je||(Je=[]),Je}_getLayerIndex(Ge){let Je=this.layerIndexes[Ge];return Je||(Je=this.layerIndexes[Ge]=new a),Je}_getWorkerSource(Ge,Je,We){if(this.workerSources[Ge]||(this.workerSources[Ge]={}),this.workerSources[Ge][Je]||(this.workerSources[Ge][Je]={}),!this.workerSources[Ge][Je][We]){let et={sendAsync:(xt,At)=>(xt.targetMapId=Ge,this.actor.sendAsync(xt,At))};switch(Je){case"vector":this.workerSources[Ge][Je][We]=new u(et,this._getLayerIndex(Ge),this._getAvailableImages(Ge));break;case"geojson":this.workerSources[Ge][Je][We]=new qr(et,this._getLayerIndex(Ge),this._getAvailableImages(Ge));break;default:this.workerSources[Ge][Je][We]=new this.externalWorkerSourceTypes[Je](et,this._getLayerIndex(Ge),this._getAvailableImages(Ge))}}return this.workerSources[Ge][Je][We]}_getDEMWorkerSource(Ge,Je){return this.demWorkerSources[Ge]||(this.demWorkerSources[Ge]={}),this.demWorkerSources[Ge][Je]||(this.demWorkerSources[Ge][Je]=new c),this.demWorkerSources[Ge][Je]}}return i.i(self)&&(self.worker=new jr(self)),jr}),r("index",["exports","./shared"],function(i,a){"use strict";var o="4.7.1";let s,l,u={now:typeof performance!="undefined"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:ue=>new Promise((w,B)=>{let Q=requestAnimationFrame(w);ue.signal.addEventListener("abort",()=>{cancelAnimationFrame(Q),B(a.c())})}),getImageData(ue,w=0){return this.getImageCanvasContext(ue).getImageData(-w,-w,ue.width+2*w,ue.height+2*w)},getImageCanvasContext(ue){let w=window.document.createElement("canvas"),B=w.getContext("2d",{willReadFrequently:!0});if(!B)throw new Error("failed to create canvas 2d context");return w.width=ue.width,w.height=ue.height,B.drawImage(ue,0,0,ue.width,ue.height),B},resolveURL:ue=>(s||(s=document.createElement("a")),s.href=ue,s.href),hardwareConcurrency:typeof navigator!="undefined"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(l==null&&(l=matchMedia("(prefers-reduced-motion: reduce)")),l.matches)}};class c{static testProp(w){if(!c.docStyle)return w[0];for(let B=0;B{window.removeEventListener("click",c.suppressClickInternal,!0)},0)}static getScale(w){let B=w.getBoundingClientRect();return{x:B.width/w.offsetWidth||1,y:B.height/w.offsetHeight||1,boundingClientRect:B}}static getPoint(w,B,Q){let ee=B.boundingClientRect;return new a.P((Q.clientX-ee.left)/B.x-w.clientLeft,(Q.clientY-ee.top)/B.y-w.clientTop)}static mousePos(w,B){let Q=c.getScale(w);return c.getPoint(w,Q,B)}static touchPos(w,B){let Q=[],ee=c.getScale(w);for(let le=0;le{h&&b(h),h=null,m=!0},d.onerror=()=>{v=!0,h=null},d.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(ue){let w,B,Q,ee;ue.resetRequestQueue=()=>{w=[],B=0,Q=0,ee={}},ue.addThrottleControl=ut=>{let Mt=Q++;return ee[Mt]=ut,Mt},ue.removeThrottleControl=ut=>{delete ee[ut],Fe()},ue.getImage=(ut,Mt,Jt=!0)=>new Promise(($t,yr)=>{f.supported&&(ut.headers||(ut.headers={}),ut.headers.accept="image/webp,*/*"),a.e(ut,{type:"image"}),w.push({abortController:Mt,requestParameters:ut,supportImageRefresh:Jt,state:"queued",onError:Cr=>{yr(Cr)},onSuccess:Cr=>{$t(Cr)}}),Fe()});let le=ut=>a._(this,void 0,void 0,function*(){ut.state="running";let{requestParameters:Mt,supportImageRefresh:Jt,onError:$t,onSuccess:yr,abortController:Cr}=ut,ve=Jt===!1&&!a.i(self)&&!a.g(Mt.url)&&(!Mt.headers||Object.keys(Mt.headers).reduce((ze,Qe)=>ze&&Qe==="accept",!0));B++;let xe=ve?Ze(Mt,Cr):a.m(Mt,Cr);try{let ze=yield xe;delete ut.abortController,ut.state="completed",ze.data instanceof HTMLImageElement||a.b(ze.data)?yr(ze):ze.data&&yr({data:yield(Ie=ze.data,typeof createImageBitmap=="function"?a.d(Ie):a.f(Ie)),cacheControl:ze.cacheControl,expires:ze.expires})}catch(ze){delete ut.abortController,$t(ze)}finally{B--,Fe()}var Ie}),Fe=()=>{let ut=(()=>{for(let Mt of Object.keys(ee))if(ee[Mt]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let Mt=B;Mt0;Mt++){let Jt=w.shift();Jt.abortController.signal.aborted?Mt--:le(Jt)}},Ze=(ut,Mt)=>new Promise((Jt,$t)=>{let yr=new Image,Cr=ut.url,ve=ut.credentials;ve&&ve==="include"?yr.crossOrigin="use-credentials":(ve&&ve==="same-origin"||!a.s(Cr))&&(yr.crossOrigin="anonymous"),Mt.signal.addEventListener("abort",()=>{yr.src="",$t(a.c())}),yr.fetchPriority="high",yr.onload=()=>{yr.onerror=yr.onload=null,Jt({data:yr})},yr.onerror=()=>{yr.onerror=yr.onload=null,Mt.signal.aborted||$t(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."))},yr.src=Cr})}(p||(p={})),p.resetRequestQueue();class k{constructor(w){this._transformRequestFn=w}transformRequest(w,B){return this._transformRequestFn&&this._transformRequestFn(w,B)||{url:w}}setTransformRequest(w){this._transformRequestFn=w}}function M(ue){var w=new a.A(3);return w[0]=ue[0],w[1]=ue[1],w[2]=ue[2],w}var T,L=function(ue,w,B){return ue[0]=w[0]-B[0],ue[1]=w[1]-B[1],ue[2]=w[2]-B[2],ue};T=new a.A(3),a.A!=Float32Array&&(T[0]=0,T[1]=0,T[2]=0);var x=function(ue){var w=ue[0],B=ue[1];return w*w+B*B};function C(ue){let w=[];if(typeof ue=="string")w.push({id:"default",url:ue});else if(ue&&ue.length>0){let B=[];for(let{id:Q,url:ee}of ue){let le=`${Q}${ee}`;B.indexOf(le)===-1&&(B.push(le),w.push({id:Q,url:ee}))}}return w}function S(ue,w,B){let Q=ue.split("?");return Q[0]+=`${w}${B}`,Q.join("?")}(function(){var ue=new a.A(2);a.A!=Float32Array&&(ue[0]=0,ue[1]=0)})();class g{constructor(w,B,Q,ee){this.context=w,this.format=Q,this.texture=w.gl.createTexture(),this.update(B,ee)}update(w,B,Q){let{width:ee,height:le}=w,Fe=!(this.size&&this.size[0]===ee&&this.size[1]===le||Q),{context:Ze}=this,{gl:ut}=Ze;if(this.useMipmap=!!(B&&B.useMipmap),ut.bindTexture(ut.TEXTURE_2D,this.texture),Ze.pixelStoreUnpackFlipY.set(!1),Ze.pixelStoreUnpack.set(1),Ze.pixelStoreUnpackPremultiplyAlpha.set(this.format===ut.RGBA&&(!B||B.premultiply!==!1)),Fe)this.size=[ee,le],w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?ut.texImage2D(ut.TEXTURE_2D,0,this.format,this.format,ut.UNSIGNED_BYTE,w):ut.texImage2D(ut.TEXTURE_2D,0,this.format,ee,le,0,this.format,ut.UNSIGNED_BYTE,w.data);else{let{x:Mt,y:Jt}=Q||{x:0,y:0};w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?ut.texSubImage2D(ut.TEXTURE_2D,0,Mt,Jt,ut.RGBA,ut.UNSIGNED_BYTE,w):ut.texSubImage2D(ut.TEXTURE_2D,0,Mt,Jt,ee,le,ut.RGBA,ut.UNSIGNED_BYTE,w.data)}this.useMipmap&&this.isSizePowerOfTwo()&&ut.generateMipmap(ut.TEXTURE_2D)}bind(w,B,Q){let{context:ee}=this,{gl:le}=ee;le.bindTexture(le.TEXTURE_2D,this.texture),Q!==le.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Q=le.LINEAR),w!==this.filter&&(le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MAG_FILTER,w),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MIN_FILTER,Q||w),this.filter=w),B!==this.wrap&&(le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_S,B),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_T,B),this.wrap=B)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:w}=this.context;w.deleteTexture(this.texture),this.texture=null}}function P(ue){let{userImage:w}=ue;return!!(w&&w.render&&w.render())&&(ue.data.replace(new Uint8Array(w.data.buffer)),!0)}class E extends a.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(w){if(this.loaded!==w&&(this.loaded=w,w)){for(let{ids:B,promiseResolve:Q}of this.requestors)Q(this._getImagesForIds(B));this.requestors=[]}}getImage(w){let B=this.images[w];if(B&&!B.data&&B.spriteData){let Q=B.spriteData;B.data=new a.R({width:Q.width,height:Q.height},Q.context.getImageData(Q.x,Q.y,Q.width,Q.height).data),B.spriteData=null}return B}addImage(w,B){if(this.images[w])throw new Error(`Image id ${w} already exist, use updateImage instead`);this._validate(w,B)&&(this.images[w]=B)}_validate(w,B){let Q=!0,ee=B.data||B.spriteData;return this._validateStretch(B.stretchX,ee&&ee.width)||(this.fire(new a.j(new Error(`Image "${w}" has invalid "stretchX" value`))),Q=!1),this._validateStretch(B.stretchY,ee&&ee.height)||(this.fire(new a.j(new Error(`Image "${w}" has invalid "stretchY" value`))),Q=!1),this._validateContent(B.content,B)||(this.fire(new a.j(new Error(`Image "${w}" has invalid "content" value`))),Q=!1),Q}_validateStretch(w,B){if(!w)return!0;let Q=0;for(let ee of w){if(ee[0]{let ee=!0;if(!this.isLoaded())for(let le of w)this.images[le]||(ee=!1);this.isLoaded()||ee?B(this._getImagesForIds(w)):this.requestors.push({ids:w,promiseResolve:B})})}_getImagesForIds(w){let B={};for(let Q of w){let ee=this.getImage(Q);ee||(this.fire(new a.k("styleimagemissing",{id:Q})),ee=this.getImage(Q)),ee?B[Q]={data:ee.data.clone(),pixelRatio:ee.pixelRatio,sdf:ee.sdf,version:ee.version,stretchX:ee.stretchX,stretchY:ee.stretchY,content:ee.content,textFitWidth:ee.textFitWidth,textFitHeight:ee.textFitHeight,hasRenderCallback:!!(ee.userImage&&ee.userImage.render)}:a.w(`Image "${Q}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return B}getPixelSize(){let{width:w,height:B}=this.atlasImage;return{width:w,height:B}}getPattern(w){let B=this.patterns[w],Q=this.getImage(w);if(!Q)return null;if(B&&B.position.version===Q.version)return B.position;if(B)B.position.version=Q.version;else{let ee={w:Q.data.width+2,h:Q.data.height+2,x:0,y:0},le=new a.I(ee,Q);this.patterns[w]={bin:ee,position:le}}return this._updatePatternAtlas(),this.patterns[w].position}bind(w){let B=w.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new g(w,this.atlasImage,B.RGBA),this.atlasTexture.bind(B.LINEAR,B.CLAMP_TO_EDGE)}_updatePatternAtlas(){let w=[];for(let le in this.patterns)w.push(this.patterns[le].bin);let{w:B,h:Q}=a.p(w),ee=this.atlasImage;ee.resize({width:B||1,height:Q||1});for(let le in this.patterns){let{bin:Fe}=this.patterns[le],Ze=Fe.x+1,ut=Fe.y+1,Mt=this.getImage(le).data,Jt=Mt.width,$t=Mt.height;a.R.copy(Mt,ee,{x:0,y:0},{x:Ze,y:ut},{width:Jt,height:$t}),a.R.copy(Mt,ee,{x:0,y:$t-1},{x:Ze,y:ut-1},{width:Jt,height:1}),a.R.copy(Mt,ee,{x:0,y:0},{x:Ze,y:ut+$t},{width:Jt,height:1}),a.R.copy(Mt,ee,{x:Jt-1,y:0},{x:Ze-1,y:ut},{width:1,height:$t}),a.R.copy(Mt,ee,{x:0,y:0},{x:Ze+Jt,y:ut},{width:1,height:$t})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(w){for(let B of w){if(this.callbackDispatchedThisFrame[B])continue;this.callbackDispatchedThisFrame[B]=!0;let Q=this.getImage(B);Q||a.w(`Image with ID: "${B}" was not found`),P(Q)&&this.updateImage(B,Q)}}}let z=1e20;function q(ue,w,B,Q,ee,le,Fe,Ze,ut){for(let Mt=w;Mt-1);ut++,le[ut]=Ze,Fe[ut]=Mt,Fe[ut+1]=z}for(let Ze=0,ut=0;Ze65535)throw new Error("glyphs > 65535 not supported");if(Q.ranges[le])return{stack:w,id:B,glyph:ee};if(!this.url)throw new Error("glyphsUrl is not set");if(!Q.requests[le]){let Ze=G.loadGlyphRange(w,le,this.url,this.requestManager);Q.requests[le]=Ze}let Fe=yield Q.requests[le];for(let Ze in Fe)this._doesCharSupportLocalGlyph(+Ze)||(Q.glyphs[+Ze]=Fe[+Ze]);return Q.ranges[le]=!0,{stack:w,id:B,glyph:Fe[B]||null}})}_doesCharSupportLocalGlyph(w){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(w))}_tinySDF(w,B,Q){let ee=this.localIdeographFontFamily;if(!ee||!this._doesCharSupportLocalGlyph(Q))return;let le=w.tinySDF;if(!le){let Ze="400";/bold/i.test(B)?Ze="900":/medium/i.test(B)?Ze="500":/light/i.test(B)&&(Ze="200"),le=w.tinySDF=new G.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ee,fontWeight:Ze})}let Fe=le.draw(String.fromCharCode(Q));return{id:Q,bitmap:new a.o({width:Fe.width||60,height:Fe.height||60},Fe.data),metrics:{width:Fe.glyphWidth/2||24,height:Fe.glyphHeight/2||24,left:Fe.glyphLeft/2+.5||0,top:Fe.glyphTop/2-27.5||-8,advance:Fe.glyphAdvance/2||24,isDoubleResolution:!0}}}}G.loadGlyphRange=function(ue,w,B,Q){return a._(this,void 0,void 0,function*(){let ee=256*w,le=ee+255,Fe=Q.transformRequest(B.replace("{fontstack}",ue).replace("{range}",`${ee}-${le}`),"Glyphs"),Ze=yield a.l(Fe,new AbortController);if(!Ze||!Ze.data)throw new Error(`Could not load glyph range. range: ${w}, ${ee}-${le}`);let ut={};for(let Mt of a.n(Ze.data))ut[Mt.id]=Mt;return ut})},G.TinySDF=class{constructor({fontSize:ue=24,buffer:w=3,radius:B=8,cutoff:Q=.25,fontFamily:ee="sans-serif",fontWeight:le="normal",fontStyle:Fe="normal"}={}){this.buffer=w,this.cutoff=Q,this.radius=B;let Ze=this.size=ue+4*w,ut=this._createCanvas(Ze),Mt=this.ctx=ut.getContext("2d",{willReadFrequently:!0});Mt.font=`${Fe} ${le} ${ue}px ${ee}`,Mt.textBaseline="alphabetic",Mt.textAlign="left",Mt.fillStyle="black",this.gridOuter=new Float64Array(Ze*Ze),this.gridInner=new Float64Array(Ze*Ze),this.f=new Float64Array(Ze),this.z=new Float64Array(Ze+1),this.v=new Uint16Array(Ze)}_createCanvas(ue){let w=document.createElement("canvas");return w.width=w.height=ue,w}draw(ue){let{width:w,actualBoundingBoxAscent:B,actualBoundingBoxDescent:Q,actualBoundingBoxLeft:ee,actualBoundingBoxRight:le}=this.ctx.measureText(ue),Fe=Math.ceil(B),Ze=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(le-ee))),ut=Math.min(this.size-this.buffer,Fe+Math.ceil(Q)),Mt=Ze+2*this.buffer,Jt=ut+2*this.buffer,$t=Math.max(Mt*Jt,0),yr=new Uint8ClampedArray($t),Cr={data:yr,width:Mt,height:Jt,glyphWidth:Ze,glyphHeight:ut,glyphTop:Fe,glyphLeft:0,glyphAdvance:w};if(Ze===0||ut===0)return Cr;let{ctx:ve,buffer:xe,gridInner:Ie,gridOuter:ze}=this;ve.clearRect(xe,xe,Ze,ut),ve.fillText(ue,xe,xe+Fe);let Qe=ve.getImageData(xe,xe,Ze,ut);ze.fill(z,0,$t),Ie.fill(0,0,$t);for(let Xe=0;Xe0?nr*nr:0,Ie[Wt]=nr<0?nr*nr:0}}q(ze,0,0,Mt,Jt,Mt,this.f,this.v,this.z),q(Ie,xe,xe,Ze,ut,Mt,this.f,this.v,this.z);for(let Xe=0;Xe<$t;Xe++){let nt=Math.sqrt(ze[Xe])-Math.sqrt(Ie[Xe]);yr[Xe]=Math.round(255-255*(nt/this.radius+this.cutoff))}return Cr}};class Z{constructor(){this.specification=a.v.light.position}possiblyEvaluate(w,B){return a.x(w.expression.evaluate(B))}interpolate(w,B,Q){return{x:a.y.number(w.x,B.x,Q),y:a.y.number(w.y,B.y,Q),z:a.y.number(w.z,B.z,Q)}}}let j;class N extends a.E{constructor(w){super(),j=j||new a.q({anchor:new a.D(a.v.light.anchor),position:new Z,color:new a.D(a.v.light.color),intensity:new a.D(a.v.light.intensity)}),this._transitionable=new a.T(j),this.setLight(w),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(w,B={}){if(!this._validate(a.r,w,B))for(let Q in w){let ee=w[Q];Q.endsWith("-transition")?this._transitionable.setTransition(Q.slice(0,-11),ee):this._transitionable.setValue(Q,ee)}}updateTransitions(w){this._transitioning=this._transitionable.transitioned(w,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(w){this.properties=this._transitioning.possiblyEvaluate(w)}_validate(w,B,Q){return(!Q||Q.validate!==!1)&&a.t(this,w.call(a.u,{value:B,style:{glyphs:!0,sprite:!0},styleSpec:a.v}))}}let H=new a.q({"sky-color":new a.D(a.v.sky["sky-color"]),"horizon-color":new a.D(a.v.sky["horizon-color"]),"fog-color":new a.D(a.v.sky["fog-color"]),"fog-ground-blend":new a.D(a.v.sky["fog-ground-blend"]),"horizon-fog-blend":new a.D(a.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new a.D(a.v.sky["sky-horizon-blend"]),"atmosphere-blend":new a.D(a.v.sky["atmosphere-blend"])});class ie extends a.E{constructor(w){super(),this._transitionable=new a.T(H),this.setSky(w),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new a.z(0))}setSky(w,B={}){if(!this._validate(a.B,w,B)){w||(w={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(let Q in w){let ee=w[Q];Q.endsWith("-transition")?this._transitionable.setTransition(Q.slice(0,-11),ee):this._transitionable.setValue(Q,ee)}}}getSky(){return this._transitionable.serialize()}updateTransitions(w){this._transitioning=this._transitionable.transitioned(w,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(w){this.properties=this._transitioning.possiblyEvaluate(w)}_validate(w,B,Q={}){return(Q==null?void 0:Q.validate)!==!1&&a.t(this,w.call(a.u,a.e({value:B,style:{glyphs:!0,sprite:!0},styleSpec:a.v})))}calculateFogBlendOpacity(w){return w<60?0:w<70?(w-60)/10:1}}class ae{constructor(w,B){this.width=w,this.height=B,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(w,B){let Q=w.join(",")+String(B);return this.dashEntry[Q]||(this.dashEntry[Q]=this.addDash(w,B)),this.dashEntry[Q]}getDashRanges(w,B,Q){let ee=[],le=w.length%2==1?-w[w.length-1]*Q:0,Fe=w[0]*Q,Ze=!0;ee.push({left:le,right:Fe,isDash:Ze,zeroLength:w[0]===0});let ut=w[0];for(let Mt=1;Mt1&&(ut=w[++Ze]);let Jt=Math.abs(Mt-ut.left),$t=Math.abs(Mt-ut.right),yr=Math.min(Jt,$t),Cr,ve=le/Q*(ee+1);if(ut.isDash){let xe=ee-Math.abs(ve);Cr=Math.sqrt(yr*yr+xe*xe)}else Cr=ee-Math.sqrt(yr*yr+ve*ve);this.data[Fe+Mt]=Math.max(0,Math.min(255,Cr+128))}}}addRegularDash(w){for(let Ze=w.length-1;Ze>=0;--Ze){let ut=w[Ze],Mt=w[Ze+1];ut.zeroLength?w.splice(Ze,1):Mt&&Mt.isDash===ut.isDash&&(Mt.left=ut.left,w.splice(Ze,1))}let B=w[0],Q=w[w.length-1];B.isDash===Q.isDash&&(B.left=Q.left-this.width,Q.right=B.right+this.width);let ee=this.width*this.nextRow,le=0,Fe=w[le];for(let Ze=0;Ze1&&(Fe=w[++le]);let ut=Math.abs(Ze-Fe.left),Mt=Math.abs(Ze-Fe.right),Jt=Math.min(ut,Mt);this.data[ee+Ze]=Math.max(0,Math.min(255,(Fe.isDash?Jt:-Jt)+128))}}addDash(w,B){let Q=B?7:0,ee=2*Q+1;if(this.nextRow+ee>this.height)return a.w("LineAtlas out of space"),null;let le=0;for(let Ze=0;Ze{B.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[_e]}numActive(){return Object.keys(this.active).length}}let Ce=Math.floor(u.hardwareConcurrency/2),ge,re;function Se(){return ge||(ge=new Ee),ge}Ee.workerCount=a.C(globalThis)?Math.max(Math.min(Ce,3),1):1;class ke{constructor(w,B){this.workerPool=w,this.actors=[],this.currentActor=0,this.id=B;let Q=this.workerPool.acquire(B);for(let ee=0;ee{B.remove()}),this.actors=[],w&&this.workerPool.release(this.id)}registerMessageHandler(w,B){for(let Q of this.actors)Q.registerMessageHandler(w,B)}}function be(){return re||(re=new ke(Se(),a.G),re.registerMessageHandler("GR",(ue,w,B)=>a.m(w,B))),re}function Be(ue,w){let B=a.H();return a.J(B,B,[1,1,0]),a.K(B,B,[.5*ue.width,.5*ue.height,1]),a.L(B,B,ue.calculatePosMatrix(w.toUnwrapped()))}function Le(ue,w,B,Q,ee,le){let Fe=function($t,yr,Cr){if($t)for(let ve of $t){let xe=yr[ve];if(xe&&xe.source===Cr&&xe.type==="fill-extrusion")return!0}else for(let ve in yr){let xe=yr[ve];if(xe.source===Cr&&xe.type==="fill-extrusion")return!0}return!1}(ee&&ee.layers,w,ue.id),Ze=le.maxPitchScaleFactor(),ut=ue.tilesIn(Q,Ze,Fe);ut.sort(me);let Mt=[];for(let $t of ut)Mt.push({wrappedTileID:$t.tileID.wrapped().key,queryResults:$t.tile.queryRenderedFeatures(w,B,ue._state,$t.queryGeometry,$t.cameraQueryGeometry,$t.scale,ee,le,Ze,Be(ue.transform,$t.tileID))});let Jt=function($t){let yr={},Cr={};for(let ve of $t){let xe=ve.queryResults,Ie=ve.wrappedTileID,ze=Cr[Ie]=Cr[Ie]||{};for(let Qe in xe){let Xe=xe[Qe],nt=ze[Qe]=ze[Qe]||{},qt=yr[Qe]=yr[Qe]||[];for(let Wt of Xe)nt[Wt.featureIndex]||(nt[Wt.featureIndex]=!0,qt.push(Wt))}}return yr}(Mt);for(let $t in Jt)Jt[$t].forEach(yr=>{let Cr=yr.feature,ve=ue.getFeatureState(Cr.layer["source-layer"],Cr.id);Cr.source=Cr.layer.source,Cr.layer["source-layer"]&&(Cr.sourceLayer=Cr.layer["source-layer"]),Cr.state=ve});return Jt}function me(ue,w){let B=ue.tileID,Q=w.tileID;return B.overscaledZ-Q.overscaledZ||B.canonical.y-Q.canonical.y||B.wrap-Q.wrap||B.canonical.x-Q.canonical.x}function Pe(ue,w,B){return a._(this,void 0,void 0,function*(){let Q=ue;if(ue.url?Q=(yield a.h(w.transformRequest(ue.url,"Source"),B)).data:yield u.frameAsync(B),!Q)return null;let ee=a.M(a.e(Q,ue),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Q&&Q.vector_layers&&(ee.vectorLayerIds=Q.vector_layers.map(le=>le.id)),ee})}class ce{constructor(w,B){w&&(B?this.setSouthWest(w).setNorthEast(B):Array.isArray(w)&&(w.length===4?this.setSouthWest([w[0],w[1]]).setNorthEast([w[2],w[3]]):this.setSouthWest(w[0]).setNorthEast(w[1])))}setNorthEast(w){return this._ne=w instanceof a.N?new a.N(w.lng,w.lat):a.N.convert(w),this}setSouthWest(w){return this._sw=w instanceof a.N?new a.N(w.lng,w.lat):a.N.convert(w),this}extend(w){let B=this._sw,Q=this._ne,ee,le;if(w instanceof a.N)ee=w,le=w;else{if(!(w instanceof ce))return Array.isArray(w)?w.length===4||w.every(Array.isArray)?this.extend(ce.convert(w)):this.extend(a.N.convert(w)):w&&("lng"in w||"lon"in w)&&"lat"in w?this.extend(a.N.convert(w)):this;if(ee=w._sw,le=w._ne,!ee||!le)return this}return B||Q?(B.lng=Math.min(ee.lng,B.lng),B.lat=Math.min(ee.lat,B.lat),Q.lng=Math.max(le.lng,Q.lng),Q.lat=Math.max(le.lat,Q.lat)):(this._sw=new a.N(ee.lng,ee.lat),this._ne=new a.N(le.lng,le.lat)),this}getCenter(){return new a.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new a.N(this.getWest(),this.getNorth())}getSouthEast(){return new a.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(w){let{lng:B,lat:Q}=a.N.convert(w),ee=this._sw.lng<=B&&B<=this._ne.lng;return this._sw.lng>this._ne.lng&&(ee=this._sw.lng>=B&&B>=this._ne.lng),this._sw.lat<=Q&&Q<=this._ne.lat&&ee}static convert(w){return w instanceof ce?w:w&&new ce(w)}static fromLngLat(w,B=0){let Q=360*B/40075017,ee=Q/Math.cos(Math.PI/180*w.lat);return new ce(new a.N(w.lng-ee,w.lat-Q),new a.N(w.lng+ee,w.lat+Q))}adjustAntiMeridian(){let w=new a.N(this._sw.lng,this._sw.lat),B=new a.N(this._ne.lng,this._ne.lat);return new ce(w,w.lng>B.lng?new a.N(B.lng+360,B.lat):B)}}class He{constructor(w,B,Q){this.bounds=ce.convert(this.validateBounds(w)),this.minzoom=B||0,this.maxzoom=Q||24}validateBounds(w){return Array.isArray(w)&&w.length===4?[Math.max(-180,w[0]),Math.max(-90,w[1]),Math.min(180,w[2]),Math.min(90,w[3])]:[-180,-90,180,90]}contains(w){let B=Math.pow(2,w.z),Q=Math.floor(a.O(this.bounds.getWest())*B),ee=Math.floor(a.Q(this.bounds.getNorth())*B),le=Math.ceil(a.O(this.bounds.getEast())*B),Fe=Math.ceil(a.Q(this.bounds.getSouth())*B);return w.x>=Q&&w.x=ee&&w.y{this._options.tiles=w}),this}setUrl(w){return this.setSourceProperty(()=>{this.url=w,this._options.url=w}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return a.e({},this._options)}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Q={request:this.map._requestManager.transformRequest(B,"Tile"),uid:w.uid,tileID:w.tileID,zoom:w.tileID.overscaledZ,tileSize:this.tileSize*w.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Q.request.collectResourceTiming=this._collectResourceTiming;let ee="RT";if(w.actor&&w.state!=="expired"){if(w.state==="loading")return new Promise((le,Fe)=>{w.reloadPromise={resolve:le,reject:Fe}})}else w.actor=this.dispatcher.getActor(),ee="LT";w.abortController=new AbortController;try{let le=yield w.actor.sendAsync({type:ee,data:Q},w.abortController);if(delete w.abortController,w.aborted)return;this._afterTileLoadWorkerResponse(w,le)}catch(le){if(delete w.abortController,w.aborted)return;if(le&&le.status!==404)throw le;this._afterTileLoadWorkerResponse(w,null)}})}_afterTileLoadWorkerResponse(w,B){if(B&&B.resourceTiming&&(w.resourceTiming=B.resourceTiming),B&&this.map._refreshExpiredTiles&&w.setExpiryData(B),w.loadVectorData(B,this.map.painter),w.reloadPromise){let Q=w.reloadPromise;w.reloadPromise=null,this.loadTile(w).then(Q.resolve).catch(Q.reject)}}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController),w.actor&&(yield w.actor.sendAsync({type:"AT",data:{uid:w.uid,type:this.type,source:this.id}}))})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.unloadVectorData(),w.actor&&(yield w.actor.sendAsync({type:"RMT",data:{uid:w.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class mt extends a.E{constructor(w,B,Q,ee){super(),this.id=w,this.dispatcher=Q,this.setEventedParent(ee),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=a.e({type:"raster"},B),a.e(this,a.M(B,["url","scheme","tileSize"]))}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let w=yield Pe(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,w&&(a.e(this,w),w.bounds&&(this.tileBounds=new He(w.bounds,this.minzoom,this.maxzoom)),this.fire(new a.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.k("data",{dataType:"source",sourceDataType:"content"})))}catch(w){this._tileJSONRequest=null,this.fire(new a.j(w))}})}loaded(){return this._loaded}onAdd(w){this.map=w,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(w){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),w(),this.load()}setTiles(w){return this.setSourceProperty(()=>{this._options.tiles=w}),this}setUrl(w){return this.setSourceProperty(()=>{this.url=w,this._options.url=w}),this}serialize(){return a.e({},this._options)}hasTile(w){return!this.tileBounds||this.tileBounds.contains(w.canonical)}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);w.abortController=new AbortController;try{let Q=yield p.getImage(this.map._requestManager.transformRequest(B,"Tile"),w.abortController,this.map._refreshExpiredTiles);if(delete w.abortController,w.aborted)return void(w.state="unloaded");if(Q&&Q.data){this.map._refreshExpiredTiles&&Q.cacheControl&&Q.expires&&w.setExpiryData({cacheControl:Q.cacheControl,expires:Q.expires});let ee=this.map.painter.context,le=ee.gl,Fe=Q.data;w.texture=this.map.painter.getTileTexture(Fe.width),w.texture?w.texture.update(Fe,{useMipmap:!0}):(w.texture=new g(ee,Fe,le.RGBA,{useMipmap:!0}),w.texture.bind(le.LINEAR,le.CLAMP_TO_EDGE,le.LINEAR_MIPMAP_NEAREST)),w.state="loaded"}}catch(Q){if(delete w.abortController,w.aborted)w.state="unloaded";else if(Q)throw w.state="errored",Q}})}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController)})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.texture&&this.map.painter.saveTileTexture(w.texture)})}hasTransition(){return!1}}class Ht extends mt{constructor(w,B,Q,ee){super(w,B,Q,ee),this.type="raster-dem",this.maxzoom=22,this._options=a.e({type:"raster-dem"},B),this.encoding=B.encoding||"mapbox",this.redFactor=B.redFactor,this.greenFactor=B.greenFactor,this.blueFactor=B.blueFactor,this.baseShift=B.baseShift}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Q=this.map._requestManager.transformRequest(B,"Tile");w.neighboringTiles=this._getNeighboringTiles(w.tileID),w.abortController=new AbortController;try{let ee=yield p.getImage(Q,w.abortController,this.map._refreshExpiredTiles);if(delete w.abortController,w.aborted)return void(w.state="unloaded");if(ee&&ee.data){let le=ee.data;this.map._refreshExpiredTiles&&ee.cacheControl&&ee.expires&&w.setExpiryData({cacheControl:ee.cacheControl,expires:ee.expires});let Fe=a.b(le)&&a.U()?le:yield this.readImageNow(le),Ze={type:this.type,uid:w.uid,source:this.id,rawImageData:Fe,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!w.actor||w.state==="expired"){w.actor=this.dispatcher.getActor();let ut=yield w.actor.sendAsync({type:"LDT",data:Ze});w.dem=ut,w.needsHillshadePrepare=!0,w.needsTerrainPrepare=!0,w.state="loaded"}}}catch(ee){if(delete w.abortController,w.aborted)w.state="unloaded";else if(ee)throw w.state="errored",ee}})}readImageNow(w){return a._(this,void 0,void 0,function*(){if(typeof VideoFrame!="undefined"&&a.V()){let B=w.width+2,Q=w.height+2;try{return new a.R({width:B,height:Q},yield a.W(w,-1,-1,B,Q))}catch(ee){}}return u.getImageData(w,1)})}_getNeighboringTiles(w){let B=w.canonical,Q=Math.pow(2,B.z),ee=(B.x-1+Q)%Q,le=B.x===0?w.wrap-1:w.wrap,Fe=(B.x+1+Q)%Q,Ze=B.x+1===Q?w.wrap+1:w.wrap,ut={};return ut[new a.S(w.overscaledZ,le,B.z,ee,B.y).key]={backfilled:!1},ut[new a.S(w.overscaledZ,Ze,B.z,Fe,B.y).key]={backfilled:!1},B.y>0&&(ut[new a.S(w.overscaledZ,le,B.z,ee,B.y-1).key]={backfilled:!1},ut[new a.S(w.overscaledZ,w.wrap,B.z,B.x,B.y-1).key]={backfilled:!1},ut[new a.S(w.overscaledZ,Ze,B.z,Fe,B.y-1).key]={backfilled:!1}),B.y+10&&a.e(le,{resourceTiming:ee}),this.fire(new a.k("data",Object.assign(Object.assign({},le),{sourceDataType:"metadata"}))),this.fire(new a.k("data",Object.assign(Object.assign({},le),{sourceDataType:"content"})))}catch(Q){if(this._pendingLoads--,this._removed)return void this.fire(new a.k("dataabort",{dataType:"source"}));this.fire(new a.j(Q))}})}loaded(){return this._pendingLoads===0}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.actor?"RT":"LT";w.actor=this.actor;let Q={type:this.type,uid:w.uid,tileID:w.tileID,zoom:w.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};w.abortController=new AbortController;let ee=yield this.actor.sendAsync({type:B,data:Q},w.abortController);delete w.abortController,w.unloadVectorData(),w.aborted||w.loadVectorData(ee,this.map.painter,B==="RT")})}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController),w.aborted=!0})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:w.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return a.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var ct=a.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class ar extends a.E{constructor(w,B,Q,ee){super(),this.id=w,this.dispatcher=Q,this.coordinates=B.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ee),this.options=B}load(w){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let B=yield p.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,B&&B.data&&(this.image=B.data,w&&(this.coordinates=w),this._finishLoading())}catch(B){this._request=null,this._loaded=!0,this.fire(new a.j(B))}})}loaded(){return this._loaded}updateImage(w){return w.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=w.url,this.load(w.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(w){this.map=w,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(w){this.coordinates=w;let B=w.map(a.Z.fromLngLat);this.tileID=function(ee){let le=1/0,Fe=1/0,Ze=-1/0,ut=-1/0;for(let yr of ee)le=Math.min(le,yr.x),Fe=Math.min(Fe,yr.y),Ze=Math.max(Ze,yr.x),ut=Math.max(ut,yr.y);let Mt=Math.max(Ze-le,ut-Fe),Jt=Math.max(0,Math.floor(-Math.log(Mt)/Math.LN2)),$t=Math.pow(2,Jt);return new a.a1(Jt,Math.floor((le+Ze)/2*$t),Math.floor((Fe+ut)/2*$t))}(B),this.minzoom=this.maxzoom=this.tileID.z;let Q=B.map(ee=>this.tileID.getTilePoint(ee)._round());return this._boundsArray=new a.$,this._boundsArray.emplaceBack(Q[0].x,Q[0].y,0,0),this._boundsArray.emplaceBack(Q[1].x,Q[1].y,a.X,0),this._boundsArray.emplaceBack(Q[3].x,Q[3].y,0,a.X),this._boundsArray.emplaceBack(Q[2].x,Q[2].y,a.X,a.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new a.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let w=this.map.painter.context,B=w.gl;this.boundsBuffer||(this.boundsBuffer=w.createVertexBuffer(this._boundsArray,ct.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new g(w,this.image,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let le=this.tiles[ee];le.state!=="loaded"&&(le.state="loaded",le.texture=this.texture,Q=!0)}Q&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(w){return a._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(w.tileID.canonical)?(this.tiles[String(w.tileID.wrap)]=w,w.buckets={}):w.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Vt extends ar{constructor(w,B,Q,ee){super(w,B,Q,ee),this.roundZoom=!0,this.type="video",this.options=B}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1;let w=this.options;this.urls=[];for(let B of w.urls)this.urls.push(this.map._requestManager.transformRequest(B,"Source").url);try{let B=yield a.a3(this.urls);if(this._loaded=!0,!B)return;this.video=B,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(B){this.fire(new a.j(B))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(w){if(this.video){let B=this.video.seekable;wB.end(0)?this.fire(new a.j(new a.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${B.start(0)} and ${B.end(0)}-second mark.`))):this.video.currentTime=w}}getVideo(){return this.video}onAdd(w){this.map||(this.map=w,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let w=this.map.painter.context,B=w.gl;this.boundsBuffer||(this.boundsBuffer=w.createVertexBuffer(this._boundsArray,ct.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE),B.texSubImage2D(B.TEXTURE_2D,0,0,0,B.RGBA,B.UNSIGNED_BYTE,this.video)):(this.texture=new g(w,this.video,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let le=this.tiles[ee];le.state!=="loaded"&&(le.state="loaded",le.texture=this.texture,Q=!0)}Q&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class rr extends ar{constructor(w,B,Q,ee){super(w,B,Q,ee),B.coordinates?Array.isArray(B.coordinates)&&B.coordinates.length===4&&!B.coordinates.some(le=>!Array.isArray(le)||le.length!==2||le.some(Fe=>typeof Fe!="number"))||this.fire(new a.j(new a.a2(`sources.${w}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.j(new a.a2(`sources.${w}`,null,'missing required property "coordinates"'))),B.animate&&typeof B.animate!="boolean"&&this.fire(new a.j(new a.a2(`sources.${w}`,null,'optional "animate" property must be a boolean value'))),B.canvas?typeof B.canvas=="string"||B.canvas instanceof HTMLCanvasElement||this.fire(new a.j(new a.a2(`sources.${w}`,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 a.j(new a.a2(`sources.${w}`,null,'missing required property "canvas"'))),this.options=B,this.animate=B.animate===void 0||B.animate}load(){return a._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new a.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(w){this.map=w,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let w=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,w=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,w=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let B=this.map.painter.context,Q=B.gl;this.boundsBuffer||(this.boundsBuffer=B.createVertexBuffer(this._boundsArray,ct.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture?(w||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new g(B,this.canvas,Q.RGBA,{premultiply:!0});let ee=!1;for(let le in this.tiles){let Fe=this.tiles[le];Fe.state!=="loaded"&&(Fe.state="loaded",Fe.texture=this.texture,ee=!0)}ee&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let w of[this.canvas.width,this.canvas.height])if(isNaN(w)||w<=0)return!0;return!1}}let tt={},je=ue=>{switch(ue){case"geojson":return at;case"image":return ar;case"raster":return mt;case"raster-dem":return Ht;case"vector":return lt;case"video":return Vt;case"canvas":return rr}return tt[ue]},Ue="RTLPluginLoaded";class Ae extends a.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=be()}_syncState(w){return this.status=w,this.dispatcher.broadcast("SRPS",{pluginStatus:w,pluginURL:this.url}).catch(B=>{throw this.status="error",B})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(w){return a._(this,arguments,void 0,function*(B,Q=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=u.resolveURL(B),!this.url)throw new Error(`requested url ${B} is invalid`);if(this.status==="unavailable"){if(!Q)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return a._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new a.k(Ue))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let rt=null;function St(){return rt||(rt=new Ae),rt}class Tt{constructor(w,B){this.timeAdded=0,this.fadeEndTime=0,this.tileID=w,this.uid=a.a4(),this.uses=0,this.tileSize=B,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(w){let B=w+this.timeAdded;Ble.getLayer(Mt)).filter(Boolean);if(ut.length!==0){Ze.layers=ut,Ze.stateDependentLayerIds&&(Ze.stateDependentLayers=Ze.stateDependentLayerIds.map(Mt=>ut.filter(Jt=>Jt.id===Mt)[0]));for(let Mt of ut)Fe[Mt.id]=Ze}}return Fe}(w.buckets,B.style),this.hasSymbolBuckets=!1;for(let ee in this.buckets){let le=this.buckets[ee];if(le instanceof a.a6){if(this.hasSymbolBuckets=!0,!Q)break;le.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let ee in this.buckets){let le=this.buckets[ee];if(le instanceof a.a6&&le.hasRTLText){this.hasRTLText=!0,St().lazyLoad();break}}this.queryPadding=0;for(let ee in this.buckets){let le=this.buckets[ee];this.queryPadding=Math.max(this.queryPadding,B.style.getLayer(ee).queryRadius(le))}w.imageAtlas&&(this.imageAtlas=w.imageAtlas),w.glyphAtlasImage&&(this.glyphAtlasImage=w.glyphAtlasImage)}else this.collisionBoxArray=new a.a5}unloadVectorData(){for(let w in this.buckets)this.buckets[w].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(w){return this.buckets[w.id]}upload(w){for(let Q in this.buckets){let ee=this.buckets[Q];ee.uploadPending()&&ee.upload(w)}let B=w.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new g(w,this.imageAtlas.image,B.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new g(w,this.glyphAtlasImage,B.ALPHA),this.glyphAtlasImage=null)}prepare(w){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(w,this.imageAtlasTexture)}queryRenderedFeatures(w,B,Q,ee,le,Fe,Ze,ut,Mt,Jt){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:ee,cameraQueryGeometry:le,scale:Fe,tileSize:this.tileSize,pixelPosMatrix:Jt,transform:ut,params:Ze,queryPadding:this.queryPadding*Mt},w,B,Q):{}}querySourceFeatures(w,B){let Q=this.latestFeatureIndex;if(!Q||!Q.rawTileData)return;let ee=Q.loadVTLayers(),le=B&&B.sourceLayer?B.sourceLayer:"",Fe=ee._geojsonTileLayer||ee[le];if(!Fe)return;let Ze=a.a7(B&&B.filter),{z:ut,x:Mt,y:Jt}=this.tileID.canonical,$t={z:ut,x:Mt,y:Jt};for(let yr=0;yrQ)ee=!1;else if(B)if(this.expirationTime{this.remove(w,le)},Q)),this.data[ee].push(le),this.order.push(ee),this.order.length>this.max){let Fe=this._getAndRemoveByKey(this.order[0]);Fe&&this.onRemove(Fe)}return this}has(w){return w.wrapped().key in this.data}getAndRemove(w){return this.has(w)?this._getAndRemoveByKey(w.wrapped().key):null}_getAndRemoveByKey(w){let B=this.data[w].shift();return B.timeout&&clearTimeout(B.timeout),this.data[w].length===0&&delete this.data[w],this.order.splice(this.order.indexOf(w),1),B.value}getByKey(w){let B=this.data[w];return B?B[0].value:null}get(w){return this.has(w)?this.data[w.wrapped().key][0].value:null}remove(w,B){if(!this.has(w))return this;let Q=w.wrapped().key,ee=B===void 0?0:this.data[Q].indexOf(B),le=this.data[Q][ee];return this.data[Q].splice(ee,1),le.timeout&&clearTimeout(le.timeout),this.data[Q].length===0&&delete this.data[Q],this.onRemove(le.value),this.order.splice(this.order.indexOf(Q),1),this}setMaxSize(w){for(this.max=w;this.order.length>this.max;){let B=this._getAndRemoveByKey(this.order[0]);B&&this.onRemove(B)}return this}filter(w){let B=[];for(let Q in this.data)for(let ee of this.data[Q])w(ee.value)||B.push(ee);for(let Q of B)this.remove(Q.value.tileID,Q)}}class Et{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(w,B,Q){let ee=String(B);if(this.stateChanges[w]=this.stateChanges[w]||{},this.stateChanges[w][ee]=this.stateChanges[w][ee]||{},a.e(this.stateChanges[w][ee],Q),this.deletedStates[w]===null){this.deletedStates[w]={};for(let le in this.state[w])le!==ee&&(this.deletedStates[w][le]=null)}else if(this.deletedStates[w]&&this.deletedStates[w][ee]===null){this.deletedStates[w][ee]={};for(let le in this.state[w][ee])Q[le]||(this.deletedStates[w][ee][le]=null)}else for(let le in Q)this.deletedStates[w]&&this.deletedStates[w][ee]&&this.deletedStates[w][ee][le]===null&&delete this.deletedStates[w][ee][le]}removeFeatureState(w,B,Q){if(this.deletedStates[w]===null)return;let ee=String(B);if(this.deletedStates[w]=this.deletedStates[w]||{},Q&&B!==void 0)this.deletedStates[w][ee]!==null&&(this.deletedStates[w][ee]=this.deletedStates[w][ee]||{},this.deletedStates[w][ee][Q]=null);else if(B!==void 0)if(this.stateChanges[w]&&this.stateChanges[w][ee])for(Q in this.deletedStates[w][ee]={},this.stateChanges[w][ee])this.deletedStates[w][ee][Q]=null;else this.deletedStates[w][ee]=null;else this.deletedStates[w]=null}getState(w,B){let Q=String(B),ee=a.e({},(this.state[w]||{})[Q],(this.stateChanges[w]||{})[Q]);if(this.deletedStates[w]===null)return{};if(this.deletedStates[w]){let le=this.deletedStates[w][B];if(le===null)return{};for(let Fe in le)delete ee[Fe]}return ee}initializeTileState(w,B){w.setFeatureState(this.state,B)}coalesceChanges(w,B){let Q={};for(let ee in this.stateChanges){this.state[ee]=this.state[ee]||{};let le={};for(let Fe in this.stateChanges[ee])this.state[ee][Fe]||(this.state[ee][Fe]={}),a.e(this.state[ee][Fe],this.stateChanges[ee][Fe]),le[Fe]=this.state[ee][Fe];Q[ee]=le}for(let ee in this.deletedStates){this.state[ee]=this.state[ee]||{};let le={};if(this.deletedStates[ee]===null)for(let Fe in this.state[ee])le[Fe]={},this.state[ee][Fe]={};else for(let Fe in this.deletedStates[ee]){if(this.deletedStates[ee][Fe]===null)this.state[ee][Fe]={};else for(let Ze of Object.keys(this.deletedStates[ee][Fe]))delete this.state[ee][Fe][Ze];le[Fe]=this.state[ee][Fe]}Q[ee]=Q[ee]||{},a.e(Q[ee],le)}if(this.stateChanges={},this.deletedStates={},Object.keys(Q).length!==0)for(let ee in w)w[ee].setFeatureState(Q,B)}}class pt extends a.E{constructor(w,B,Q){super(),this.id=w,this.dispatcher=Q,this.on("data",ee=>this._dataHandler(ee)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((ee,le,Fe,Ze)=>{let ut=new(je(le.type))(ee,le,Fe,Ze);if(ut.id!==ee)throw new Error(`Expected Source id to be ${ee} instead of ${ut.id}`);return ut})(w,B,Q,this),this._tiles={},this._cache=new dt(0,ee=>this._unloadTile(ee)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Et,this._didEmitContent=!1,this._updated=!1}onAdd(w){this.map=w,this._maxTileCacheSize=w?w._maxTileCacheSize:null,this._maxTileCacheZoomLevels=w?w._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(w)}onRemove(w){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(w)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let w in this._tiles){let B=this._tiles[w];if(B.state!=="loaded"&&B.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let w=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,w&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(w,B,Q){return a._(this,void 0,void 0,function*(){try{yield this._source.loadTile(w),this._tileLoaded(w,B,Q)}catch(ee){w.state="errored",ee.status!==404?this._source.fire(new a.j(ee,{tile:w})):this.update(this.transform,this.terrain)}})}_unloadTile(w){this._source.unloadTile&&this._source.unloadTile(w)}_abortTile(w){this._source.abortTile&&this._source.abortTile(w),this._source.fire(new a.k("dataabort",{tile:w,coord:w.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(w){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let B in this._tiles){let Q=this._tiles[B];Q.upload(w),Q.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(w=>w.tileID).sort(jt).map(w=>w.key)}getRenderableIds(w){let B=[];for(let Q in this._tiles)this._isIdRenderable(Q,w)&&B.push(this._tiles[Q]);return w?B.sort((Q,ee)=>{let le=Q.tileID,Fe=ee.tileID,Ze=new a.P(le.canonical.x,le.canonical.y)._rotate(this.transform.angle),ut=new a.P(Fe.canonical.x,Fe.canonical.y)._rotate(this.transform.angle);return le.overscaledZ-Fe.overscaledZ||ut.y-Ze.y||ut.x-Ze.x}).map(Q=>Q.tileID.key):B.map(Q=>Q.tileID).sort(jt).map(Q=>Q.key)}hasRenderableParent(w){let B=this.findLoadedParent(w,0);return!!B&&this._isIdRenderable(B.tileID.key)}_isIdRenderable(w,B){return this._tiles[w]&&this._tiles[w].hasData()&&!this._coveredTiles[w]&&(B||!this._tiles[w].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let w in this._tiles)this._tiles[w].state!=="errored"&&this._reloadTile(w,"reloading")}}_reloadTile(w,B){return a._(this,void 0,void 0,function*(){let Q=this._tiles[w];Q&&(Q.state!=="loading"&&(Q.state=B),yield this._loadTile(Q,w,B))})}_tileLoaded(w,B,Q){w.timeAdded=u.now(),Q==="expired"&&(w.refreshedUponExpiration=!0),this._setTileReloadTimer(B,w),this.getSource().type==="raster-dem"&&w.dem&&this._backfillDEM(w),this._state.initializeTileState(w,this.map?this.map.painter:null),w.aborted||this._source.fire(new a.k("data",{dataType:"source",tile:w,coord:w.tileID}))}_backfillDEM(w){let B=this.getRenderableIds();for(let ee=0;ee1||(Math.abs(Fe)>1&&(Math.abs(Fe+ut)===1?Fe+=ut:Math.abs(Fe-ut)===1&&(Fe-=ut)),le.dem&&ee.dem&&(ee.dem.backfillBorder(le.dem,Fe,Ze),ee.neighboringTiles&&ee.neighboringTiles[Mt]&&(ee.neighboringTiles[Mt].backfilled=!0)))}}getTile(w){return this.getTileByID(w.key)}getTileByID(w){return this._tiles[w]}_retainLoadedChildren(w,B,Q,ee){for(let le in this._tiles){let Fe=this._tiles[le];if(ee[le]||!Fe.hasData()||Fe.tileID.overscaledZ<=B||Fe.tileID.overscaledZ>Q)continue;let Ze=Fe.tileID;for(;Fe&&Fe.tileID.overscaledZ>B+1;){let Mt=Fe.tileID.scaledTo(Fe.tileID.overscaledZ-1);Fe=this._tiles[Mt.key],Fe&&Fe.hasData()&&(Ze=Mt)}let ut=Ze;for(;ut.overscaledZ>B;)if(ut=ut.scaledTo(ut.overscaledZ-1),w[ut.key]){ee[Ze.key]=Ze;break}}}findLoadedParent(w,B){if(w.key in this._loadedParentTiles){let Q=this._loadedParentTiles[w.key];return Q&&Q.tileID.overscaledZ>=B?Q:null}for(let Q=w.overscaledZ-1;Q>=B;Q--){let ee=w.scaledTo(Q),le=this._getLoadedTile(ee);if(le)return le}}findLoadedSibling(w){return this._getLoadedTile(w)}_getLoadedTile(w){let B=this._tiles[w.key];return B&&B.hasData()?B:this._cache.getByKey(w.wrapped().key)}updateCacheSize(w){let B=Math.ceil(w.width/this._source.tileSize)+1,Q=Math.ceil(w.height/this._source.tileSize)+1,ee=Math.floor(B*Q*(this._maxTileCacheZoomLevels===null?a.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),le=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,ee):ee;this._cache.setMaxSize(le)}handleWrapJump(w){let B=Math.round((w-(this._prevLng===void 0?w:this._prevLng))/360);if(this._prevLng=w,B){let Q={};for(let ee in this._tiles){let le=this._tiles[ee];le.tileID=le.tileID.unwrapTo(le.tileID.wrap+B),Q[le.tileID.key]=le}this._tiles=Q;for(let ee in this._timers)clearTimeout(this._timers[ee]),delete this._timers[ee];for(let ee in this._tiles)this._setTileReloadTimer(ee,this._tiles[ee])}}_updateCoveredAndRetainedTiles(w,B,Q,ee,le,Fe){let Ze={},ut={},Mt=Object.keys(w),Jt=u.now();for(let $t of Mt){let yr=w[$t],Cr=this._tiles[$t];if(!Cr||Cr.fadeEndTime!==0&&Cr.fadeEndTime<=Jt)continue;let ve=this.findLoadedParent(yr,B),xe=this.findLoadedSibling(yr),Ie=ve||xe||null;Ie&&(this._addTile(Ie.tileID),Ze[Ie.tileID.key]=Ie.tileID),ut[$t]=yr}this._retainLoadedChildren(ut,ee,Q,w);for(let $t in Ze)w[$t]||(this._coveredTiles[$t]=!0,w[$t]=Ze[$t]);if(Fe){let $t={},yr={};for(let Cr of le)this._tiles[Cr.key].hasData()?$t[Cr.key]=Cr:yr[Cr.key]=Cr;for(let Cr in yr){let ve=yr[Cr].children(this._source.maxzoom);this._tiles[ve[0].key]&&this._tiles[ve[1].key]&&this._tiles[ve[2].key]&&this._tiles[ve[3].key]&&($t[ve[0].key]=w[ve[0].key]=ve[0],$t[ve[1].key]=w[ve[1].key]=ve[1],$t[ve[2].key]=w[ve[2].key]=ve[2],$t[ve[3].key]=w[ve[3].key]=ve[3],delete yr[Cr])}for(let Cr in yr){let ve=yr[Cr],xe=this.findLoadedParent(ve,this._source.minzoom),Ie=this.findLoadedSibling(ve),ze=xe||Ie||null;if(ze){$t[ze.tileID.key]=w[ze.tileID.key]=ze.tileID;for(let Qe in $t)$t[Qe].isChildOf(ze.tileID)&&delete $t[Qe]}}for(let Cr in this._tiles)$t[Cr]||(this._coveredTiles[Cr]=!0)}}update(w,B){if(!this._sourceLoaded||this._paused)return;let Q;this.transform=w,this.terrain=B,this.updateCacheSize(w),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Q=w.getVisibleUnwrappedCoordinates(this._source.tileID).map(Jt=>new a.S(Jt.canonical.z,Jt.wrap,Jt.canonical.z,Jt.canonical.x,Jt.canonical.y)):(Q=w.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:B}),this._source.hasTile&&(Q=Q.filter(Jt=>this._source.hasTile(Jt)))):Q=[];let ee=w.coveringZoomLevel(this._source),le=Math.max(ee-pt.maxOverzooming,this._source.minzoom),Fe=Math.max(ee+pt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Jt={};for(let $t of Q)if($t.canonical.z>this._source.minzoom){let yr=$t.scaledTo($t.canonical.z-1);Jt[yr.key]=yr;let Cr=$t.scaledTo(Math.max(this._source.minzoom,Math.min($t.canonical.z,5)));Jt[Cr.key]=Cr}Q=Q.concat(Object.values(Jt))}let Ze=Q.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,Ze&&this.fire(new a.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let ut=this._updateRetainedTiles(Q,ee);or(this._source.type)&&this._updateCoveredAndRetainedTiles(ut,le,Fe,ee,Q,B);for(let Jt in ut)this._tiles[Jt].clearFadeHold();let Mt=a.ab(this._tiles,ut);for(let Jt of Mt){let $t=this._tiles[Jt];$t.hasSymbolBuckets&&!$t.holdingForFade()?$t.setHoldDuration(this.map._fadeDuration):$t.hasSymbolBuckets&&!$t.symbolFadeFinished()||this._removeTile(Jt)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let w in this._tiles)this._tiles[w].holdingForFade()&&this._removeTile(w)}_updateRetainedTiles(w,B){var Q;let ee={},le={},Fe=Math.max(B-pt.maxOverzooming,this._source.minzoom),Ze=Math.max(B+pt.maxUnderzooming,this._source.minzoom),ut={};for(let Mt of w){let Jt=this._addTile(Mt);ee[Mt.key]=Mt,Jt.hasData()||Bthis._source.maxzoom){let yr=Mt.children(this._source.maxzoom)[0],Cr=this.getTile(yr);if(Cr&&Cr.hasData()){ee[yr.key]=yr;continue}}else{let yr=Mt.children(this._source.maxzoom);if(ee[yr[0].key]&&ee[yr[1].key]&&ee[yr[2].key]&&ee[yr[3].key])continue}let $t=Jt.wasRequested();for(let yr=Mt.overscaledZ-1;yr>=Fe;--yr){let Cr=Mt.scaledTo(yr);if(le[Cr.key])break;if(le[Cr.key]=!0,Jt=this.getTile(Cr),!Jt&&$t&&(Jt=this._addTile(Cr)),Jt){let ve=Jt.hasData();if((ve||!(!((Q=this.map)===null||Q===void 0)&&Q.cancelPendingTileRequestsWhileZooming)||$t)&&(ee[Cr.key]=Cr),$t=Jt.wasRequested(),ve)break}}}return ee}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let w in this._tiles){let B=[],Q,ee=this._tiles[w].tileID;for(;ee.overscaledZ>0;){if(ee.key in this._loadedParentTiles){Q=this._loadedParentTiles[ee.key];break}B.push(ee.key);let le=ee.scaledTo(ee.overscaledZ-1);if(Q=this._getLoadedTile(le),Q)break;ee=le}for(let le of B)this._loadedParentTiles[le]=Q}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let w in this._tiles){let B=this._tiles[w].tileID,Q=this._getLoadedTile(B);this._loadedSiblingTiles[B.key]=Q}}_addTile(w){let B=this._tiles[w.key];if(B)return B;B=this._cache.getAndRemove(w),B&&(this._setTileReloadTimer(w.key,B),B.tileID=w,this._state.initializeTileState(B,this.map?this.map.painter:null),this._cacheTimers[w.key]&&(clearTimeout(this._cacheTimers[w.key]),delete this._cacheTimers[w.key],this._setTileReloadTimer(w.key,B)));let Q=B;return B||(B=new Tt(w,this._source.tileSize*w.overscaleFactor()),this._loadTile(B,w.key,B.state)),B.uses++,this._tiles[w.key]=B,Q||this._source.fire(new a.k("dataloading",{tile:B,coord:B.tileID,dataType:"source"})),B}_setTileReloadTimer(w,B){w in this._timers&&(clearTimeout(this._timers[w]),delete this._timers[w]);let Q=B.getExpiryTimeout();Q&&(this._timers[w]=setTimeout(()=>{this._reloadTile(w,"expired"),delete this._timers[w]},Q))}_removeTile(w){let B=this._tiles[w];B&&(B.uses--,delete this._tiles[w],this._timers[w]&&(clearTimeout(this._timers[w]),delete this._timers[w]),B.uses>0||(B.hasData()&&B.state!=="reloading"?this._cache.add(B.tileID,B,B.getExpiryTimeout()):(B.aborted=!0,this._abortTile(B),this._unloadTile(B))))}_dataHandler(w){let B=w.sourceDataType;w.dataType==="source"&&B==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&w.dataType==="source"&&B==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let w in this._tiles)this._removeTile(w);this._cache.reset()}tilesIn(w,B,Q){let ee=[],le=this.transform;if(!le)return ee;let Fe=Q?le.getCameraQueryGeometry(w):w,Ze=w.map(ve=>le.pointCoordinate(ve,this.terrain)),ut=Fe.map(ve=>le.pointCoordinate(ve,this.terrain)),Mt=this.getIds(),Jt=1/0,$t=1/0,yr=-1/0,Cr=-1/0;for(let ve of ut)Jt=Math.min(Jt,ve.x),$t=Math.min($t,ve.y),yr=Math.max(yr,ve.x),Cr=Math.max(Cr,ve.y);for(let ve=0;ve=0&&Xe[1].y+Qe>=0){let nt=Ze.map(Wt=>Ie.getTilePoint(Wt)),qt=ut.map(Wt=>Ie.getTilePoint(Wt));ee.push({tile:xe,tileID:Ie,queryGeometry:nt,cameraQueryGeometry:qt,scale:ze})}}return ee}getVisibleCoordinates(w){let B=this.getRenderableIds(w).map(Q=>this._tiles[Q].tileID);for(let Q of B)Q.posMatrix=this.transform.calculatePosMatrix(Q.toUnwrapped());return B}hasTransition(){if(this._source.hasTransition())return!0;if(or(this._source.type)){let w=u.now();for(let B in this._tiles)if(this._tiles[B].fadeEndTime>=w)return!0}return!1}setFeatureState(w,B,Q){this._state.updateState(w=w||"_geojsonTileLayer",B,Q)}removeFeatureState(w,B,Q){this._state.removeFeatureState(w=w||"_geojsonTileLayer",B,Q)}getFeatureState(w,B){return this._state.getState(w=w||"_geojsonTileLayer",B)}setDependencies(w,B,Q){let ee=this._tiles[w];ee&&ee.setDependencies(B,Q)}reloadTilesForDependencies(w,B){for(let Q in this._tiles)this._tiles[Q].hasDependency(w,B)&&this._reloadTile(Q,"reloading");this._cache.filter(Q=>!Q.hasDependency(w,B))}}function jt(ue,w){let B=Math.abs(2*ue.wrap)-+(ue.wrap<0),Q=Math.abs(2*w.wrap)-+(w.wrap<0);return ue.overscaledZ-w.overscaledZ||Q-B||w.canonical.y-ue.canonical.y||w.canonical.x-ue.canonical.x}function or(ue){return ue==="raster"||ue==="image"||ue==="video"}pt.maxOverzooming=10,pt.maxUnderzooming=3;class mr{constructor(w,B){this.reset(w,B)}reset(w,B){this.points=w||[],this._distances=[0];for(let Q=1;Q0?(ee-Fe)/Ze:0;return this.points[le].mult(1-ut).add(this.points[B].mult(ut))}}function Ar(ue,w){let B=!0;return ue==="always"||ue!=="never"&&w!=="never"||(B=!1),B}class ei{constructor(w,B,Q){let ee=this.boxCells=[],le=this.circleCells=[];this.xCellCount=Math.ceil(w/Q),this.yCellCount=Math.ceil(B/Q);for(let Fe=0;Fethis.width||ee<0||B>this.height)return[];let ut=[];if(w<=0&&B<=0&&this.width<=Q&&this.height<=ee){if(le)return[{key:null,x1:w,y1:B,x2:Q,y2:ee}];for(let Mt=0;Mt0}hitTestCircle(w,B,Q,ee,le){let Fe=w-Q,Ze=w+Q,ut=B-Q,Mt=B+Q;if(Ze<0||Fe>this.width||Mt<0||ut>this.height)return!1;let Jt=[];return this._forEachCell(Fe,ut,Ze,Mt,this._queryCellCircle,Jt,{hitTest:!0,overlapMode:ee,circle:{x:w,y:B,radius:Q},seenUids:{box:{},circle:{}}},le),Jt.length>0}_queryCell(w,B,Q,ee,le,Fe,Ze,ut){let{seenUids:Mt,hitTest:Jt,overlapMode:$t}=Ze,yr=this.boxCells[le];if(yr!==null){let ve=this.bboxes;for(let xe of yr)if(!Mt.box[xe]){Mt.box[xe]=!0;let Ie=4*xe,ze=this.boxKeys[xe];if(w<=ve[Ie+2]&&B<=ve[Ie+3]&&Q>=ve[Ie+0]&&ee>=ve[Ie+1]&&(!ut||ut(ze))&&(!Jt||!Ar($t,ze.overlapMode))&&(Fe.push({key:ze,x1:ve[Ie],y1:ve[Ie+1],x2:ve[Ie+2],y2:ve[Ie+3]}),Jt))return!0}}let Cr=this.circleCells[le];if(Cr!==null){let ve=this.circles;for(let xe of Cr)if(!Mt.circle[xe]){Mt.circle[xe]=!0;let Ie=3*xe,ze=this.circleKeys[xe];if(this._circleAndRectCollide(ve[Ie],ve[Ie+1],ve[Ie+2],w,B,Q,ee)&&(!ut||ut(ze))&&(!Jt||!Ar($t,ze.overlapMode))){let Qe=ve[Ie],Xe=ve[Ie+1],nt=ve[Ie+2];if(Fe.push({key:ze,x1:Qe-nt,y1:Xe-nt,x2:Qe+nt,y2:Xe+nt}),Jt)return!0}}}return!1}_queryCellCircle(w,B,Q,ee,le,Fe,Ze,ut){let{circle:Mt,seenUids:Jt,overlapMode:$t}=Ze,yr=this.boxCells[le];if(yr!==null){let ve=this.bboxes;for(let xe of yr)if(!Jt.box[xe]){Jt.box[xe]=!0;let Ie=4*xe,ze=this.boxKeys[xe];if(this._circleAndRectCollide(Mt.x,Mt.y,Mt.radius,ve[Ie+0],ve[Ie+1],ve[Ie+2],ve[Ie+3])&&(!ut||ut(ze))&&!Ar($t,ze.overlapMode))return Fe.push(!0),!0}}let Cr=this.circleCells[le];if(Cr!==null){let ve=this.circles;for(let xe of Cr)if(!Jt.circle[xe]){Jt.circle[xe]=!0;let Ie=3*xe,ze=this.circleKeys[xe];if(this._circlesCollide(ve[Ie],ve[Ie+1],ve[Ie+2],Mt.x,Mt.y,Mt.radius)&&(!ut||ut(ze))&&!Ar($t,ze.overlapMode))return Fe.push(!0),!0}}}_forEachCell(w,B,Q,ee,le,Fe,Ze,ut){let Mt=this._convertToXCellCoord(w),Jt=this._convertToYCellCoord(B),$t=this._convertToXCellCoord(Q),yr=this._convertToYCellCoord(ee);for(let Cr=Mt;Cr<=$t;Cr++)for(let ve=Jt;ve<=yr;ve++)if(le.call(this,w,B,Q,ee,this.xCellCount*ve+Cr,Fe,Ze,ut))return}_convertToXCellCoord(w){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(w*this.xScale)))}_convertToYCellCoord(w){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(w*this.yScale)))}_circlesCollide(w,B,Q,ee,le,Fe){let Ze=ee-w,ut=le-B,Mt=Q+Fe;return Mt*Mt>Ze*Ze+ut*ut}_circleAndRectCollide(w,B,Q,ee,le,Fe,Ze){let ut=(Fe-ee)/2,Mt=Math.abs(w-(ee+ut));if(Mt>ut+Q)return!1;let Jt=(Ze-le)/2,$t=Math.abs(B-(le+Jt));if($t>Jt+Q)return!1;if(Mt<=ut||$t<=Jt)return!0;let yr=Mt-ut,Cr=$t-Jt;return yr*yr+Cr*Cr<=Q*Q}}function qr(ue,w,B,Q,ee){let le=a.H();return w?(a.K(le,le,[1/ee,1/ee,1]),B||a.ad(le,le,Q.angle)):a.L(le,Q.labelPlaneMatrix,ue),le}function jr(ue,w,B,Q,ee){if(w){let le=a.ae(ue);return a.K(le,le,[ee,ee,1]),B||a.ad(le,le,-Q.angle),le}return Q.glCoordMatrix}function gt(ue,w,B,Q){let ee;Q?(ee=[ue,w,Q(ue,w),1],a.af(ee,ee,B)):(ee=[ue,w,0,1],ai(ee,ee,B));let le=ee[3];return{point:new a.P(ee[0]/le,ee[1]/le),signedDistanceFromCamera:le,isOccluded:!1}}function Ge(ue,w){return .5+ue/w*.5}function Je(ue,w){return ue.x>=-w[0]&&ue.x<=w[0]&&ue.y>=-w[1]&&ue.y<=w[1]}function We(ue,w,B,Q,ee,le,Fe,Ze,ut,Mt,Jt,$t,yr,Cr,ve){let xe=Q?ue.textSizeData:ue.iconSizeData,Ie=a.ag(xe,B.transform.zoom),ze=[256/B.width*2+1,256/B.height*2+1],Qe=Q?ue.text.dynamicLayoutVertexArray:ue.icon.dynamicLayoutVertexArray;Qe.clear();let Xe=ue.lineVertexArray,nt=Q?ue.text.placedSymbolArray:ue.icon.placedSymbolArray,qt=B.transform.width/B.transform.height,Wt=!1;for(let nr=0;nrMath.abs(B.x-w.x)*Q?{useVertical:!0}:(ue===a.ah.vertical?w.yB.x)?{needsFlipping:!0}:null}function At(ue,w,B,Q,ee,le,Fe,Ze,ut,Mt,Jt){let $t=B/24,yr=w.lineOffsetX*$t,Cr=w.lineOffsetY*$t,ve;if(w.numGlyphs>1){let xe=w.glyphStartIndex+w.numGlyphs,Ie=w.lineStartIndex,ze=w.lineStartIndex+w.lineLength,Qe=et($t,Ze,yr,Cr,Q,w,Jt,ue);if(!Qe)return{notEnoughRoom:!0};let Xe=gt(Qe.first.point.x,Qe.first.point.y,Fe,ue.getElevation).point,nt=gt(Qe.last.point.x,Qe.last.point.y,Fe,ue.getElevation).point;if(ee&&!Q){let qt=xt(w.writingMode,Xe,nt,Mt);if(qt)return qt}ve=[Qe.first];for(let qt=w.glyphStartIndex+1;qt0?Xe.point:function(Wt,nr,fr,br,Fr,Hr){return Kt(Wt,nr,fr,1,Fr,Hr)}(ue.tileAnchorPoint,Qe,Ie,0,le,ue),qt=xt(w.writingMode,Ie,nt,Mt);if(qt)return qt}let xe=Yr($t*Ze.getoffsetX(w.glyphStartIndex),yr,Cr,Q,w.segment,w.lineStartIndex,w.lineStartIndex+w.lineLength,ue,Jt);if(!xe||ue.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};ve=[xe]}for(let xe of ve)a.aj(ut,xe.point,xe.angle);return{}}function Kt(ue,w,B,Q,ee,le){let Fe=ue.add(ue.sub(w)._unit()),Ze=ee!==void 0?gt(Fe.x,Fe.y,ee,le.getElevation).point:Mr(Fe.x,Fe.y,le).point,ut=B.sub(Ze);return B.add(ut._mult(Q/ut.mag()))}function Qt(ue,w,B){let Q=w.projectionCache;if(Q.projections[ue])return Q.projections[ue];let ee=new a.P(w.lineVertexArray.getx(ue),w.lineVertexArray.gety(ue)),le=Mr(ee.x,ee.y,w);if(le.signedDistanceFromCamera>0)return Q.projections[ue]=le.point,Q.anyProjectionOccluded=Q.anyProjectionOccluded||le.isOccluded,le.point;let Fe=ue-B.direction;return function(Ze,ut,Mt,Jt,$t){return Kt(Ze,ut,Mt,Jt,void 0,$t)}(B.distanceFromAnchor===0?w.tileAnchorPoint:new a.P(w.lineVertexArray.getx(Fe),w.lineVertexArray.gety(Fe)),ee,B.previousVertex,B.absOffsetX-B.distanceFromAnchor+1,w)}function Mr(ue,w,B){let Q=ue+B.translation[0],ee=w+B.translation[1],le;return!B.pitchWithMap&&B.projection.useSpecialProjectionForSymbols?(le=B.projection.projectTileCoordinates(Q,ee,B.unwrappedTileID,B.getElevation),le.point.x=(.5*le.point.x+.5)*B.width,le.point.y=(.5*-le.point.y+.5)*B.height):(le=gt(Q,ee,B.labelPlaneMatrix,B.getElevation),le.isOccluded=!1),le}function Gr(ue,w,B){return ue._unit()._perp()._mult(w*B)}function Ir(ue,w,B,Q,ee,le,Fe,Ze,ut){if(Ze.projectionCache.offsets[ue])return Ze.projectionCache.offsets[ue];let Mt=B.add(w);if(ue+ut.direction=ee)return Ze.projectionCache.offsets[ue]=Mt,Mt;let Jt=Qt(ue+ut.direction,Ze,ut),$t=Gr(Jt.sub(B),Fe,ut.direction),yr=B.add($t),Cr=Jt.add($t);return Ze.projectionCache.offsets[ue]=a.ak(le,Mt,yr,Cr)||Mt,Ze.projectionCache.offsets[ue]}function Yr(ue,w,B,Q,ee,le,Fe,Ze,ut){let Mt=Q?ue-w:ue+w,Jt=Mt>0?1:-1,$t=0;Q&&(Jt*=-1,$t=Math.PI),Jt<0&&($t+=Math.PI);let yr,Cr=Jt>0?le+ee:le+ee+1;Ze.projectionCache.cachedAnchorPoint?yr=Ze.projectionCache.cachedAnchorPoint:(yr=Mr(Ze.tileAnchorPoint.x,Ze.tileAnchorPoint.y,Ze).point,Ze.projectionCache.cachedAnchorPoint=yr);let ve,xe,Ie=yr,ze=yr,Qe=0,Xe=0,nt=Math.abs(Mt),qt=[],Wt;for(;Qe+Xe<=nt;){if(Cr+=Jt,Cr=Fe)return null;Qe+=Xe,ze=Ie,xe=ve;let br={absOffsetX:nt,direction:Jt,distanceFromAnchor:Qe,previousVertex:ze};if(Ie=Qt(Cr,Ze,br),B===0)qt.push(ze),Wt=Ie.sub(ze);else{let Fr,Hr=Ie.sub(ze);Fr=Hr.mag()===0?Gr(Qt(Cr+Jt,Ze,br).sub(Ie),B,Jt):Gr(Hr,B,Jt),xe||(xe=ze.add(Fr)),ve=Ir(Cr,Fr,Ie,le,Fe,xe,B,Ze,br),qt.push(xe),Wt=ve.sub(xe)}Xe=Wt.mag()}let nr=Wt._mult((nt-Qe)/Xe)._add(xe||ze),fr=$t+Math.atan2(Ie.y-ze.y,Ie.x-ze.x);return qt.push(nr),{point:nr,angle:ut?fr:0,path:qt}}let _i=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Pi(ue,w){for(let B=0;B=1;fa--)Ln.push(cn.path[fa]);for(let fa=1;fa$a.signedDistanceFromCamera<=0)?[]:fa.map($a=>$a.point)}let Aa=[];if(Ln.length>0){let fa=Ln[0].clone(),$a=Ln[0].clone();for(let Co=1;Co=Hr.x&&$a.x<=ri.x&&fa.y>=Hr.y&&$a.y<=ri.y?[Ln]:$a.xri.x||$a.yri.y?[]:a.al([Ln],Hr.x,Hr.y,ri.x,ri.y)}for(let fa of Aa){Ci.reset(fa,.25*Fr);let $a=0;$a=Ci.length<=.5*Fr?1:Math.ceil(Ci.paddedLength/Yn)+1;for(let Co=0;Co<$a;Co++){let Qa=Co/Math.max($a-1,1),mo=Ci.lerp(Qa),Bo=mo.x+mi,Ps=mo.y+mi;ze.push(Bo,Ps,Fr,0);let Ts=Bo-Fr,wo=Ps-Fr,To=Bo+Fr,hl=Ps+Fr;if(br=br&&this.isOffscreen(Ts,wo,To,hl),fr=fr||this.isInsideGrid(Ts,wo,To,hl),w!=="always"&&this.grid.hitTestCircle(Bo,Ps,Fr,w,yr)&&(nr=!0,!Jt))return{circles:[],offscreen:!1,collisionDetected:nr}}}}return{circles:!Jt&&nr||!fr||Xegt(ee.x,ee.y,Q,B.getElevation))}queryRenderedSymbols(w){if(w.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let B=[],Q=1/0,ee=1/0,le=-1/0,Fe=-1/0;for(let Jt of w){let $t=new a.P(Jt.x+mi,Jt.y+mi);Q=Math.min(Q,$t.x),ee=Math.min(ee,$t.y),le=Math.max(le,$t.x),Fe=Math.max(Fe,$t.y),B.push($t)}let Ze=this.grid.query(Q,ee,le,Fe).concat(this.ignoredGrid.query(Q,ee,le,Fe)),ut={},Mt={};for(let Jt of Ze){let $t=Jt.key;if(ut[$t.bucketInstanceId]===void 0&&(ut[$t.bucketInstanceId]={}),ut[$t.bucketInstanceId][$t.featureIndex])continue;let yr=[new a.P(Jt.x1,Jt.y1),new a.P(Jt.x2,Jt.y1),new a.P(Jt.x2,Jt.y2),new a.P(Jt.x1,Jt.y2)];a.am(B,yr)&&(ut[$t.bucketInstanceId][$t.featureIndex]=!0,Mt[$t.bucketInstanceId]===void 0&&(Mt[$t.bucketInstanceId]=[]),Mt[$t.bucketInstanceId].push($t.featureIndex))}return Mt}insertCollisionBox(w,B,Q,ee,le,Fe){(Q?this.ignoredGrid:this.grid).insert({bucketInstanceId:ee,featureIndex:le,collisionGroupID:Fe,overlapMode:B},w[0],w[1],w[2],w[3])}insertCollisionCircles(w,B,Q,ee,le,Fe){let Ze=Q?this.ignoredGrid:this.grid,ut={bucketInstanceId:ee,featureIndex:le,collisionGroupID:Fe,overlapMode:B};for(let Mt=0;Mt=this.screenRightBoundary||eethis.screenBottomBoundary}isInsideGrid(w,B,Q,ee){return Q>=0&&w=0&&Bthis.projectAndGetPerspectiveRatio(Q,Fr.x,Fr.y,ee,Mt));fr=br.some(Fr=>!Fr.isOccluded),nr=br.map(Fr=>Fr.point)}else fr=!0;return{box:a.ao(nr),allPointsOccluded:!fr}}}function Fn(ue,w,B){return w*(a.X/(ue.tileSize*Math.pow(2,B-ue.tileID.overscaledZ)))}class An{constructor(w,B,Q,ee){this.opacity=w?Math.max(0,Math.min(1,w.opacity+(w.placed?B:-B))):ee&&Q?1:0,this.placed=Q}isHidden(){return this.opacity===0&&!this.placed}}class Hn{constructor(w,B,Q,ee,le){this.text=new An(w?w.text:null,B,Q,le),this.icon=new An(w?w.icon:null,B,ee,le)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Qn{constructor(w,B,Q){this.text=w,this.icon=B,this.skipFade=Q}}class Vi{constructor(){this.invProjMatrix=a.H(),this.viewportMatrix=a.H(),this.circles=[]}}class Kn{constructor(w,B,Q,ee,le){this.bucketInstanceId=w,this.featureIndex=B,this.sourceLayerIndex=Q,this.bucketIndex=ee,this.tileID=le}}class Jn{constructor(w){this.crossSourceCollisions=w,this.maxGroupID=0,this.collisionGroups={}}get(w){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[w]){let B=++this.maxGroupID;this.collisionGroups[w]={ID:B,predicate:Q=>Q.collisionGroupID===B}}return this.collisionGroups[w]}}function Gt(ue,w,B,Q,ee){let{horizontalAlign:le,verticalAlign:Fe}=a.au(ue);return new a.P(-(le-.5)*w+Q[0]*ee,-(Fe-.5)*B+Q[1]*ee)}class wt{constructor(w,B,Q,ee,le,Fe){this.transform=w.clone(),this.terrain=Q,this.collisionIndex=new un(this.transform,B),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ee,this.retainedQueryData={},this.collisionGroups=new Jn(le),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=Fe,Fe&&(Fe.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(w){let B=this.terrain;return B?(Q,ee)=>B.getElevation(w,Q,ee):null}getBucketParts(w,B,Q,ee){let le=Q.getBucket(B),Fe=Q.latestFeatureIndex;if(!le||!Fe||B.id!==le.layerIds[0])return;let Ze=Q.collisionBoxArray,ut=le.layers[0].layout,Mt=le.layers[0].paint,Jt=Math.pow(2,this.transform.zoom-Q.tileID.overscaledZ),$t=Q.tileSize/a.X,yr=Q.tileID.toUnwrapped(),Cr=this.transform.calculatePosMatrix(yr),ve=ut.get("text-pitch-alignment")==="map",xe=ut.get("text-rotation-alignment")==="map",Ie=Fn(Q,1,this.transform.zoom),ze=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,Mt.get("text-translate"),Mt.get("text-translate-anchor")),Qe=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,Mt.get("icon-translate"),Mt.get("icon-translate-anchor")),Xe=qr(Cr,ve,xe,this.transform,Ie),nt=null;if(ve){let Wt=jr(Cr,ve,xe,this.transform,Ie);nt=a.L([],this.transform.labelPlaneMatrix,Wt)}this.retainedQueryData[le.bucketInstanceId]=new Kn(le.bucketInstanceId,Fe,le.sourceLayerIndex,le.index,Q.tileID);let qt={bucket:le,layout:ut,translationText:ze,translationIcon:Qe,posMatrix:Cr,unwrappedTileID:yr,textLabelPlaneMatrix:Xe,labelToScreenMatrix:nt,scale:Jt,textPixelRatio:$t,holdingForFade:Q.holdingForFade(),collisionBoxArray:Ze,partiallyEvaluatedTextSize:a.ag(le.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(le.sourceID)};if(ee)for(let Wt of le.sortKeyRanges){let{sortKey:nr,symbolInstanceStart:fr,symbolInstanceEnd:br}=Wt;w.push({sortKey:nr,symbolInstanceStart:fr,symbolInstanceEnd:br,parameters:qt})}else w.push({symbolInstanceStart:0,symbolInstanceEnd:le.symbolInstances.length,parameters:qt})}attemptAnchorPlacement(w,B,Q,ee,le,Fe,Ze,ut,Mt,Jt,$t,yr,Cr,ve,xe,Ie,ze,Qe,Xe){let nt=a.aq[w.textAnchor],qt=[w.textOffset0,w.textOffset1],Wt=Gt(nt,Q,ee,qt,le),nr=this.collisionIndex.placeCollisionBox(B,yr,ut,Mt,Jt,Ze,Fe,Ie,$t.predicate,Xe,Wt);if((!Qe||this.collisionIndex.placeCollisionBox(Qe,yr,ut,Mt,Jt,Ze,Fe,ze,$t.predicate,Xe,Wt).placeable)&&nr.placeable){let fr;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Cr.crossTileID]&&this.prevPlacement.placements[Cr.crossTileID]&&this.prevPlacement.placements[Cr.crossTileID].text&&(fr=this.prevPlacement.variableOffsets[Cr.crossTileID].anchor),Cr.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Cr.crossTileID]={textOffset:qt,width:Q,height:ee,anchor:nt,textBoxScale:le,prevAnchor:fr},this.markUsedJustification(ve,nt,Cr,xe),ve.allowVerticalPlacement&&(this.markUsedOrientation(ve,xe,Cr),this.placedOrientations[Cr.crossTileID]=xe),{shift:Wt,placedGlyphBoxes:nr}}}placeLayerBucketPart(w,B,Q){let{bucket:ee,layout:le,translationText:Fe,translationIcon:Ze,posMatrix:ut,unwrappedTileID:Mt,textLabelPlaneMatrix:Jt,labelToScreenMatrix:$t,textPixelRatio:yr,holdingForFade:Cr,collisionBoxArray:ve,partiallyEvaluatedTextSize:xe,collisionGroup:Ie}=w.parameters,ze=le.get("text-optional"),Qe=le.get("icon-optional"),Xe=a.ar(le,"text-overlap","text-allow-overlap"),nt=Xe==="always",qt=a.ar(le,"icon-overlap","icon-allow-overlap"),Wt=qt==="always",nr=le.get("text-rotation-alignment")==="map",fr=le.get("text-pitch-alignment")==="map",br=le.get("icon-text-fit")!=="none",Fr=le.get("symbol-z-order")==="viewport-y",Hr=nt&&(Wt||!ee.hasIconData()||Qe),ri=Wt&&(nt||!ee.hasTextData()||ze);!ee.collisionArrays&&ve&&ee.deserializeCollisionBoxes(ve);let Ci=this._getTerrainElevationFunc(this.retainedQueryData[ee.bucketInstanceId].tileID),cn=(sn,Ln,Yn)=>{var Aa,fa;if(B[sn.crossTileID])return;if(Cr)return void(this.placements[sn.crossTileID]=new Qn(!1,!1,!1));let $a=!1,Co=!1,Qa=!0,mo=null,Bo={box:null,placeable:!1,offscreen:null},Ps={box:null,placeable:!1,offscreen:null},Ts=null,wo=null,To=null,hl=0,Ul=0,Lu=0;Ln.textFeatureIndex?hl=Ln.textFeatureIndex:sn.useRuntimeCollisionCircles&&(hl=sn.featureIndex),Ln.verticalTextFeatureIndex&&(Ul=Ln.verticalTextFeatureIndex);let au=Ln.textBox;if(au){let Tl=Te=>{let qe=a.ah.horizontal;if(ee.allowVerticalPlacement&&!Te&&this.prevPlacement){let Ve=this.prevPlacement.placedOrientations[sn.crossTileID];Ve&&(this.placedOrientations[sn.crossTileID]=Ve,qe=Ve,this.markUsedOrientation(ee,qe,sn))}return qe},Al=(Te,qe)=>{if(ee.allowVerticalPlacement&&sn.numVerticalGlyphVertices>0&&Ln.verticalTextBox){for(let Ve of ee.writingModes)if(Ve===a.ah.vertical?(Bo=qe(),Ps=Bo):Bo=Te(),Bo&&Bo.placeable)break}else Bo=Te()},X=sn.textAnchorOffsetStartIndex,se=sn.textAnchorOffsetEndIndex;if(se===X){let Te=(qe,Ve)=>{let Ye=this.collisionIndex.placeCollisionBox(qe,Xe,yr,ut,Mt,fr,nr,Fe,Ie.predicate,Ci);return Ye&&Ye.placeable&&(this.markUsedOrientation(ee,Ve,sn),this.placedOrientations[sn.crossTileID]=Ve),Ye};Al(()=>Te(au,a.ah.horizontal),()=>{let qe=Ln.verticalTextBox;return ee.allowVerticalPlacement&&sn.numVerticalGlyphVertices>0&&qe?Te(qe,a.ah.vertical):{box:null,offscreen:null}}),Tl(Bo&&Bo.placeable)}else{let Te=a.aq[(fa=(Aa=this.prevPlacement)===null||Aa===void 0?void 0:Aa.variableOffsets[sn.crossTileID])===null||fa===void 0?void 0:fa.anchor],qe=(Ye,Pt,ot)=>{let Xt=Ye.x2-Ye.x1,dr=Ye.y2-Ye.y1,pr=sn.textBoxScale,Ur=br&&qt==="never"?Pt:null,zr=null,gi=Xe==="never"?1:2,xi="never";Te&&gi++;for(let Wr=0;Wrqe(au,Ln.iconBox,a.ah.horizontal),()=>{let Ye=Ln.verticalTextBox;return ee.allowVerticalPlacement&&(!Bo||!Bo.placeable)&&sn.numVerticalGlyphVertices>0&&Ye?qe(Ye,Ln.verticalIconBox,a.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Bo&&($a=Bo.placeable,Qa=Bo.offscreen);let Ve=Tl(Bo&&Bo.placeable);if(!$a&&this.prevPlacement){let Ye=this.prevPlacement.variableOffsets[sn.crossTileID];Ye&&(this.variableOffsets[sn.crossTileID]=Ye,this.markUsedJustification(ee,Ye.anchor,sn,Ve))}}}if(Ts=Bo,$a=Ts&&Ts.placeable,Qa=Ts&&Ts.offscreen,sn.useRuntimeCollisionCircles){let Tl=ee.text.placedSymbolArray.get(sn.centerJustifiedTextSymbolIndex),Al=a.ai(ee.textSizeData,xe,Tl),X=le.get("text-padding");wo=this.collisionIndex.placeCollisionCircles(Xe,Tl,ee.lineVertexArray,ee.glyphOffsetArray,Al,ut,Mt,Jt,$t,Q,fr,Ie.predicate,sn.collisionCircleDiameter,X,Fe,Ci),wo.circles.length&&wo.collisionDetected&&!Q&&a.w("Collisions detected, but collision boxes are not shown"),$a=nt||wo.circles.length>0&&!wo.collisionDetected,Qa=Qa&&wo.offscreen}if(Ln.iconFeatureIndex&&(Lu=Ln.iconFeatureIndex),Ln.iconBox){let Tl=Al=>this.collisionIndex.placeCollisionBox(Al,qt,yr,ut,Mt,fr,nr,Ze,Ie.predicate,Ci,br&&mo?mo:void 0);Ps&&Ps.placeable&&Ln.verticalIconBox?(To=Tl(Ln.verticalIconBox),Co=To.placeable):(To=Tl(Ln.iconBox),Co=To.placeable),Qa=Qa&&To.offscreen}let Js=ze||sn.numHorizontalGlyphVertices===0&&sn.numVerticalGlyphVertices===0,eu=Qe||sn.numIconVertices===0;Js||eu?eu?Js||(Co=Co&&$a):$a=Co&&$a:Co=$a=Co&&$a;let dc=Co&&To.placeable;if($a&&Ts.placeable&&this.collisionIndex.insertCollisionBox(Ts.box,Xe,le.get("text-ignore-placement"),ee.bucketInstanceId,Ps&&Ps.placeable&&Ul?Ul:hl,Ie.ID),dc&&this.collisionIndex.insertCollisionBox(To.box,qt,le.get("icon-ignore-placement"),ee.bucketInstanceId,Lu,Ie.ID),wo&&$a&&this.collisionIndex.insertCollisionCircles(wo.circles,Xe,le.get("text-ignore-placement"),ee.bucketInstanceId,hl,Ie.ID),Q&&this.storeCollisionData(ee.bucketInstanceId,Yn,Ln,Ts,To,wo),sn.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(ee.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[sn.crossTileID]=new Qn($a||Hr,Co||ri,Qa||ee.justReloaded),B[sn.crossTileID]=!0};if(Fr){if(w.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let sn=ee.getSortedSymbolIndexes(this.transform.angle);for(let Ln=sn.length-1;Ln>=0;--Ln){let Yn=sn[Ln];cn(ee.symbolInstances.get(Yn),ee.collisionArrays[Yn],Yn)}}else for(let sn=w.symbolInstanceStart;sn=0&&(w.text.placedSymbolArray.get(Ze).crossTileID=le>=0&&Ze!==le?0:Q.crossTileID)}markUsedOrientation(w,B,Q){let ee=B===a.ah.horizontal||B===a.ah.horizontalOnly?B:0,le=B===a.ah.vertical?B:0,Fe=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex];for(let Ze of Fe)w.text.placedSymbolArray.get(Ze).placedOrientation=ee;Q.verticalPlacedTextSymbolIndex&&(w.text.placedSymbolArray.get(Q.verticalPlacedTextSymbolIndex).placedOrientation=le)}commit(w){this.commitTime=w,this.zoomAtLastRecencyCheck=this.transform.zoom;let B=this.prevPlacement,Q=!1;this.prevZoomAdjustment=B?B.zoomAdjustment(this.transform.zoom):0;let ee=B?B.symbolFadeChange(w):1,le=B?B.opacities:{},Fe=B?B.variableOffsets:{},Ze=B?B.placedOrientations:{};for(let ut in this.placements){let Mt=this.placements[ut],Jt=le[ut];Jt?(this.opacities[ut]=new Hn(Jt,ee,Mt.text,Mt.icon),Q=Q||Mt.text!==Jt.text.placed||Mt.icon!==Jt.icon.placed):(this.opacities[ut]=new Hn(null,ee,Mt.text,Mt.icon,Mt.skipFade),Q=Q||Mt.text||Mt.icon)}for(let ut in le){let Mt=le[ut];if(!this.opacities[ut]){let Jt=new Hn(Mt,ee,!1,!1);Jt.isHidden()||(this.opacities[ut]=Jt,Q=Q||Mt.text.placed||Mt.icon.placed)}}for(let ut in Fe)this.variableOffsets[ut]||!this.opacities[ut]||this.opacities[ut].isHidden()||(this.variableOffsets[ut]=Fe[ut]);for(let ut in Ze)this.placedOrientations[ut]||!this.opacities[ut]||this.opacities[ut].isHidden()||(this.placedOrientations[ut]=Ze[ut]);if(B&&B.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");Q?this.lastPlacementChangeTime=w:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=B?B.lastPlacementChangeTime:w)}updateLayerOpacities(w,B){let Q={};for(let ee of B){let le=ee.getBucket(w);le&&ee.latestFeatureIndex&&w.id===le.layerIds[0]&&this.updateBucketOpacities(le,ee.tileID,Q,ee.collisionBoxArray)}}updateBucketOpacities(w,B,Q,ee){w.hasTextData()&&(w.text.opacityVertexArray.clear(),w.text.hasVisibleVertices=!1),w.hasIconData()&&(w.icon.opacityVertexArray.clear(),w.icon.hasVisibleVertices=!1),w.hasIconCollisionBoxData()&&w.iconCollisionBox.collisionVertexArray.clear(),w.hasTextCollisionBoxData()&&w.textCollisionBox.collisionVertexArray.clear();let le=w.layers[0],Fe=le.layout,Ze=new Hn(null,0,!1,!1,!0),ut=Fe.get("text-allow-overlap"),Mt=Fe.get("icon-allow-overlap"),Jt=le._unevaluatedLayout.hasValue("text-variable-anchor")||le._unevaluatedLayout.hasValue("text-variable-anchor-offset"),$t=Fe.get("text-rotation-alignment")==="map",yr=Fe.get("text-pitch-alignment")==="map",Cr=Fe.get("icon-text-fit")!=="none",ve=new Hn(null,0,ut&&(Mt||!w.hasIconData()||Fe.get("icon-optional")),Mt&&(ut||!w.hasTextData()||Fe.get("text-optional")),!0);!w.collisionArrays&&ee&&(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData())&&w.deserializeCollisionBoxes(ee);let xe=(ze,Qe,Xe)=>{for(let nt=0;nt0,fr=this.placedOrientations[Qe.crossTileID],br=fr===a.ah.vertical,Fr=fr===a.ah.horizontal||fr===a.ah.horizontalOnly;if(Xe>0||nt>0){let ri=en(Wt.text);xe(w.text,Xe,br?fn:ri),xe(w.text,nt,Fr?fn:ri);let Ci=Wt.text.isHidden();[Qe.rightJustifiedTextSymbolIndex,Qe.centerJustifiedTextSymbolIndex,Qe.leftJustifiedTextSymbolIndex].forEach(Ln=>{Ln>=0&&(w.text.placedSymbolArray.get(Ln).hidden=Ci||br?1:0)}),Qe.verticalPlacedTextSymbolIndex>=0&&(w.text.placedSymbolArray.get(Qe.verticalPlacedTextSymbolIndex).hidden=Ci||Fr?1:0);let cn=this.variableOffsets[Qe.crossTileID];cn&&this.markUsedJustification(w,cn.anchor,Qe,fr);let sn=this.placedOrientations[Qe.crossTileID];sn&&(this.markUsedJustification(w,"left",Qe,sn),this.markUsedOrientation(w,sn,Qe))}if(nr){let ri=en(Wt.icon),Ci=!(Cr&&Qe.verticalPlacedIconSymbolIndex&&br);Qe.placedIconSymbolIndex>=0&&(xe(w.icon,Qe.numIconVertices,Ci?ri:fn),w.icon.placedSymbolArray.get(Qe.placedIconSymbolIndex).hidden=Wt.icon.isHidden()),Qe.verticalPlacedIconSymbolIndex>=0&&(xe(w.icon,Qe.numVerticalIconVertices,Ci?fn:ri),w.icon.placedSymbolArray.get(Qe.verticalPlacedIconSymbolIndex).hidden=Wt.icon.isHidden())}let Hr=Ie&&Ie.has(ze)?Ie.get(ze):{text:null,icon:null};if(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData()){let ri=w.collisionArrays[ze];if(ri){let Ci=new a.P(0,0);if(ri.textBox||ri.verticalTextBox){let cn=!0;if(Jt){let sn=this.variableOffsets[qt];sn?(Ci=Gt(sn.anchor,sn.width,sn.height,sn.textOffset,sn.textBoxScale),$t&&Ci._rotate(yr?this.transform.angle:-this.transform.angle)):cn=!1}if(ri.textBox||ri.verticalTextBox){let sn;ri.textBox&&(sn=br),ri.verticalTextBox&&(sn=Fr),tr(w.textCollisionBox.collisionVertexArray,Wt.text.placed,!cn||sn,Hr.text,Ci.x,Ci.y)}}if(ri.iconBox||ri.verticalIconBox){let cn=!!(!Fr&&ri.verticalIconBox),sn;ri.iconBox&&(sn=cn),ri.verticalIconBox&&(sn=!cn),tr(w.iconCollisionBox.collisionVertexArray,Wt.icon.placed,sn,Hr.icon,Cr?Ci.x:0,Cr?Ci.y:0)}}}}if(w.sortFeatures(this.transform.angle),this.retainedQueryData[w.bucketInstanceId]&&(this.retainedQueryData[w.bucketInstanceId].featureSortOrder=w.featureSortOrder),w.hasTextData()&&w.text.opacityVertexBuffer&&w.text.opacityVertexBuffer.updateData(w.text.opacityVertexArray),w.hasIconData()&&w.icon.opacityVertexBuffer&&w.icon.opacityVertexBuffer.updateData(w.icon.opacityVertexArray),w.hasIconCollisionBoxData()&&w.iconCollisionBox.collisionVertexBuffer&&w.iconCollisionBox.collisionVertexBuffer.updateData(w.iconCollisionBox.collisionVertexArray),w.hasTextCollisionBoxData()&&w.textCollisionBox.collisionVertexBuffer&&w.textCollisionBox.collisionVertexBuffer.updateData(w.textCollisionBox.collisionVertexArray),w.text.opacityVertexArray.length!==w.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${w.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${w.text.layoutVertexArray.length}) / 4`);if(w.icon.opacityVertexArray.length!==w.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${w.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${w.icon.layoutVertexArray.length}) / 4`);if(w.bucketInstanceId in this.collisionCircleArrays){let ze=this.collisionCircleArrays[w.bucketInstanceId];w.placementInvProjMatrix=ze.invProjMatrix,w.placementViewportMatrix=ze.viewportMatrix,w.collisionCircleArray=ze.circles,delete this.collisionCircleArrays[w.bucketInstanceId]}}symbolFadeChange(w){return this.fadeDuration===0?1:(w-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(w){return Math.max(0,(this.transform.zoom-w)/1.5)}hasTransitions(w){return this.stale||w-this.lastPlacementChangeTimew}setStale(){this.stale=!0}}function tr(ue,w,B,Q,ee,le){Q&&Q.length!==0||(Q=[0,0,0,0]);let Fe=Q[0]-mi,Ze=Q[1]-mi,ut=Q[2]-mi,Mt=Q[3]-mi;ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,Fe,Ze),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,ut,Ze),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,ut,Mt),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,Fe,Mt)}let ir=Math.pow(2,25),wr=Math.pow(2,24),Xr=Math.pow(2,17),ti=Math.pow(2,16),$r=Math.pow(2,9),Ri=Math.pow(2,8),Zi=Math.pow(2,1);function en(ue){if(ue.opacity===0&&!ue.placed)return 0;if(ue.opacity===1&&ue.placed)return 4294967295;let w=ue.placed?1:0,B=Math.floor(127*ue.opacity);return B*ir+w*wr+B*Xr+w*ti+B*$r+w*Ri+B*Zi+w}let fn=0;function yn(){return{isOccluded:(ue,w,B)=>!1,getPitchedTextCorrection:(ue,w,B)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(ue,w,B,Q){throw new Error("Not implemented.")},translatePosition:(ue,w,B,Q)=>function(ee,le,Fe,Ze,ut=!1){if(!Fe[0]&&!Fe[1])return[0,0];let Mt=ut?Ze==="map"?ee.angle:0:Ze==="viewport"?-ee.angle:0;if(Mt){let Jt=Math.sin(Mt),$t=Math.cos(Mt);Fe=[Fe[0]*$t-Fe[1]*Jt,Fe[0]*Jt+Fe[1]*$t]}return[ut?Fe[0]:Fn(le,Fe[0],ee.zoom),ut?Fe[1]:Fn(le,Fe[1],ee.zoom)]}(ue,w,B,Q),getCircleRadiusCorrection:ue=>1}}class Mn{constructor(w){this._sortAcrossTiles=w.layout.get("symbol-z-order")!=="viewport-y"&&!w.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(w,B,Q,ee,le){let Fe=this._bucketParts;for(;this._currentTileIndexZe.sortKey-ut.sortKey));this._currentPartIndex!this._forceFullPlacement&&u.now()-ee>2;for(;this._currentPlacementIndex>=0;){let Fe=B[w[this._currentPlacementIndex]],Ze=this.placement.collisionIndex.transform.zoom;if(Fe.type==="symbol"&&(!Fe.minzoom||Fe.minzoom<=Ze)&&(!Fe.maxzoom||Fe.maxzoom>Ze)){if(this._inProgressLayer||(this._inProgressLayer=new Mn(Fe)),this._inProgressLayer.continuePlacement(Q[Fe.source],this.placement,this._showCollisionBoxes,Fe,le))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(w){return this.placement.commit(w),this.placement}}let ua=512/a.X/2;class ma{constructor(w,B,Q){this.tileID=w,this.bucketInstanceId=Q,this._symbolsByKey={};let ee=new Map;for(let le=0;le({x:Math.floor(ut.anchorX*ua),y:Math.floor(ut.anchorY*ua)})),crossTileIDs:Fe.map(ut=>ut.crossTileID)};if(Ze.positions.length>128){let ut=new a.av(Ze.positions.length,16,Uint16Array);for(let{x:Mt,y:Jt}of Ze.positions)ut.add(Mt,Jt);ut.finish(),delete Ze.positions,Ze.index=ut}this._symbolsByKey[le]=Ze}}getScaledCoordinates(w,B){let{x:Q,y:ee,z:le}=this.tileID.canonical,{x:Fe,y:Ze,z:ut}=B.canonical,Mt=ua/Math.pow(2,ut-le),Jt=(Ze*a.X+w.anchorY)*Mt,$t=ee*a.X*ua;return{x:Math.floor((Fe*a.X+w.anchorX)*Mt-Q*a.X*ua),y:Math.floor(Jt-$t)}}findMatches(w,B,Q){let ee=this.tileID.canonical.zw)}}class Wa{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Fa{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(w){let B=Math.round((w-this.lng)/360);if(B!==0)for(let Q in this.indexes){let ee=this.indexes[Q],le={};for(let Fe in ee){let Ze=ee[Fe];Ze.tileID=Ze.tileID.unwrapTo(Ze.tileID.wrap+B),le[Ze.tileID.key]=Ze}this.indexes[Q]=le}this.lng=w}addBucket(w,B,Q){if(this.indexes[w.overscaledZ]&&this.indexes[w.overscaledZ][w.key]){if(this.indexes[w.overscaledZ][w.key].bucketInstanceId===B.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(w.overscaledZ,this.indexes[w.overscaledZ][w.key])}for(let le=0;lew.overscaledZ)for(let Ze in Fe){let ut=Fe[Ze];ut.tileID.isChildOf(w)&&ut.findMatches(B.symbolInstances,w,ee)}else{let Ze=Fe[w.scaledTo(Number(le)).key];Ze&&Ze.findMatches(B.symbolInstances,w,ee)}}for(let le=0;le{B[Q]=!0});for(let Q in this.layerIndexes)B[Q]||delete this.layerIndexes[Q]}}let da=(ue,w)=>a.t(ue,w&&w.filter(B=>B.identifier!=="source.canvas")),jn=a.aw();class Ha extends a.E{constructor(w,B={}){super(),this._rtlPluginLoaded=()=>{for(let Q in this.sourceCaches){let ee=this.sourceCaches[Q].getSource().type;ee!=="vector"&&ee!=="geojson"||this.sourceCaches[Q].reload()}},this.map=w,this.dispatcher=new ke(Se(),w._getMapId()),this.dispatcher.registerMessageHandler("GG",(Q,ee)=>this.getGlyphs(Q,ee)),this.dispatcher.registerMessageHandler("GI",(Q,ee)=>this.getImages(Q,ee)),this.imageManager=new E,this.imageManager.setEventedParent(this),this.glyphManager=new G(w._requestManager,B.localIdeographFontFamily),this.lineAtlas=new ae(256,512),this.crossTileSymbolIndex=new Xo,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",a.ay()),St().on(Ue,this._rtlPluginLoaded),this.on("data",Q=>{if(Q.dataType!=="source"||Q.sourceDataType!=="metadata")return;let ee=this.sourceCaches[Q.sourceId];if(!ee)return;let le=ee.getSource();if(le&&le.vectorLayerIds)for(let Fe in this._layers){let Ze=this._layers[Fe];Ze.source===le.id&&this._validateLayer(Ze)}})}loadURL(w,B={},Q){this.fire(new a.k("dataloading",{dataType:"style"})),B.validate=typeof B.validate!="boolean"||B.validate;let ee=this.map._requestManager.transformRequest(w,"Style");this._loadStyleRequest=new AbortController;let le=this._loadStyleRequest;a.h(ee,this._loadStyleRequest).then(Fe=>{this._loadStyleRequest=null,this._load(Fe.data,B,Q)}).catch(Fe=>{this._loadStyleRequest=null,Fe&&!le.signal.aborted&&this.fire(new a.j(Fe))})}loadJSON(w,B={},Q){this.fire(new a.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,B.validate=B.validate!==!1,this._load(w,B,Q)}).catch(()=>{})}loadEmpty(){this.fire(new a.k("dataloading",{dataType:"style"})),this._load(jn,{validate:!1})}_load(w,B,Q){var ee;let le=B.transformStyle?B.transformStyle(Q,w):w;if(!B.validate||!da(this,a.u(le))){this._loaded=!0,this.stylesheet=le;for(let Fe in le.sources)this.addSource(Fe,le.sources[Fe],{validate:!1});le.sprite?this._loadSprite(le.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(le.glyphs),this._createLayers(),this.light=new N(this.stylesheet.light),this.sky=new ie(this.stylesheet.sky),this.map.setTerrain((ee=this.stylesheet.terrain)!==null&&ee!==void 0?ee:null),this.fire(new a.k("data",{dataType:"style"})),this.fire(new a.k("style.load"))}}_createLayers(){let w=a.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",w),this._order=w.map(B=>B.id),this._layers={},this._serializedLayers=null;for(let B of w){let Q=a.aA(B);Q.setEventedParent(this,{layer:{id:B.id}}),this._layers[B.id]=Q}}_loadSprite(w,B=!1,Q=void 0){let ee;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(le,Fe,Ze,ut){return a._(this,void 0,void 0,function*(){let Mt=C(le),Jt=Ze>1?"@2x":"",$t={},yr={};for(let{id:Cr,url:ve}of Mt){let xe=Fe.transformRequest(S(ve,Jt,".json"),"SpriteJSON");$t[Cr]=a.h(xe,ut);let Ie=Fe.transformRequest(S(ve,Jt,".png"),"SpriteImage");yr[Cr]=p.getImage(Ie,ut)}return yield Promise.all([...Object.values($t),...Object.values(yr)]),function(Cr,ve){return a._(this,void 0,void 0,function*(){let xe={};for(let Ie in Cr){xe[Ie]={};let ze=u.getImageCanvasContext((yield ve[Ie]).data),Qe=(yield Cr[Ie]).data;for(let Xe in Qe){let{width:nt,height:qt,x:Wt,y:nr,sdf:fr,pixelRatio:br,stretchX:Fr,stretchY:Hr,content:ri,textFitWidth:Ci,textFitHeight:cn}=Qe[Xe];xe[Ie][Xe]={data:null,pixelRatio:br,sdf:fr,stretchX:Fr,stretchY:Hr,content:ri,textFitWidth:Ci,textFitHeight:cn,spriteData:{width:nt,height:qt,x:Wt,y:nr,context:ze}}}}return xe})}($t,yr)})}(w,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(le=>{if(this._spriteRequest=null,le)for(let Fe in le){this._spritesImagesIds[Fe]=[];let Ze=this._spritesImagesIds[Fe]?this._spritesImagesIds[Fe].filter(ut=>!(ut in le)):[];for(let ut of Ze)this.imageManager.removeImage(ut),this._changedImages[ut]=!0;for(let ut in le[Fe]){let Mt=Fe==="default"?ut:`${Fe}:${ut}`;this._spritesImagesIds[Fe].push(Mt),Mt in this.imageManager.images?this.imageManager.updateImage(Mt,le[Fe][ut],!1):this.imageManager.addImage(Mt,le[Fe][ut]),B&&(this._changedImages[Mt]=!0)}}}).catch(le=>{this._spriteRequest=null,ee=le,this.fire(new a.j(ee))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),B&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"})),Q&&Q(ee)})}_unloadSprite(){for(let w of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(w),this._changedImages[w]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}_validateLayer(w){let B=this.sourceCaches[w.source];if(!B)return;let Q=w.sourceLayer;if(!Q)return;let ee=B.getSource();(ee.type==="geojson"||ee.vectorLayerIds&&ee.vectorLayerIds.indexOf(Q)===-1)&&this.fire(new a.j(new Error(`Source layer "${Q}" does not exist on source "${ee.id}" as specified by style layer "${w.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let w in this.sourceCaches)if(!this.sourceCaches[w].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(w,B=!1){let Q=this._serializedAllLayers();if(!w||w.length===0)return Object.values(B?a.aB(Q):Q);let ee=[];for(let le of w)if(Q[le]){let Fe=B?a.aB(Q[le]):Q[le];ee.push(Fe)}return ee}_serializedAllLayers(){let w=this._serializedLayers;if(w)return w;w=this._serializedLayers={};let B=Object.keys(this._layers);for(let Q of B){let ee=this._layers[Q];ee.type!=="custom"&&(w[Q]=ee.serialize())}return w}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let w in this.sourceCaches)if(this.sourceCaches[w].hasTransition())return!0;for(let w in this._layers)if(this._layers[w].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(w){if(!this._loaded)return;let B=this._changed;if(B){let ee=Object.keys(this._updatedLayers),le=Object.keys(this._removedLayers);(ee.length||le.length)&&this._updateWorkerLayers(ee,le);for(let Fe in this._updatedSources){let Ze=this._updatedSources[Fe];if(Ze==="reload")this._reloadSource(Fe);else{if(Ze!=="clear")throw new Error(`Invalid action ${Ze}`);this._clearSource(Fe)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let Fe in this._updatedPaintProps)this._layers[Fe].updateTransitions(w);this.light.updateTransitions(w),this.sky.updateTransitions(w),this._resetUpdates()}let Q={};for(let ee in this.sourceCaches){let le=this.sourceCaches[ee];Q[ee]=le.used,le.used=!1}for(let ee of this._order){let le=this._layers[ee];le.recalculate(w,this._availableImages),!le.isHidden(w.zoom)&&le.source&&(this.sourceCaches[le.source].used=!0)}for(let ee in Q){let le=this.sourceCaches[ee];!!Q[ee]!=!!le.used&&le.fire(new a.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:ee}))}this.light.recalculate(w),this.sky.recalculate(w),this.z=w.zoom,B&&this.fire(new a.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let w=Object.keys(this._changedImages);if(w.length){for(let B in this.sourceCaches)this.sourceCaches[B].reloadTilesForDependencies(["icons","patterns"],w);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let w in this.sourceCaches)this.sourceCaches[w].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(w,B){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(w,!1),removedIds:B})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(w,B={}){var Q;this._checkLoaded();let ee=this.serialize();if(w=B.transformStyle?B.transformStyle(ee,w):w,((Q=B.validate)===null||Q===void 0||Q)&&da(this,a.u(w)))return!1;(w=a.aB(w)).layers=a.az(w.layers);let le=a.aC(ee,w),Fe=this._getOperationsToPerform(le);if(Fe.unimplemented.length>0)throw new Error(`Unimplemented: ${Fe.unimplemented.join(", ")}.`);if(Fe.operations.length===0)return!1;for(let Ze of Fe.operations)Ze();return this.stylesheet=w,this._serializedLayers=null,!0}_getOperationsToPerform(w){let B=[],Q=[];for(let ee of w)switch(ee.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":B.push(()=>this.addLayer.apply(this,ee.args));break;case"removeLayer":B.push(()=>this.removeLayer.apply(this,ee.args));break;case"setPaintProperty":B.push(()=>this.setPaintProperty.apply(this,ee.args));break;case"setLayoutProperty":B.push(()=>this.setLayoutProperty.apply(this,ee.args));break;case"setFilter":B.push(()=>this.setFilter.apply(this,ee.args));break;case"addSource":B.push(()=>this.addSource.apply(this,ee.args));break;case"removeSource":B.push(()=>this.removeSource.apply(this,ee.args));break;case"setLayerZoomRange":B.push(()=>this.setLayerZoomRange.apply(this,ee.args));break;case"setLight":B.push(()=>this.setLight.apply(this,ee.args));break;case"setGeoJSONSourceData":B.push(()=>this.setGeoJSONSourceData.apply(this,ee.args));break;case"setGlyphs":B.push(()=>this.setGlyphs.apply(this,ee.args));break;case"setSprite":B.push(()=>this.setSprite.apply(this,ee.args));break;case"setSky":B.push(()=>this.setSky.apply(this,ee.args));break;case"setTerrain":B.push(()=>this.map.setTerrain.apply(this,ee.args));break;case"setTransition":B.push(()=>{});break;default:Q.push(ee.command)}return{operations:B,unimplemented:Q}}addImage(w,B){if(this.getImage(w))return this.fire(new a.j(new Error(`An image named "${w}" already exists.`)));this.imageManager.addImage(w,B),this._afterImageUpdated(w)}updateImage(w,B){this.imageManager.updateImage(w,B)}getImage(w){return this.imageManager.getImage(w)}removeImage(w){if(!this.getImage(w))return this.fire(new a.j(new Error(`An image named "${w}" does not exist.`)));this.imageManager.removeImage(w),this._afterImageUpdated(w)}_afterImageUpdated(w){this._availableImages=this.imageManager.listImages(),this._changedImages[w]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(w,B,Q={}){if(this._checkLoaded(),this.sourceCaches[w]!==void 0)throw new Error(`Source "${w}" already exists.`);if(!B.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(B).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(B.type)>=0&&this._validate(a.u.source,`sources.${w}`,B,null,Q))return;this.map&&this.map._collectResourceTiming&&(B.collectResourceTiming=!0);let ee=this.sourceCaches[w]=new pt(w,B,this.dispatcher);ee.style=this,ee.setEventedParent(this,()=>({isSourceLoaded:ee.loaded(),source:ee.serialize(),sourceId:w})),ee.onAdd(this.map),this._changed=!0}removeSource(w){if(this._checkLoaded(),this.sourceCaches[w]===void 0)throw new Error("There is no source with this ID");for(let Q in this._layers)if(this._layers[Q].source===w)return this.fire(new a.j(new Error(`Source "${w}" cannot be removed while layer "${Q}" is using it.`)));let B=this.sourceCaches[w];delete this.sourceCaches[w],delete this._updatedSources[w],B.fire(new a.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:w})),B.setEventedParent(null),B.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(w,B){if(this._checkLoaded(),this.sourceCaches[w]===void 0)throw new Error(`There is no source with this ID=${w}`);let Q=this.sourceCaches[w].getSource();if(Q.type!=="geojson")throw new Error(`geojsonSource.type is ${Q.type}, which is !== 'geojson`);Q.setData(B),this._changed=!0}getSource(w){return this.sourceCaches[w]&&this.sourceCaches[w].getSource()}addLayer(w,B,Q={}){this._checkLoaded();let ee=w.id;if(this.getLayer(ee))return void this.fire(new a.j(new Error(`Layer "${ee}" already exists on this map.`)));let le;if(w.type==="custom"){if(da(this,a.aD(w)))return;le=a.aA(w)}else{if("source"in w&&typeof w.source=="object"&&(this.addSource(ee,w.source),w=a.aB(w),w=a.e(w,{source:ee})),this._validate(a.u.layer,`layers.${ee}`,w,{arrayIndex:-1},Q))return;le=a.aA(w),this._validateLayer(le),le.setEventedParent(this,{layer:{id:ee}})}let Fe=B?this._order.indexOf(B):this._order.length;if(B&&Fe===-1)this.fire(new a.j(new Error(`Cannot add layer "${ee}" before non-existing layer "${B}".`)));else{if(this._order.splice(Fe,0,ee),this._layerOrderChanged=!0,this._layers[ee]=le,this._removedLayers[ee]&&le.source&&le.type!=="custom"){let Ze=this._removedLayers[ee];delete this._removedLayers[ee],Ze.type!==le.type?this._updatedSources[le.source]="clear":(this._updatedSources[le.source]="reload",this.sourceCaches[le.source].pause())}this._updateLayer(le),le.onAdd&&le.onAdd(this.map)}}moveLayer(w,B){if(this._checkLoaded(),this._changed=!0,!this._layers[w])return void this.fire(new a.j(new Error(`The layer '${w}' does not exist in the map's style and cannot be moved.`)));if(w===B)return;let Q=this._order.indexOf(w);this._order.splice(Q,1);let ee=B?this._order.indexOf(B):this._order.length;B&&ee===-1?this.fire(new a.j(new Error(`Cannot move layer "${w}" before non-existing layer "${B}".`))):(this._order.splice(ee,0,w),this._layerOrderChanged=!0)}removeLayer(w){this._checkLoaded();let B=this._layers[w];if(!B)return void this.fire(new a.j(new Error(`Cannot remove non-existing layer "${w}".`)));B.setEventedParent(null);let Q=this._order.indexOf(w);this._order.splice(Q,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[w]=B,delete this._layers[w],this._serializedLayers&&delete this._serializedLayers[w],delete this._updatedLayers[w],delete this._updatedPaintProps[w],B.onRemove&&B.onRemove(this.map)}getLayer(w){return this._layers[w]}getLayersOrder(){return[...this._order]}hasLayer(w){return w in this._layers}setLayerZoomRange(w,B,Q){this._checkLoaded();let ee=this.getLayer(w);ee?ee.minzoom===B&&ee.maxzoom===Q||(B!=null&&(ee.minzoom=B),Q!=null&&(ee.maxzoom=Q),this._updateLayer(ee)):this.fire(new a.j(new Error(`Cannot set the zoom range of non-existing layer "${w}".`)))}setFilter(w,B,Q={}){this._checkLoaded();let ee=this.getLayer(w);if(ee){if(!a.aE(ee.filter,B))return B==null?(ee.filter=void 0,void this._updateLayer(ee)):void(this._validate(a.u.filter,`layers.${ee.id}.filter`,B,null,Q)||(ee.filter=a.aB(B),this._updateLayer(ee)))}else this.fire(new a.j(new Error(`Cannot filter non-existing layer "${w}".`)))}getFilter(w){return a.aB(this.getLayer(w).filter)}setLayoutProperty(w,B,Q,ee={}){this._checkLoaded();let le=this.getLayer(w);le?a.aE(le.getLayoutProperty(B),Q)||(le.setLayoutProperty(B,Q,ee),this._updateLayer(le)):this.fire(new a.j(new Error(`Cannot style non-existing layer "${w}".`)))}getLayoutProperty(w,B){let Q=this.getLayer(w);if(Q)return Q.getLayoutProperty(B);this.fire(new a.j(new Error(`Cannot get style of non-existing layer "${w}".`)))}setPaintProperty(w,B,Q,ee={}){this._checkLoaded();let le=this.getLayer(w);le?a.aE(le.getPaintProperty(B),Q)||(le.setPaintProperty(B,Q,ee)&&this._updateLayer(le),this._changed=!0,this._updatedPaintProps[w]=!0,this._serializedLayers=null):this.fire(new a.j(new Error(`Cannot style non-existing layer "${w}".`)))}getPaintProperty(w,B){return this.getLayer(w).getPaintProperty(B)}setFeatureState(w,B){this._checkLoaded();let Q=w.source,ee=w.sourceLayer,le=this.sourceCaches[Q];if(le===void 0)return void this.fire(new a.j(new Error(`The source '${Q}' does not exist in the map's style.`)));let Fe=le.getSource().type;Fe==="geojson"&&ee?this.fire(new a.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Fe!=="vector"||ee?(w.id===void 0&&this.fire(new a.j(new Error("The feature id parameter must be provided."))),le.setFeatureState(ee,w.id,B)):this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(w,B){this._checkLoaded();let Q=w.source,ee=this.sourceCaches[Q];if(ee===void 0)return void this.fire(new a.j(new Error(`The source '${Q}' does not exist in the map's style.`)));let le=ee.getSource().type,Fe=le==="vector"?w.sourceLayer:void 0;le!=="vector"||Fe?B&&typeof w.id!="string"&&typeof w.id!="number"?this.fire(new a.j(new Error("A feature id is required to remove its specific state property."))):ee.removeFeatureState(Fe,w.id,B):this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(w){this._checkLoaded();let B=w.source,Q=w.sourceLayer,ee=this.sourceCaches[B];if(ee!==void 0)return ee.getSource().type!=="vector"||Q?(w.id===void 0&&this.fire(new a.j(new Error("The feature id parameter must be provided."))),ee.getFeatureState(Q,w.id)):void this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new a.j(new Error(`The source '${B}' does not exist in the map's style.`)))}getTransition(){return a.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let w=a.aF(this.sourceCaches,le=>le.serialize()),B=this._serializeByIds(this._order,!0),Q=this.map.getTerrain()||void 0,ee=this.stylesheet;return a.aG({version:ee.version,name:ee.name,metadata:ee.metadata,light:ee.light,sky:ee.sky,center:ee.center,zoom:ee.zoom,bearing:ee.bearing,pitch:ee.pitch,sprite:ee.sprite,glyphs:ee.glyphs,transition:ee.transition,sources:w,layers:B,terrain:Q},le=>le!==void 0)}_updateLayer(w){this._updatedLayers[w.id]=!0,w.source&&!this._updatedSources[w.source]&&this.sourceCaches[w.source].getSource().type!=="raster"&&(this._updatedSources[w.source]="reload",this.sourceCaches[w.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(w){let B=Fe=>this._layers[Fe].type==="fill-extrusion",Q={},ee=[];for(let Fe=this._order.length-1;Fe>=0;Fe--){let Ze=this._order[Fe];if(B(Ze)){Q[Ze]=Fe;for(let ut of w){let Mt=ut[Ze];if(Mt)for(let Jt of Mt)ee.push(Jt)}}}ee.sort((Fe,Ze)=>Ze.intersectionZ-Fe.intersectionZ);let le=[];for(let Fe=this._order.length-1;Fe>=0;Fe--){let Ze=this._order[Fe];if(B(Ze))for(let ut=ee.length-1;ut>=0;ut--){let Mt=ee[ut].feature;if(Q[Mt.layer.id]{let fr=ze.featureSortOrder;if(fr){let br=fr.indexOf(Wt.featureIndex);return fr.indexOf(nr.featureIndex)-br}return nr.featureIndex-Wt.featureIndex});for(let Wt of qt)nt.push(Wt)}}for(let ze in ve)ve[ze].forEach(Qe=>{let Xe=Qe.feature,nt=Mt[Ze[ze].source].getFeatureState(Xe.layer["source-layer"],Xe.id);Xe.source=Xe.layer.source,Xe.layer["source-layer"]&&(Xe.sourceLayer=Xe.layer["source-layer"]),Xe.state=nt});return ve}(this._layers,Fe,this.sourceCaches,w,B,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(le)}querySourceFeatures(w,B){B&&B.filter&&this._validate(a.u.filter,"querySourceFeatures.filter",B.filter,null,B);let Q=this.sourceCaches[w];return Q?function(ee,le){let Fe=ee.getRenderableIds().map(Mt=>ee.getTileByID(Mt)),Ze=[],ut={};for(let Mt=0;Mtyr.getTileByID(Cr)).sort((Cr,ve)=>ve.tileID.overscaledZ-Cr.tileID.overscaledZ||(Cr.tileID.isLessThan(ve.tileID)?-1:1))}let $t=this.crossTileSymbolIndex.addLayer(Jt,ut[Jt.source],w.center.lng);Fe=Fe||$t}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((le=le||this._layerOrderChanged||Q===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(u.now(),w.zoom))&&(this.pauseablePlacement=new Ba(w,this.map.terrain,this._order,le,B,Q,ee,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,ut),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(u.now()),Ze=!0),Fe&&this.pauseablePlacement.placement.setStale()),Ze||Fe)for(let Mt of this._order){let Jt=this._layers[Mt];Jt.type==="symbol"&&this.placement.updateLayerOpacities(Jt,ut[Jt.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(u.now())}_releaseSymbolFadeTiles(){for(let w in this.sourceCaches)this.sourceCaches[w].releaseSymbolFadeTiles()}getImages(w,B){return a._(this,void 0,void 0,function*(){let Q=yield this.imageManager.getImages(B.icons);this._updateTilesForChangedImages();let ee=this.sourceCaches[B.source];return ee&&ee.setDependencies(B.tileID.key,B.type,B.icons),Q})}getGlyphs(w,B){return a._(this,void 0,void 0,function*(){let Q=yield this.glyphManager.getGlyphs(B.stacks),ee=this.sourceCaches[B.source];return ee&&ee.setDependencies(B.tileID.key,B.type,[""]),Q})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(w,B={}){this._checkLoaded(),w&&this._validate(a.u.glyphs,"glyphs",w,null,B)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=w,this.glyphManager.entries={},this.glyphManager.setURL(w))}addSprite(w,B,Q={},ee){this._checkLoaded();let le=[{id:w,url:B}],Fe=[...C(this.stylesheet.sprite),...le];this._validate(a.u.sprite,"sprite",Fe,null,Q)||(this.stylesheet.sprite=Fe,this._loadSprite(le,!0,ee))}removeSprite(w){this._checkLoaded();let B=C(this.stylesheet.sprite);if(B.find(Q=>Q.id===w)){if(this._spritesImagesIds[w])for(let Q of this._spritesImagesIds[w])this.imageManager.removeImage(Q),this._changedImages[Q]=!0;B.splice(B.findIndex(Q=>Q.id===w),1),this.stylesheet.sprite=B.length>0?B:void 0,delete this._spritesImagesIds[w],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}else this.fire(new a.j(new Error(`Sprite "${w}" doesn't exists on this map.`)))}getSprite(){return C(this.stylesheet.sprite)}setSprite(w,B={},Q){this._checkLoaded(),w&&this._validate(a.u.sprite,"sprite",w,null,B)||(this.stylesheet.sprite=w,w?this._loadSprite(w,!0,Q):(this._unloadSprite(),Q&&Q(null)))}}var vo=a.Y([{name:"a_pos",type:"Int16",components:2}]);let Gn={prelude:Ct(`#ifdef GL_ES +precision mediump float; +#else +#if !defined(lowp) +#define lowp +#endif +#if !defined(mediump) +#define mediump +#endif +#if !defined(highp) +#define highp +#endif +#endif +`,`#ifdef GL_ES +precision highp float; +#else +#if !defined(lowp) +#define lowp +#endif +#if !defined(mediump) +#define mediump +#endif +#if !defined(highp) +#define highp +#endif +#endif +vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 +);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;} +#ifdef TERRAIN3D +uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth; +#endif +const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) { +#ifdef TERRAIN3D +highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); +#else +return 1.0; +#endif +}float calculate_visibility(vec4 pos) { +#ifdef TERRAIN3D +vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; +#else +return 1.0; +#endif +}float ele(vec2 pos) { +#ifdef TERRAIN3D +vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; +#else +return 0.0; +#endif +}float get_elevation(vec2 pos) { +#ifdef TERRAIN3D +vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; +#else +return 0.0; +#endif +}`),background:Ct(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:Ct(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Ct(`varying vec3 v_data;varying float v_visibility; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize mediump float radius +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 stroke_color +#pragma mapbox: initialize mediump float stroke_width +#pragma mapbox: initialize lowp float stroke_opacity +vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity +void main(void) { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize mediump float radius +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 stroke_color +#pragma mapbox: initialize mediump float stroke_width +#pragma mapbox: initialize lowp float stroke_opacity +vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Ct("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:Ct(`uniform highp float u_intensity;varying vec2 v_extrude; +#pragma mapbox: define highp float weight +#define GAUSS_COEF 0.3989422804014327 +void main() { +#pragma mapbox: initialize highp float weight +float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; +#pragma mapbox: define highp float weight +#pragma mapbox: define mediump float radius +const highp float ZERO=1.0/255.0/16.0; +#define GAUSS_COEF 0.3989422804014327 +void main(void) { +#pragma mapbox: initialize highp float weight +#pragma mapbox: initialize mediump float radius +vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:Ct(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(0.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Ct("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Ct("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Ct("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:Ct(`#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_FragColor=color*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec2 a_pos;uniform mat4 u_matrix; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:Ct(`varying vec2 v_pos; +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:Ct(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:Ct(`#ifdef GL_ES +precision highp float; +#endif +uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Ct(`varying vec4 v_color;void main() {gl_FragColor=v_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed; +#ifdef TERRAIN3D +attribute vec2 a_centroid; +#endif +varying vec4 v_color; +#pragma mapbox: define highp float base +#pragma mapbox: define highp float height +#pragma mapbox: define highp vec4 color +void main() { +#pragma mapbox: initialize highp float base +#pragma mapbox: initialize highp float height +#pragma mapbox: initialize highp vec4 color +vec3 normal=a_normal_ed.xyz; +#ifdef TERRAIN3D +float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); +#else +float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; +#endif +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:Ct(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed; +#ifdef TERRAIN3D +attribute vec2 a_centroid; +#endif +varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to; +#ifdef TERRAIN3D +float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); +#else +float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; +#endif +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 +? a_pos +: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:Ct(`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:Ct(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; +#define PI 3.141592653589793 +void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:Ct(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_width2=vec2(outset,inset);}`),lineGradient:Ct(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_width2=vec2(outset,inset);}`),linePattern:Ct(`#ifdef GL_ES +precision highp float; +#endif +uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Ct(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:Ct(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:Ct(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Ct(`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Ct(`#define SDF_PX 8.0 +#define SDF 1.0 +#define ICON 0.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Ct("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Ct("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Ct("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:Ct("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Ct(ue,w){let B=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Q=w.match(/attribute ([\w]+) ([\w]+)/g),ee=ue.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),le=w.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Fe=le?le.concat(ee):ee,Ze={};return{fragmentSource:ue=ue.replace(B,(ut,Mt,Jt,$t,yr)=>(Ze[yr]=!0,Mt==="define"?` +#ifndef HAS_UNIFORM_u_${yr} +varying ${Jt} ${$t} ${yr}; +#else +uniform ${Jt} ${$t} u_${yr}; +#endif +`:` +#ifdef HAS_UNIFORM_u_${yr} + ${Jt} ${$t} ${yr} = u_${yr}; +#endif +`)),vertexSource:w=w.replace(B,(ut,Mt,Jt,$t,yr)=>{let Cr=$t==="float"?"vec2":"vec4",ve=yr.match(/color/)?"color":Cr;return Ze[yr]?Mt==="define"?` +#ifndef HAS_UNIFORM_u_${yr} +uniform lowp float u_${yr}_t; +attribute ${Jt} ${Cr} a_${yr}; +varying ${Jt} ${$t} ${yr}; +#else +uniform ${Jt} ${$t} u_${yr}; +#endif +`:ve==="vec4"?` +#ifndef HAS_UNIFORM_u_${yr} + ${yr} = a_${yr}; +#else + ${Jt} ${$t} ${yr} = u_${yr}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${yr} + ${yr} = unpack_mix_${ve}(a_${yr}, u_${yr}_t); +#else + ${Jt} ${$t} ${yr} = u_${yr}; +#endif +`:Mt==="define"?` +#ifndef HAS_UNIFORM_u_${yr} +uniform lowp float u_${yr}_t; +attribute ${Jt} ${Cr} a_${yr}; +#else +uniform ${Jt} ${$t} u_${yr}; +#endif +`:ve==="vec4"?` +#ifndef HAS_UNIFORM_u_${yr} + ${Jt} ${$t} ${yr} = a_${yr}; +#else + ${Jt} ${$t} ${yr} = u_${yr}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${yr} + ${Jt} ${$t} ${yr} = unpack_mix_${ve}(a_${yr}, u_${yr}_t); +#else + ${Jt} ${$t} ${yr} = u_${yr}; +#endif +`}),staticAttributes:Q,staticUniforms:Fe}}class Sr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(w,B,Q,ee,le,Fe,Ze,ut,Mt){this.context=w;let Jt=this.boundPaintVertexBuffers.length!==ee.length;for(let $t=0;!Jt&&$t({u_matrix:ue,u_texture:0,u_ele_delta:w,u_fog_matrix:B,u_fog_color:Q?Q.properties.get("fog-color"):a.aM.white,u_fog_ground_blend:Q?Q.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:Q?Q.calculateFogBlendOpacity(ee):0,u_horizon_color:Q?Q.properties.get("horizon-color"):a.aM.white,u_horizon_fog_blend:Q?Q.properties.get("horizon-fog-blend"):1});function hi(ue){let w=[];for(let B=0;B({u_depth:new a.aH(Wt,nr.u_depth),u_terrain:new a.aH(Wt,nr.u_terrain),u_terrain_dim:new a.aI(Wt,nr.u_terrain_dim),u_terrain_matrix:new a.aJ(Wt,nr.u_terrain_matrix),u_terrain_unpack:new a.aK(Wt,nr.u_terrain_unpack),u_terrain_exaggeration:new a.aI(Wt,nr.u_terrain_exaggeration)}))(w,qt),this.binderUniforms=Q?Q.getUniforms(w,qt):[]}draw(w,B,Q,ee,le,Fe,Ze,ut,Mt,Jt,$t,yr,Cr,ve,xe,Ie,ze,Qe){let Xe=w.gl;if(this.failedToCreate)return;if(w.program.set(this.program),w.setDepthMode(Q),w.setStencilMode(ee),w.setColorMode(le),w.setCullFace(Fe),ut){w.activeTexture.set(Xe.TEXTURE2),Xe.bindTexture(Xe.TEXTURE_2D,ut.depthTexture),w.activeTexture.set(Xe.TEXTURE3),Xe.bindTexture(Xe.TEXTURE_2D,ut.texture);for(let qt in this.terrainUniforms)this.terrainUniforms[qt].set(ut[qt])}for(let qt in this.fixedUniforms)this.fixedUniforms[qt].set(Ze[qt]);xe&&xe.setUniforms(w,this.binderUniforms,Cr,{zoom:ve});let nt=0;switch(B){case Xe.LINES:nt=2;break;case Xe.TRIANGLES:nt=3;break;case Xe.LINE_STRIP:nt=1}for(let qt of yr.get()){let Wt=qt.vaos||(qt.vaos={});(Wt[Mt]||(Wt[Mt]=new Sr)).bind(w,this,Jt,xe?xe.getPaintVertexBuffers():[],$t,qt.vertexOffset,Ie,ze,Qe),Xe.drawElements(B,qt.primitiveLength*nt,Xe.UNSIGNED_SHORT,qt.primitiveOffset*nt*2)}}}function Sn(ue,w,B){let Q=1/Fn(B,1,w.transform.tileZoom),ee=Math.pow(2,B.tileID.overscaledZ),le=B.tileSize*Math.pow(2,w.transform.tileZoom)/ee,Fe=le*(B.tileID.canonical.x+B.tileID.wrap*ee),Ze=le*B.tileID.canonical.y;return{u_image:0,u_texsize:B.imageAtlasTexture.size,u_scale:[Q,ue.fromScale,ue.toScale],u_fade:ue.t,u_pixel_coord_upper:[Fe>>16,Ze>>16],u_pixel_coord_lower:[65535&Fe,65535&Ze]}}let En=(ue,w,B,Q)=>{let ee=w.style.light,le=ee.properties.get("position"),Fe=[le.x,le.y,le.z],Ze=function(){var Mt=new a.A(9);return a.A!=Float32Array&&(Mt[1]=0,Mt[2]=0,Mt[3]=0,Mt[5]=0,Mt[6]=0,Mt[7]=0),Mt[0]=1,Mt[4]=1,Mt[8]=1,Mt}();ee.properties.get("anchor")==="viewport"&&function(Mt,Jt){var $t=Math.sin(Jt),yr=Math.cos(Jt);Mt[0]=yr,Mt[1]=$t,Mt[2]=0,Mt[3]=-$t,Mt[4]=yr,Mt[5]=0,Mt[6]=0,Mt[7]=0,Mt[8]=1}(Ze,-w.transform.angle),function(Mt,Jt,$t){var yr=Jt[0],Cr=Jt[1],ve=Jt[2];Mt[0]=yr*$t[0]+Cr*$t[3]+ve*$t[6],Mt[1]=yr*$t[1]+Cr*$t[4]+ve*$t[7],Mt[2]=yr*$t[2]+Cr*$t[5]+ve*$t[8]}(Fe,Fe,Ze);let ut=ee.properties.get("color");return{u_matrix:ue,u_lightpos:Fe,u_lightintensity:ee.properties.get("intensity"),u_lightcolor:[ut.r,ut.g,ut.b],u_vertical_gradient:+B,u_opacity:Q}},ki=(ue,w,B,Q,ee,le,Fe)=>a.e(En(ue,w,B,Q),Sn(le,w,Fe),{u_height_factor:-Math.pow(2,ee.overscaledZ)/Fe.tileSize/8}),_n=ue=>({u_matrix:ue}),ya=(ue,w,B,Q)=>a.e(_n(ue),Sn(B,w,Q)),ea=(ue,w)=>({u_matrix:ue,u_world:w}),Ma=(ue,w,B,Q,ee)=>a.e(ya(ue,w,B,Q),{u_world:ee}),_o=(ue,w,B,Q)=>{let ee=ue.transform,le,Fe;if(Q.paint.get("circle-pitch-alignment")==="map"){let Ze=Fn(B,1,ee.zoom);le=!0,Fe=[Ze,Ze]}else le=!1,Fe=ee.pixelsToGLUnits;return{u_camera_to_center_distance:ee.cameraToCenterDistance,u_scale_with_map:+(Q.paint.get("circle-pitch-scale")==="map"),u_matrix:ue.translatePosMatrix(w.posMatrix,B,Q.paint.get("circle-translate"),Q.paint.get("circle-translate-anchor")),u_pitch_with_map:+le,u_device_pixel_ratio:ue.pixelRatio,u_extrude_scale:Fe}},No=(ue,w,B)=>({u_matrix:ue,u_inv_matrix:w,u_camera_to_center_distance:B.cameraToCenterDistance,u_viewport_size:[B.width,B.height]}),po=(ue,w,B=1)=>({u_matrix:ue,u_color:w,u_overlay:0,u_overlay_scale:B}),Lo=ue=>({u_matrix:ue}),ko=(ue,w,B,Q)=>({u_matrix:ue,u_extrude_scale:Fn(w,1,B),u_intensity:Q}),Ds=(ue,w,B,Q)=>{let ee=a.H();a.aP(ee,0,ue.width,ue.height,0,0,1);let le=ue.context.gl;return{u_matrix:ee,u_world:[le.drawingBufferWidth,le.drawingBufferHeight],u_image:B,u_color_ramp:Q,u_opacity:w.paint.get("heatmap-opacity")}};function Fs(ue,w){let B=Math.pow(2,w.canonical.z),Q=w.canonical.y;return[new a.Z(0,Q/B).toLngLat().lat,new a.Z(0,(Q+1)/B).toLngLat().lat]}let ll=(ue,w,B,Q)=>{let ee=ue.transform;return{u_matrix:As(ue,w,B,Q),u_ratio:1/Fn(w,1,ee.zoom),u_device_pixel_ratio:ue.pixelRatio,u_units_to_pixels:[1/ee.pixelsToGLUnits[0],1/ee.pixelsToGLUnits[1]]}},ul=(ue,w,B,Q,ee)=>a.e(ll(ue,w,B,ee),{u_image:0,u_image_height:Q}),zl=(ue,w,B,Q,ee)=>{let le=ue.transform,Fe=il(w,le);return{u_matrix:As(ue,w,B,ee),u_texsize:w.imageAtlasTexture.size,u_ratio:1/Fn(w,1,le.zoom),u_device_pixel_ratio:ue.pixelRatio,u_image:0,u_scale:[Fe,Q.fromScale,Q.toScale],u_fade:Q.t,u_units_to_pixels:[1/le.pixelsToGLUnits[0],1/le.pixelsToGLUnits[1]]}},us=(ue,w,B,Q,ee,le)=>{let Fe=ue.lineAtlas,Ze=il(w,ue.transform),ut=B.layout.get("line-cap")==="round",Mt=Fe.getDash(Q.from,ut),Jt=Fe.getDash(Q.to,ut),$t=Mt.width*ee.fromScale,yr=Jt.width*ee.toScale;return a.e(ll(ue,w,B,le),{u_patternscale_a:[Ze/$t,-Mt.height/2],u_patternscale_b:[Ze/yr,-Jt.height/2],u_sdfgamma:Fe.width/(256*Math.min($t,yr)*ue.pixelRatio)/2,u_image:0,u_tex_y_a:Mt.y,u_tex_y_b:Jt.y,u_mix:ee.t})};function il(ue,w){return 1/Fn(ue,1,w.tileZoom)}function As(ue,w,B,Q){return ue.translatePosMatrix(Q?Q.posMatrix:w.tileID.posMatrix,w,B.paint.get("line-translate"),B.paint.get("line-translate-anchor"))}let cl=(ue,w,B,Q,ee)=>{return{u_matrix:ue,u_tl_parent:w,u_scale_parent:B,u_buffer_scale:1,u_fade_t:Q.mix,u_opacity:Q.opacity*ee.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ee.paint.get("raster-brightness-min"),u_brightness_high:ee.paint.get("raster-brightness-max"),u_saturation_factor:(Fe=ee.paint.get("raster-saturation"),Fe>0?1-1/(1.001-Fe):-Fe),u_contrast_factor:(le=ee.paint.get("raster-contrast"),le>0?1/(1-le):1+le),u_spin_weights:Ks(ee.paint.get("raster-hue-rotate"))};var le,Fe};function Ks(ue){ue*=Math.PI/180;let w=Math.sin(ue),B=Math.cos(ue);return[(2*B+1)/3,(-Math.sqrt(3)*w-B+1)/3,(Math.sqrt(3)*w-B+1)/3]}let zs=(ue,w,B,Q,ee,le,Fe,Ze,ut,Mt,Jt,$t,yr,Cr)=>{let ve=Fe.transform;return{u_is_size_zoom_constant:+(ue==="constant"||ue==="source"),u_is_size_feature_constant:+(ue==="constant"||ue==="camera"),u_size_t:w?w.uSizeT:0,u_size:w?w.uSize:0,u_camera_to_center_distance:ve.cameraToCenterDistance,u_pitch:ve.pitch/360*2*Math.PI,u_rotate_symbol:+B,u_aspect_ratio:ve.width/ve.height,u_fade_change:Fe.options.fadeDuration?Fe.symbolFadeChange:1,u_matrix:Ze,u_label_plane_matrix:ut,u_coord_matrix:Mt,u_is_text:+$t,u_pitch_with_map:+Q,u_is_along_line:ee,u_is_variable_anchor:le,u_texsize:yr,u_texture:0,u_translation:Jt,u_pitched_scale:Cr}},Io=(ue,w,B,Q,ee,le,Fe,Ze,ut,Mt,Jt,$t,yr,Cr,ve)=>{let xe=Fe.transform;return a.e(zs(ue,w,B,Q,ee,le,Fe,Ze,ut,Mt,Jt,$t,yr,ve),{u_gamma_scale:Q?Math.cos(xe._pitch)*xe.cameraToCenterDistance:1,u_device_pixel_ratio:Fe.pixelRatio,u_is_halo:+Cr})},ls=(ue,w,B,Q,ee,le,Fe,Ze,ut,Mt,Jt,$t,yr,Cr)=>a.e(Io(ue,w,B,Q,ee,le,Fe,Ze,ut,Mt,Jt,!0,$t,!0,Cr),{u_texsize_icon:yr,u_texture_icon:1}),Yl=(ue,w,B)=>({u_matrix:ue,u_opacity:w,u_color:B}),Su=(ue,w,B,Q,ee,le)=>a.e(function(Fe,Ze,ut,Mt){let Jt=ut.imageManager.getPattern(Fe.from.toString()),$t=ut.imageManager.getPattern(Fe.to.toString()),{width:yr,height:Cr}=ut.imageManager.getPixelSize(),ve=Math.pow(2,Mt.tileID.overscaledZ),xe=Mt.tileSize*Math.pow(2,ut.transform.tileZoom)/ve,Ie=xe*(Mt.tileID.canonical.x+Mt.tileID.wrap*ve),ze=xe*Mt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Jt.tl,u_pattern_br_a:Jt.br,u_pattern_tl_b:$t.tl,u_pattern_br_b:$t.br,u_texsize:[yr,Cr],u_mix:Ze.t,u_pattern_size_a:Jt.displaySize,u_pattern_size_b:$t.displaySize,u_scale_a:Ze.fromScale,u_scale_b:Ze.toScale,u_tile_units_to_pixels:1/Fn(Mt,1,ut.transform.tileZoom),u_pixel_coord_upper:[Ie>>16,ze>>16],u_pixel_coord_lower:[65535&Ie,65535&ze]}}(Q,le,B,ee),{u_matrix:ue,u_opacity:w}),nc={fillExtrusion:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_lightpos:new a.aN(ue,w.u_lightpos),u_lightintensity:new a.aI(ue,w.u_lightintensity),u_lightcolor:new a.aN(ue,w.u_lightcolor),u_vertical_gradient:new a.aI(ue,w.u_vertical_gradient),u_opacity:new a.aI(ue,w.u_opacity)}),fillExtrusionPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_lightpos:new a.aN(ue,w.u_lightpos),u_lightintensity:new a.aI(ue,w.u_lightintensity),u_lightcolor:new a.aN(ue,w.u_lightcolor),u_vertical_gradient:new a.aI(ue,w.u_vertical_gradient),u_height_factor:new a.aI(ue,w.u_height_factor),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade),u_opacity:new a.aI(ue,w.u_opacity)}),fill:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix)}),fillPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),fillOutline:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world)}),fillOutlinePattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),circle:(ue,w)=>({u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_scale_with_map:new a.aH(ue,w.u_scale_with_map),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_extrude_scale:new a.aO(ue,w.u_extrude_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_matrix:new a.aJ(ue,w.u_matrix)}),collisionBox:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_pixel_extrude_scale:new a.aO(ue,w.u_pixel_extrude_scale)}),collisionCircle:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_inv_matrix:new a.aJ(ue,w.u_inv_matrix),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_viewport_size:new a.aO(ue,w.u_viewport_size)}),debug:(ue,w)=>({u_color:new a.aL(ue,w.u_color),u_matrix:new a.aJ(ue,w.u_matrix),u_overlay:new a.aH(ue,w.u_overlay),u_overlay_scale:new a.aI(ue,w.u_overlay_scale)}),clippingMask:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix)}),heatmap:(ue,w)=>({u_extrude_scale:new a.aI(ue,w.u_extrude_scale),u_intensity:new a.aI(ue,w.u_intensity),u_matrix:new a.aJ(ue,w.u_matrix)}),heatmapTexture:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world),u_image:new a.aH(ue,w.u_image),u_color_ramp:new a.aH(ue,w.u_color_ramp),u_opacity:new a.aI(ue,w.u_opacity)}),hillshade:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_latrange:new a.aO(ue,w.u_latrange),u_light:new a.aO(ue,w.u_light),u_shadow:new a.aL(ue,w.u_shadow),u_highlight:new a.aL(ue,w.u_highlight),u_accent:new a.aL(ue,w.u_accent)}),hillshadePrepare:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_dimension:new a.aO(ue,w.u_dimension),u_zoom:new a.aI(ue,w.u_zoom),u_unpack:new a.aK(ue,w.u_unpack)}),line:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels)}),lineGradient:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_image:new a.aH(ue,w.u_image),u_image_height:new a.aI(ue,w.u_image_height)}),linePattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texsize:new a.aO(ue,w.u_texsize),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_image:new a.aH(ue,w.u_image),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),lineSDF:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_patternscale_a:new a.aO(ue,w.u_patternscale_a),u_patternscale_b:new a.aO(ue,w.u_patternscale_b),u_sdfgamma:new a.aI(ue,w.u_sdfgamma),u_image:new a.aH(ue,w.u_image),u_tex_y_a:new a.aI(ue,w.u_tex_y_a),u_tex_y_b:new a.aI(ue,w.u_tex_y_b),u_mix:new a.aI(ue,w.u_mix)}),raster:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_tl_parent:new a.aO(ue,w.u_tl_parent),u_scale_parent:new a.aI(ue,w.u_scale_parent),u_buffer_scale:new a.aI(ue,w.u_buffer_scale),u_fade_t:new a.aI(ue,w.u_fade_t),u_opacity:new a.aI(ue,w.u_opacity),u_image0:new a.aH(ue,w.u_image0),u_image1:new a.aH(ue,w.u_image1),u_brightness_low:new a.aI(ue,w.u_brightness_low),u_brightness_high:new a.aI(ue,w.u_brightness_high),u_saturation_factor:new a.aI(ue,w.u_saturation_factor),u_contrast_factor:new a.aI(ue,w.u_contrast_factor),u_spin_weights:new a.aN(ue,w.u_spin_weights)}),symbolIcon:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texture:new a.aH(ue,w.u_texture),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),symbolSDF:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texture:new a.aH(ue,w.u_texture),u_gamma_scale:new a.aI(ue,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_is_halo:new a.aH(ue,w.u_is_halo),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),symbolTextAndIcon:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texsize_icon:new a.aO(ue,w.u_texsize_icon),u_texture:new a.aH(ue,w.u_texture),u_texture_icon:new a.aH(ue,w.u_texture_icon),u_gamma_scale:new a.aI(ue,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_is_halo:new a.aH(ue,w.u_is_halo),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),background:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_opacity:new a.aI(ue,w.u_opacity),u_color:new a.aL(ue,w.u_color)}),backgroundPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_opacity:new a.aI(ue,w.u_opacity),u_image:new a.aH(ue,w.u_image),u_pattern_tl_a:new a.aO(ue,w.u_pattern_tl_a),u_pattern_br_a:new a.aO(ue,w.u_pattern_br_a),u_pattern_tl_b:new a.aO(ue,w.u_pattern_tl_b),u_pattern_br_b:new a.aO(ue,w.u_pattern_br_b),u_texsize:new a.aO(ue,w.u_texsize),u_mix:new a.aI(ue,w.u_mix),u_pattern_size_a:new a.aO(ue,w.u_pattern_size_a),u_pattern_size_b:new a.aO(ue,w.u_pattern_size_b),u_scale_a:new a.aI(ue,w.u_scale_a),u_scale_b:new a.aI(ue,w.u_scale_b),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_tile_units_to_pixels:new a.aI(ue,w.u_tile_units_to_pixels)}),terrain:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texture:new a.aH(ue,w.u_texture),u_ele_delta:new a.aI(ue,w.u_ele_delta),u_fog_matrix:new a.aJ(ue,w.u_fog_matrix),u_fog_color:new a.aL(ue,w.u_fog_color),u_fog_ground_blend:new a.aI(ue,w.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.aI(ue,w.u_fog_ground_blend_opacity),u_horizon_color:new a.aL(ue,w.u_horizon_color),u_horizon_fog_blend:new a.aI(ue,w.u_horizon_fog_blend)}),terrainDepth:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ele_delta:new a.aI(ue,w.u_ele_delta)}),terrainCoords:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texture:new a.aH(ue,w.u_texture),u_terrain_coords_id:new a.aI(ue,w.u_terrain_coords_id),u_ele_delta:new a.aI(ue,w.u_ele_delta)}),sky:(ue,w)=>({u_sky_color:new a.aL(ue,w.u_sky_color),u_horizon_color:new a.aL(ue,w.u_horizon_color),u_horizon:new a.aI(ue,w.u_horizon),u_sky_horizon_blend:new a.aI(ue,w.u_sky_horizon_blend)})};class bs{constructor(w,B,Q){this.context=w;let ee=w.gl;this.buffer=ee.createBuffer(),this.dynamicDraw=!!Q,this.context.unbindVAO(),w.bindElementBuffer.set(this.buffer),ee.bufferData(ee.ELEMENT_ARRAY_BUFFER,B.arrayBuffer,this.dynamicDraw?ee.DYNAMIC_DRAW:ee.STATIC_DRAW),this.dynamicDraw||delete B.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(w){let B=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),B.bufferSubData(B.ELEMENT_ARRAY_BUFFER,0,w.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Rn={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class _a{constructor(w,B,Q,ee){this.length=B.length,this.attributes=Q,this.itemSize=B.bytesPerElement,this.dynamicDraw=ee,this.context=w;let le=w.gl;this.buffer=le.createBuffer(),w.bindVertexBuffer.set(this.buffer),le.bufferData(le.ARRAY_BUFFER,B.arrayBuffer,this.dynamicDraw?le.DYNAMIC_DRAW:le.STATIC_DRAW),this.dynamicDraw||delete B.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(w){if(w.length!==this.length)throw new Error(`Length of new data is ${w.length}, which doesn't match current length of ${this.length}`);let B=this.context.gl;this.bind(),B.bufferSubData(B.ARRAY_BUFFER,0,w.arrayBuffer)}enableAttributes(w,B){for(let Q=0;Q0){let Wt=a.H();a.aQ(Wt,Xe.placementInvProjMatrix,ue.transform.glCoordMatrix),a.aQ(Wt,Wt,Xe.placementViewportMatrix),ut.push({circleArray:qt,circleOffset:Jt,transform:Qe.posMatrix,invTransform:Wt,coord:Qe}),Mt+=qt.length/4,Jt=Mt}nt&&Ze.draw(le,Fe.LINES,Po.disabled,Ko.disabled,ue.colorModeForRenderPass(),Pa.disabled,{u_matrix:Qe.posMatrix,u_pixel_extrude_scale:[1/($t=ue.transform).width,1/$t.height]},ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(Qe),B.id,nt.layoutVertexBuffer,nt.indexBuffer,nt.segments,null,ue.transform.zoom,null,null,nt.collisionVertexBuffer)}var $t;if(!ee||!ut.length)return;let yr=ue.useProgram("collisionCircle"),Cr=new a.aR;Cr.resize(4*Mt),Cr._trim();let ve=0;for(let ze of ut)for(let Qe=0;Qe=0&&(ze[Xe.associatedIconIndex]={shiftedAnchor:Yn,angle:Aa})}else Pi(Xe.numGlyphs,xe)}if(Mt){Ie.clear();let Qe=ue.icon.placedSymbolArray;for(let Xe=0;Xeue.style.map.terrain.getElevation(Hr,ot,Xt):null,Pt=B.layout.get("text-rotation-alignment")==="map";We(Ci,Hr.posMatrix,ue,ee,Ul,au,ze,Mt,Pt,xe,Hr.toUnwrapped(),ve.width,ve.height,Js,Ye)}let Tl=Hr.posMatrix,Al=ee&&fr||dc,X=Qe||Al?bl:Ul,se=Lu,Te=Ln&&B.paint.get(ee?"text-halo-width":"icon-halo-width").constantOr(1)!==0,qe;qe=Ln?Ci.iconsInText?ls(Yn.kind,$a,Xe,ze,Qe,Al,ue,Tl,X,se,Js,Qa,Ts,Fr):Io(Yn.kind,$a,Xe,ze,Qe,Al,ue,Tl,X,se,Js,ee,Qa,!0,Fr):zs(Yn.kind,$a,Xe,ze,Qe,Al,ue,Tl,X,se,Js,ee,Qa,Fr);let Ve={program:fa,buffers:cn,uniformValues:qe,atlasTexture:mo,atlasTextureIcon:wo,atlasInterpolation:Bo,atlasInterpolationIcon:Ps,isSDF:Ln,hasHalo:Te};if(qt&&Ci.canOverlap){Wt=!0;let Ye=cn.segments.get();for(let Pt of Ye)br.push({segments:new a.a0([Pt]),sortKey:Pt.sortKey,state:Ve,terrainData:Co})}else br.push({segments:cn.segments,sortKey:0,state:Ve,terrainData:Co})}Wt&&br.sort((Hr,ri)=>Hr.sortKey-ri.sortKey);for(let Hr of br){let ri=Hr.state;if(yr.activeTexture.set(Cr.TEXTURE0),ri.atlasTexture.bind(ri.atlasInterpolation,Cr.CLAMP_TO_EDGE),ri.atlasTextureIcon&&(yr.activeTexture.set(Cr.TEXTURE1),ri.atlasTextureIcon&&ri.atlasTextureIcon.bind(ri.atlasInterpolationIcon,Cr.CLAMP_TO_EDGE)),ri.isSDF){let Ci=ri.uniformValues;ri.hasHalo&&(Ci.u_is_halo=1,Qf(ri.buffers,Hr.segments,B,ue,ri.program,nr,Jt,$t,Ci,Hr.terrainData)),Ci.u_is_halo=0}Qf(ri.buffers,Hr.segments,B,ue,ri.program,nr,Jt,$t,ri.uniformValues,Hr.terrainData)}}function Qf(ue,w,B,Q,ee,le,Fe,Ze,ut,Mt){let Jt=Q.context;ee.draw(Jt,Jt.gl.TRIANGLES,le,Fe,Ze,Pa.disabled,ut,Mt,B.id,ue.layoutVertexBuffer,ue.indexBuffer,w,B.paint,Q.transform.zoom,ue.programConfigurations.get(B.id),ue.dynamicLayoutVertexBuffer,ue.opacityVertexBuffer)}function _f(ue,w,B,Q){let ee=ue.context,le=ee.gl,Fe=Ko.disabled,Ze=new Os([le.ONE,le.ONE],a.aM.transparent,[!0,!0,!0,!0]),ut=w.getBucket(B);if(!ut)return;let Mt=Q.key,Jt=B.heatmapFbos.get(Mt);Jt||(Jt=eh(ee,w.tileSize,w.tileSize),B.heatmapFbos.set(Mt,Jt)),ee.bindFramebuffer.set(Jt.framebuffer),ee.viewport.set([0,0,w.tileSize,w.tileSize]),ee.clear({color:a.aM.transparent});let $t=ut.programConfigurations.get(B.id),yr=ue.useProgram("heatmap",$t),Cr=ue.style.map.terrain.getTerrainData(Q);yr.draw(ee,le.TRIANGLES,Po.disabled,Fe,Ze,Pa.disabled,ko(Q.posMatrix,w,ue.transform.zoom,B.paint.get("heatmap-intensity")),Cr,B.id,ut.layoutVertexBuffer,ut.indexBuffer,ut.segments,B.paint,ue.transform.zoom,$t)}function Yc(ue,w,B){let Q=ue.context,ee=Q.gl;Q.setColorMode(ue.colorModeForRenderPass());let le=th(Q,w),Fe=B.key,Ze=w.heatmapFbos.get(Fe);Ze&&(Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Ze.colorAttachment.get()),Q.activeTexture.set(ee.TEXTURE1),le.bind(ee.LINEAR,ee.CLAMP_TO_EDGE),ue.useProgram("heatmapTexture").draw(Q,ee.TRIANGLES,Po.disabled,Ko.disabled,ue.colorModeForRenderPass(),Pa.disabled,Ds(ue,w,0,1),null,w.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments,w.paint,ue.transform.zoom),Ze.destroy(),w.heatmapFbos.delete(Fe))}function eh(ue,w,B){var Q,ee;let le=ue.gl,Fe=le.createTexture();le.bindTexture(le.TEXTURE_2D,Fe),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_S,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_T,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MIN_FILTER,le.LINEAR),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MAG_FILTER,le.LINEAR);let Ze=(Q=ue.HALF_FLOAT)!==null&&Q!==void 0?Q:le.UNSIGNED_BYTE,ut=(ee=ue.RGBA16F)!==null&&ee!==void 0?ee:le.RGBA;le.texImage2D(le.TEXTURE_2D,0,ut,w,B,0,le.RGBA,Ze,null);let Mt=ue.createFramebuffer(w,B,!1,!1);return Mt.colorAttachment.set(Fe),Mt}function th(ue,w){return w.colorRampTexture||(w.colorRampTexture=new g(ue,w.colorRamp,ue.gl.RGBA)),w.colorRampTexture}function ju(ue,w,B,Q,ee){if(!B||!Q||!Q.imageAtlas)return;let le=Q.imageAtlas.patternPositions,Fe=le[B.to.toString()],Ze=le[B.from.toString()];if(!Fe&&Ze&&(Fe=Ze),!Ze&&Fe&&(Ze=Fe),!Fe||!Ze){let ut=ee.getPaintProperty(w);Fe=le[ut],Ze=le[ut]}Fe&&Ze&&ue.setConstantPatternPositions(Fe,Ze)}function jf(ue,w,B,Q,ee,le,Fe){let Ze=ue.context.gl,ut="fill-pattern",Mt=B.paint.get(ut),Jt=Mt&&Mt.constantOr(1),$t=B.getCrossfadeParameters(),yr,Cr,ve,xe,Ie;Fe?(Cr=Jt&&!B.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",yr=Ze.LINES):(Cr=Jt?"fillPattern":"fill",yr=Ze.TRIANGLES);let ze=Mt.constantOr(null);for(let Qe of Q){let Xe=w.getTile(Qe);if(Jt&&!Xe.patternsLoaded())continue;let nt=Xe.getBucket(B);if(!nt)continue;let qt=nt.programConfigurations.get(B.id),Wt=ue.useProgram(Cr,qt),nr=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(Qe);Jt&&(ue.context.activeTexture.set(Ze.TEXTURE0),Xe.imageAtlasTexture.bind(Ze.LINEAR,Ze.CLAMP_TO_EDGE),qt.updatePaintBuffers($t)),ju(qt,ut,ze,Xe,B);let fr=nr?Qe:null,br=ue.translatePosMatrix(fr?fr.posMatrix:Qe.posMatrix,Xe,B.paint.get("fill-translate"),B.paint.get("fill-translate-anchor"));if(Fe){xe=nt.indexBuffer2,Ie=nt.segments2;let Fr=[Ze.drawingBufferWidth,Ze.drawingBufferHeight];ve=Cr==="fillOutlinePattern"&&Jt?Ma(br,ue,$t,Xe,Fr):ea(br,Fr)}else xe=nt.indexBuffer,Ie=nt.segments,ve=Jt?ya(br,ue,$t,Xe):_n(br);Wt.draw(ue.context,yr,ee,ue.stencilModeForClipping(Qe),le,Pa.disabled,ve,nr,B.id,nt.layoutVertexBuffer,xe,Ie,B.paint,ue.transform.zoom,qt)}}function cc(ue,w,B,Q,ee,le,Fe){let Ze=ue.context,ut=Ze.gl,Mt="fill-extrusion-pattern",Jt=B.paint.get(Mt),$t=Jt.constantOr(1),yr=B.getCrossfadeParameters(),Cr=B.paint.get("fill-extrusion-opacity"),ve=Jt.constantOr(null);for(let xe of Q){let Ie=w.getTile(xe),ze=Ie.getBucket(B);if(!ze)continue;let Qe=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(xe),Xe=ze.programConfigurations.get(B.id),nt=ue.useProgram($t?"fillExtrusionPattern":"fillExtrusion",Xe);$t&&(ue.context.activeTexture.set(ut.TEXTURE0),Ie.imageAtlasTexture.bind(ut.LINEAR,ut.CLAMP_TO_EDGE),Xe.updatePaintBuffers(yr)),ju(Xe,Mt,ve,Ie,B);let qt=ue.translatePosMatrix(xe.posMatrix,Ie,B.paint.get("fill-extrusion-translate"),B.paint.get("fill-extrusion-translate-anchor")),Wt=B.paint.get("fill-extrusion-vertical-gradient"),nr=$t?ki(qt,ue,Wt,Cr,xe,yr,Ie):En(qt,ue,Wt,Cr);nt.draw(Ze,Ze.gl.TRIANGLES,ee,le,Fe,Pa.backCCW,nr,Qe,B.id,ze.layoutVertexBuffer,ze.indexBuffer,ze.segments,B.paint,ue.transform.zoom,Xe,ue.style.map.terrain&&ze.centroidVertexBuffer)}}function sf(ue,w,B,Q,ee,le,Fe){let Ze=ue.context,ut=Ze.gl,Mt=B.fbo;if(!Mt)return;let Jt=ue.useProgram("hillshade"),$t=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(w);Ze.activeTexture.set(ut.TEXTURE0),ut.bindTexture(ut.TEXTURE_2D,Mt.colorAttachment.get()),Jt.draw(Ze,ut.TRIANGLES,ee,le,Fe,Pa.disabled,((yr,Cr,ve,xe)=>{let Ie=ve.paint.get("hillshade-shadow-color"),ze=ve.paint.get("hillshade-highlight-color"),Qe=ve.paint.get("hillshade-accent-color"),Xe=ve.paint.get("hillshade-illumination-direction")*(Math.PI/180);ve.paint.get("hillshade-illumination-anchor")==="viewport"&&(Xe-=yr.transform.angle);let nt=!yr.options.moving;return{u_matrix:xe?xe.posMatrix:yr.transform.calculatePosMatrix(Cr.tileID.toUnwrapped(),nt),u_image:0,u_latrange:Fs(0,Cr.tileID),u_light:[ve.paint.get("hillshade-exaggeration"),Xe],u_shadow:Ie,u_highlight:ze,u_accent:Qe}})(ue,B,Q,$t?w:null),$t,Q.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments)}function Nl(ue,w,B,Q,ee,le){let Fe=ue.context,Ze=Fe.gl,ut=w.dem;if(ut&&ut.data){let Mt=ut.dim,Jt=ut.stride,$t=ut.getPixels();if(Fe.activeTexture.set(Ze.TEXTURE1),Fe.pixelStoreUnpackPremultiplyAlpha.set(!1),w.demTexture=w.demTexture||ue.getTileTexture(Jt),w.demTexture){let Cr=w.demTexture;Cr.update($t,{premultiply:!1}),Cr.bind(Ze.NEAREST,Ze.CLAMP_TO_EDGE)}else w.demTexture=new g(Fe,$t,Ze.RGBA,{premultiply:!1}),w.demTexture.bind(Ze.NEAREST,Ze.CLAMP_TO_EDGE);Fe.activeTexture.set(Ze.TEXTURE0);let yr=w.fbo;if(!yr){let Cr=new g(Fe,{width:Mt,height:Mt,data:null},Ze.RGBA);Cr.bind(Ze.LINEAR,Ze.CLAMP_TO_EDGE),yr=w.fbo=Fe.createFramebuffer(Mt,Mt,!0,!1),yr.colorAttachment.set(Cr.texture)}Fe.bindFramebuffer.set(yr.framebuffer),Fe.viewport.set([0,0,Mt,Mt]),ue.useProgram("hillshadePrepare").draw(Fe,Ze.TRIANGLES,Q,ee,le,Pa.disabled,((Cr,ve)=>{let xe=ve.stride,Ie=a.H();return a.aP(Ie,0,a.X,-a.X,0,0,1),a.J(Ie,Ie,[0,-a.X,0]),{u_matrix:Ie,u_image:1,u_dimension:[xe,xe],u_zoom:Cr.overscaledZ,u_unpack:ve.getUnpackVector()}})(w.tileID,ut),null,B.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments),w.needsHillshadePrepare=!1}}function Kc(ue,w,B,Q,ee,le){let Fe=Q.paint.get("raster-fade-duration");if(!le&&Fe>0){let Ze=u.now(),ut=(Ze-ue.timeAdded)/Fe,Mt=w?(Ze-w.timeAdded)/Fe:-1,Jt=B.getSource(),$t=ee.coveringZoomLevel({tileSize:Jt.tileSize,roundZoom:Jt.roundZoom}),yr=!w||Math.abs(w.tileID.overscaledZ-$t)>Math.abs(ue.tileID.overscaledZ-$t),Cr=yr&&ue.refreshedUponExpiration?1:a.ac(yr?ut:1-Mt,0,1);return ue.refreshedUponExpiration&&ut>=1&&(ue.refreshedUponExpiration=!1),w?{opacity:1,mix:1-Cr}:{opacity:Cr,mix:0}}return{opacity:1,mix:0}}let Rc=new a.aM(1,0,0,1),gs=new a.aM(0,1,0,1),Wf=new a.aM(0,0,1,1),Wh=new a.aM(1,0,1,1),rh=new a.aM(0,1,1,1);function lf(ue,w,B,Q){Mu(ue,0,w+B/2,ue.transform.width,B,Q)}function Sh(ue,w,B,Q){Mu(ue,w-B/2,0,B,ue.transform.height,Q)}function Mu(ue,w,B,Q,ee,le){let Fe=ue.context,Ze=Fe.gl;Ze.enable(Ze.SCISSOR_TEST),Ze.scissor(w*ue.pixelRatio,B*ue.pixelRatio,Q*ue.pixelRatio,ee*ue.pixelRatio),Fe.clear({color:le}),Ze.disable(Ze.SCISSOR_TEST)}function ih(ue,w,B){let Q=ue.context,ee=Q.gl,le=B.posMatrix,Fe=ue.useProgram("debug"),Ze=Po.disabled,ut=Ko.disabled,Mt=ue.colorModeForRenderPass(),Jt="$debug",$t=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(B);Q.activeTexture.set(ee.TEXTURE0);let yr=w.getTileByID(B.key).latestRawTileData,Cr=Math.floor((yr&&yr.byteLength||0)/1024),ve=w.getTile(B).tileSize,xe=512/Math.min(ve,512)*(B.overscaledZ/ue.transform.zoom)*.5,Ie=B.canonical.toString();B.overscaledZ!==B.canonical.z&&(Ie+=` => ${B.overscaledZ}`),function(ze,Qe){ze.initDebugOverlayCanvas();let Xe=ze.debugOverlayCanvas,nt=ze.context.gl,qt=ze.debugOverlayCanvas.getContext("2d");qt.clearRect(0,0,Xe.width,Xe.height),qt.shadowColor="white",qt.shadowBlur=2,qt.lineWidth=1.5,qt.strokeStyle="white",qt.textBaseline="top",qt.font="bold 36px Open Sans, sans-serif",qt.fillText(Qe,5,5),qt.strokeText(Qe,5,5),ze.debugOverlayTexture.update(Xe),ze.debugOverlayTexture.bind(nt.LINEAR,nt.CLAMP_TO_EDGE)}(ue,`${Ie} ${Cr}kB`),Fe.draw(Q,ee.TRIANGLES,Ze,ut,Os.alphaBlended,Pa.disabled,po(le,a.aM.transparent,xe),null,Jt,ue.debugBuffer,ue.quadTriangleIndexBuffer,ue.debugSegments),Fe.draw(Q,ee.LINE_STRIP,Ze,ut,Mt,Pa.disabled,po(le,a.aM.red),$t,Jt,ue.debugBuffer,ue.tileBorderIndexBuffer,ue.debugSegments)}function js(ue,w,B){let Q=ue.context,ee=Q.gl,le=ue.colorModeForRenderPass(),Fe=new Po(ee.LEQUAL,Po.ReadWrite,ue.depthRangeFor3D),Ze=ue.useProgram("terrain"),ut=w.getTerrainMesh();Q.bindFramebuffer.set(null),Q.viewport.set([0,0,ue.width,ue.height]);for(let Mt of B){let Jt=ue.renderToTexture.getTexture(Mt),$t=w.getTerrainData(Mt.tileID);Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Jt.texture);let yr=ue.transform.calculatePosMatrix(Mt.tileID.toUnwrapped()),Cr=w.getMeshFrameDelta(ue.transform.zoom),ve=ue.transform.calculateFogMatrix(Mt.tileID.toUnwrapped()),xe=Jr(yr,Cr,ve,ue.style.sky,ue.transform.pitch);Ze.draw(Q,ee.TRIANGLES,Fe,Ko.disabled,le,Pa.backCCW,xe,$t,"terrain",ut.vertexBuffer,ut.indexBuffer,ut.segments)}}class Eu{constructor(w,B,Q){this.vertexBuffer=w,this.indexBuffer=B,this.segments=Q}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Dc{constructor(w,B){this.context=new od(w),this.transform=B,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=pt.maxUnderzooming+pt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Xo}resize(w,B,Q){if(this.width=Math.floor(w*Q),this.height=Math.floor(B*Q),this.pixelRatio=Q,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let ee of this.style._order)this.style._layers[ee].resize()}setup(){let w=this.context,B=new a.aX;B.emplaceBack(0,0),B.emplaceBack(a.X,0),B.emplaceBack(0,a.X),B.emplaceBack(a.X,a.X),this.tileExtentBuffer=w.createVertexBuffer(B,vo.members),this.tileExtentSegments=a.a0.simpleSegment(0,0,4,2);let Q=new a.aX;Q.emplaceBack(0,0),Q.emplaceBack(a.X,0),Q.emplaceBack(0,a.X),Q.emplaceBack(a.X,a.X),this.debugBuffer=w.createVertexBuffer(Q,vo.members),this.debugSegments=a.a0.simpleSegment(0,0,4,5);let ee=new a.$;ee.emplaceBack(0,0,0,0),ee.emplaceBack(a.X,0,a.X,0),ee.emplaceBack(0,a.X,0,a.X),ee.emplaceBack(a.X,a.X,a.X,a.X),this.rasterBoundsBuffer=w.createVertexBuffer(ee,ct.members),this.rasterBoundsSegments=a.a0.simpleSegment(0,0,4,2);let le=new a.aX;le.emplaceBack(0,0),le.emplaceBack(1,0),le.emplaceBack(0,1),le.emplaceBack(1,1),this.viewportBuffer=w.createVertexBuffer(le,vo.members),this.viewportSegments=a.a0.simpleSegment(0,0,4,2);let Fe=new a.aZ;Fe.emplaceBack(0),Fe.emplaceBack(1),Fe.emplaceBack(3),Fe.emplaceBack(2),Fe.emplaceBack(0),this.tileBorderIndexBuffer=w.createIndexBuffer(Fe);let Ze=new a.aY;Ze.emplaceBack(0,1,2),Ze.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=w.createIndexBuffer(Ze);let ut=this.context.gl;this.stencilClearMode=new Ko({func:ut.ALWAYS,mask:0},0,255,ut.ZERO,ut.ZERO,ut.ZERO)}clearStencil(){let w=this.context,B=w.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let Q=a.H();a.aP(Q,0,this.width,this.height,0,0,1),a.K(Q,Q,[B.drawingBufferWidth,B.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(w,B.TRIANGLES,Po.disabled,this.stencilClearMode,Os.disabled,Pa.disabled,Lo(Q),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(w,B){if(this.currentStencilSource===w.source||!w.isTileClipped()||!B||!B.length)return;this.currentStencilSource=w.source;let Q=this.context,ee=Q.gl;this.nextStencilID+B.length>256&&this.clearStencil(),Q.setColorMode(Os.disabled),Q.setDepthMode(Po.disabled);let le=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let Fe of B){let Ze=this._tileClippingMaskIDs[Fe.key]=this.nextStencilID++,ut=this.style.map.terrain&&this.style.map.terrain.getTerrainData(Fe);le.draw(Q,ee.TRIANGLES,Po.disabled,new Ko({func:ee.ALWAYS,mask:0},Ze,255,ee.KEEP,ee.KEEP,ee.REPLACE),Os.disabled,Pa.disabled,Lo(Fe.posMatrix),ut,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let w=this.nextStencilID++,B=this.context.gl;return new Ko({func:B.NOTEQUAL,mask:255},w,255,B.KEEP,B.KEEP,B.REPLACE)}stencilModeForClipping(w){let B=this.context.gl;return new Ko({func:B.EQUAL,mask:255},this._tileClippingMaskIDs[w.key],0,B.KEEP,B.KEEP,B.REPLACE)}stencilConfigForOverlap(w){let B=this.context.gl,Q=w.sort((Fe,Ze)=>Ze.overscaledZ-Fe.overscaledZ),ee=Q[Q.length-1].overscaledZ,le=Q[0].overscaledZ-ee+1;if(le>1){this.currentStencilSource=void 0,this.nextStencilID+le>256&&this.clearStencil();let Fe={};for(let Ze=0;Ze({u_sky_color:ze.properties.get("sky-color"),u_horizon_color:ze.properties.get("horizon-color"),u_horizon:(Qe.height/2+Qe.getHorizon())*Xe,u_sky_horizon_blend:ze.properties.get("sky-horizon-blend")*Qe.height/2*Xe}))(Mt,ut.style.map.transform,ut.pixelRatio),Cr=new Po($t.LEQUAL,Po.ReadWrite,[0,1]),ve=Ko.disabled,xe=ut.colorModeForRenderPass(),Ie=ut.useProgram("sky");if(!Mt.mesh){let ze=new a.aX;ze.emplaceBack(-1,-1),ze.emplaceBack(1,-1),ze.emplaceBack(1,1),ze.emplaceBack(-1,1);let Qe=new a.aY;Qe.emplaceBack(0,1,2),Qe.emplaceBack(0,2,3),Mt.mesh=new Eu(Jt.createVertexBuffer(ze,vo.members),Jt.createIndexBuffer(Qe),a.a0.simpleSegment(0,0,ze.length,Qe.length))}Ie.draw(Jt,$t.TRIANGLES,Cr,ve,xe,Pa.disabled,yr,void 0,"sky",Mt.mesh.vertexBuffer,Mt.mesh.indexBuffer,Mt.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=B.showOverdrawInspector,this.depthRangeFor3D=[0,1-(w._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Q.length-1;this.currentLayer>=0;this.currentLayer--){let ut=this.style._layers[Q[this.currentLayer]],Mt=ee[ut.source],Jt=le[ut.source];this._renderTileClippingMasks(ut,Jt),this.renderLayer(this,Mt,ut,Jt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerIe.source&&!Ie.isHidden(Jt)?[Mt.sourceCaches[Ie.source]]:[]),Cr=yr.filter(Ie=>Ie.getSource().type==="vector"),ve=yr.filter(Ie=>Ie.getSource().type!=="vector"),xe=Ie=>{(!$t||$t.getSource().maxzoomxe(Ie)),$t||ve.forEach(Ie=>xe(Ie)),$t}(this.style,this.transform.zoom);ut&&function(Mt,Jt,$t){for(let yr=0;yr<$t.length;yr++)ih(Mt,Jt,$t[yr])}(this,ut,ut.getVisibleCoordinates())}this.options.showPadding&&function(ut){let Mt=ut.transform.padding;lf(ut,ut.transform.height-(Mt.top||0),3,Rc),lf(ut,Mt.bottom||0,3,gs),Sh(ut,Mt.left||0,3,Wf),Sh(ut,ut.transform.width-(Mt.right||0),3,Wh);let Jt=ut.transform.centerPoint;(function($t,yr,Cr,ve){Mu($t,yr-1,Cr-10,2,20,ve),Mu($t,yr-10,Cr-1,20,2,ve)})(ut,Jt.x,ut.transform.height-Jt.y,rh)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(w){if(!this.style||!this.style.map||!this.style.map.terrain)return;let B=this.terrainFacilitator.matrix,Q=this.transform.modelViewProjectionMatrix,ee=this.terrainFacilitator.dirty;ee||(ee=w?!a.a_(B,Q):!a.a$(B,Q)),ee||(ee=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),ee&&(a.b0(B,Q),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(le,Fe){let Ze=le.context,ut=Ze.gl,Mt=Os.unblended,Jt=new Po(ut.LEQUAL,Po.ReadWrite,[0,1]),$t=Fe.getTerrainMesh(),yr=Fe.sourceCache.getRenderableTiles(),Cr=le.useProgram("terrainDepth");Ze.bindFramebuffer.set(Fe.getFramebuffer("depth").framebuffer),Ze.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),Ze.clear({color:a.aM.transparent,depth:1});for(let ve of yr){let xe=Fe.getTerrainData(ve.tileID),Ie={u_matrix:le.transform.calculatePosMatrix(ve.tileID.toUnwrapped()),u_ele_delta:Fe.getMeshFrameDelta(le.transform.zoom)};Cr.draw(Ze,ut.TRIANGLES,Jt,Ko.disabled,Mt,Pa.backCCW,Ie,xe,"terrain",$t.vertexBuffer,$t.indexBuffer,$t.segments)}Ze.bindFramebuffer.set(null),Ze.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain),function(le,Fe){let Ze=le.context,ut=Ze.gl,Mt=Os.unblended,Jt=new Po(ut.LEQUAL,Po.ReadWrite,[0,1]),$t=Fe.getTerrainMesh(),yr=Fe.getCoordsTexture(),Cr=Fe.sourceCache.getRenderableTiles(),ve=le.useProgram("terrainCoords");Ze.bindFramebuffer.set(Fe.getFramebuffer("coords").framebuffer),Ze.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),Ze.clear({color:a.aM.transparent,depth:1}),Fe.coordsIndex=[];for(let xe of Cr){let Ie=Fe.getTerrainData(xe.tileID);Ze.activeTexture.set(ut.TEXTURE0),ut.bindTexture(ut.TEXTURE_2D,yr.texture);let ze={u_matrix:le.transform.calculatePosMatrix(xe.tileID.toUnwrapped()),u_terrain_coords_id:(255-Fe.coordsIndex.length)/255,u_texture:0,u_ele_delta:Fe.getMeshFrameDelta(le.transform.zoom)};ve.draw(Ze,ut.TRIANGLES,Jt,Ko.disabled,Mt,Pa.backCCW,ze,Ie,"terrain",$t.vertexBuffer,$t.indexBuffer,$t.segments),Fe.coordsIndex.push(xe.tileID.key)}Ze.bindFramebuffer.set(null),Ze.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain))}renderLayer(w,B,Q,ee){if(!Q.isHidden(this.transform.zoom)&&(Q.type==="background"||Q.type==="custom"||(ee||[]).length))switch(this.id=Q.id,Q.type){case"symbol":(function(le,Fe,Ze,ut,Mt){if(le.renderPass!=="translucent")return;let Jt=Ko.disabled,$t=le.colorModeForRenderPass();(Ze._unevaluatedLayout.hasValue("text-variable-anchor")||Ze._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(yr,Cr,ve,xe,Ie,ze,Qe,Xe,nt){let qt=Cr.transform,Wt=yn(),nr=Ie==="map",fr=ze==="map";for(let br of yr){let Fr=xe.getTile(br),Hr=Fr.getBucket(ve);if(!Hr||!Hr.text||!Hr.text.segments.get().length)continue;let ri=a.ag(Hr.textSizeData,qt.zoom),Ci=Fn(Fr,1,Cr.transform.zoom),cn=qr(br.posMatrix,fr,nr,Cr.transform,Ci),sn=ve.layout.get("icon-text-fit")!=="none"&&Hr.hasIconData();if(ri){let Ln=Math.pow(2,qt.zoom-Fr.tileID.overscaledZ),Yn=Cr.style.map.terrain?(fa,$a)=>Cr.style.map.terrain.getElevation(br,fa,$a):null,Aa=Wt.translatePosition(qt,Fr,Qe,Xe);yf(Hr,nr,fr,nt,qt,cn,br.posMatrix,Ln,ri,sn,Wt,Aa,br.toUnwrapped(),Yn)}}}(ut,le,Ze,Fe,Ze.layout.get("text-rotation-alignment"),Ze.layout.get("text-pitch-alignment"),Ze.paint.get("text-translate"),Ze.paint.get("text-translate-anchor"),Mt),Ze.paint.get("icon-opacity").constantOr(1)!==0&&Ah(le,Fe,Ze,ut,!1,Ze.paint.get("icon-translate"),Ze.paint.get("icon-translate-anchor"),Ze.layout.get("icon-rotation-alignment"),Ze.layout.get("icon-pitch-alignment"),Ze.layout.get("icon-keep-upright"),Jt,$t),Ze.paint.get("text-opacity").constantOr(1)!==0&&Ah(le,Fe,Ze,ut,!0,Ze.paint.get("text-translate"),Ze.paint.get("text-translate-anchor"),Ze.layout.get("text-rotation-alignment"),Ze.layout.get("text-pitch-alignment"),Ze.layout.get("text-keep-upright"),Jt,$t),Fe.map.showCollisionBoxes&&(Hu(le,Fe,Ze,ut,!0),Hu(le,Fe,Ze,ut,!1))})(w,B,Q,ee,this.style.placement.variableOffsets);break;case"circle":(function(le,Fe,Ze,ut){if(le.renderPass!=="translucent")return;let Mt=Ze.paint.get("circle-opacity"),Jt=Ze.paint.get("circle-stroke-width"),$t=Ze.paint.get("circle-stroke-opacity"),yr=!Ze.layout.get("circle-sort-key").isConstant();if(Mt.constantOr(1)===0&&(Jt.constantOr(1)===0||$t.constantOr(1)===0))return;let Cr=le.context,ve=Cr.gl,xe=le.depthModeForSublayer(0,Po.ReadOnly),Ie=Ko.disabled,ze=le.colorModeForRenderPass(),Qe=[];for(let Xe=0;XeXe.sortKey-nt.sortKey);for(let Xe of Qe){let{programConfiguration:nt,program:qt,layoutVertexBuffer:Wt,indexBuffer:nr,uniformValues:fr,terrainData:br}=Xe.state;qt.draw(Cr,ve.TRIANGLES,xe,Ie,ze,Pa.disabled,fr,br,Ze.id,Wt,nr,Xe.segments,Ze.paint,le.transform.zoom,nt)}})(w,B,Q,ee);break;case"heatmap":(function(le,Fe,Ze,ut){if(Ze.paint.get("heatmap-opacity")===0)return;let Mt=le.context;if(le.style.map.terrain){for(let Jt of ut){let $t=Fe.getTile(Jt);Fe.hasRenderableParent(Jt)||(le.renderPass==="offscreen"?_f(le,$t,Ze,Jt):le.renderPass==="translucent"&&Yc(le,Ze,Jt))}Mt.viewport.set([0,0,le.width,le.height])}else le.renderPass==="offscreen"?function(Jt,$t,yr,Cr){let ve=Jt.context,xe=ve.gl,Ie=Ko.disabled,ze=new Os([xe.ONE,xe.ONE],a.aM.transparent,[!0,!0,!0,!0]);(function(Qe,Xe,nt){let qt=Qe.gl;Qe.activeTexture.set(qt.TEXTURE1),Qe.viewport.set([0,0,Xe.width/4,Xe.height/4]);let Wt=nt.heatmapFbos.get(a.aU);Wt?(qt.bindTexture(qt.TEXTURE_2D,Wt.colorAttachment.get()),Qe.bindFramebuffer.set(Wt.framebuffer)):(Wt=eh(Qe,Xe.width/4,Xe.height/4),nt.heatmapFbos.set(a.aU,Wt))})(ve,Jt,yr),ve.clear({color:a.aM.transparent});for(let Qe=0;Qe20&&Jt.texParameterf(Jt.TEXTURE_2D,Mt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Mt.extTextureFilterAnisotropicMax);let Hr=le.style.map.terrain&&le.style.map.terrain.getTerrainData(Qe),ri=Hr?Qe:null,Ci=ri?ri.posMatrix:le.transform.calculatePosMatrix(Qe.toUnwrapped(),ze),cn=cl(Ci,br||[0,0],fr||1,nr,Ze);$t instanceof ar?yr.draw(Mt,Jt.TRIANGLES,Xe,Ko.disabled,Cr,Pa.disabled,cn,Hr,Ze.id,$t.boundsBuffer,le.quadTriangleIndexBuffer,$t.boundsSegments):yr.draw(Mt,Jt.TRIANGLES,Xe,ve[Qe.overscaledZ],Cr,Pa.disabled,cn,Hr,Ze.id,le.rasterBoundsBuffer,le.quadTriangleIndexBuffer,le.rasterBoundsSegments)}})(w,B,Q,ee);break;case"background":(function(le,Fe,Ze,ut){let Mt=Ze.paint.get("background-color"),Jt=Ze.paint.get("background-opacity");if(Jt===0)return;let $t=le.context,yr=$t.gl,Cr=le.transform,ve=Cr.tileSize,xe=Ze.paint.get("background-pattern");if(le.isPatternMissing(xe))return;let Ie=!xe&&Mt.a===1&&Jt===1&&le.opaquePassEnabledForLayer()?"opaque":"translucent";if(le.renderPass!==Ie)return;let ze=Ko.disabled,Qe=le.depthModeForSublayer(0,Ie==="opaque"?Po.ReadWrite:Po.ReadOnly),Xe=le.colorModeForRenderPass(),nt=le.useProgram(xe?"backgroundPattern":"background"),qt=ut||Cr.coveringTiles({tileSize:ve,terrain:le.style.map.terrain});xe&&($t.activeTexture.set(yr.TEXTURE0),le.imageManager.bind(le.context));let Wt=Ze.getCrossfadeParameters();for(let nr of qt){let fr=ut?nr.posMatrix:le.transform.calculatePosMatrix(nr.toUnwrapped()),br=xe?Su(fr,Jt,le,xe,{tileID:nr,tileSize:ve},Wt):Yl(fr,Jt,Mt),Fr=le.style.map.terrain&&le.style.map.terrain.getTerrainData(nr);nt.draw($t,yr.TRIANGLES,Qe,ze,Xe,Pa.disabled,br,Fr,Ze.id,le.tileExtentBuffer,le.quadTriangleIndexBuffer,le.tileExtentSegments)}})(w,0,Q,ee);break;case"custom":(function(le,Fe,Ze){let ut=le.context,Mt=Ze.implementation;if(le.renderPass==="offscreen"){let Jt=Mt.prerender;Jt&&(le.setCustomLayerDefaults(),ut.setColorMode(le.colorModeForRenderPass()),Jt.call(Mt,ut.gl,le.transform.customLayerMatrix()),ut.setDirty(),le.setBaseState())}else if(le.renderPass==="translucent"){le.setCustomLayerDefaults(),ut.setColorMode(le.colorModeForRenderPass()),ut.setStencilMode(Ko.disabled);let Jt=Mt.renderingMode==="3d"?new Po(le.context.gl.LEQUAL,Po.ReadWrite,le.depthRangeFor3D):le.depthModeForSublayer(0,Po.ReadOnly);ut.setDepthMode(Jt),Mt.render(ut.gl,le.transform.customLayerMatrix(),{farZ:le.transform.farZ,nearZ:le.transform.nearZ,fov:le.transform._fov,modelViewProjectionMatrix:le.transform.modelViewProjectionMatrix,projectionMatrix:le.transform.projectionMatrix}),ut.setDirty(),le.setBaseState(),ut.bindFramebuffer.set(null)}})(w,0,Q)}}translatePosMatrix(w,B,Q,ee,le){if(!Q[0]&&!Q[1])return w;let Fe=le?ee==="map"?this.transform.angle:0:ee==="viewport"?-this.transform.angle:0;if(Fe){let Mt=Math.sin(Fe),Jt=Math.cos(Fe);Q=[Q[0]*Jt-Q[1]*Mt,Q[0]*Mt+Q[1]*Jt]}let Ze=[le?Q[0]:Fn(B,Q[0],this.transform.zoom),le?Q[1]:Fn(B,Q[1],this.transform.zoom),0],ut=new Float32Array(16);return a.J(ut,w,Ze),ut}saveTileTexture(w){let B=this._tileTextures[w.size[0]];B?B.push(w):this._tileTextures[w.size[0]]=[w]}getTileTexture(w){let B=this._tileTextures[w];return B&&B.length>0?B.pop():null}isPatternMissing(w){if(!w)return!1;if(!w.from||!w.to)return!0;let B=this.imageManager.getPattern(w.from.toString()),Q=this.imageManager.getPattern(w.to.toString());return!B||!Q}useProgram(w,B){this.cache=this.cache||{};let Q=w+(B?B.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Q]||(this.cache[Q]=new hn(this.context,Gn[w],B,nc[w],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Q]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let w=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(w.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new g(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:w,drawingBufferHeight:B}=this.context.gl;return this.width!==w||this.height!==B}}class ks{constructor(w,B){this.points=w,this.planes=B}static fromInvProjectionMatrix(w,B,Q){let ee=Math.pow(2,Q),le=[[-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]].map(Ze=>{let ut=1/(Ze=a.af([],Ze,w))[3]/B*ee;return a.b1(Ze,Ze,[ut,ut,1/Ze[3],ut])}),Fe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(Ze=>{let ut=function(yr,Cr){var ve=Cr[0],xe=Cr[1],Ie=Cr[2],ze=ve*ve+xe*xe+Ie*Ie;return ze>0&&(ze=1/Math.sqrt(ze)),yr[0]=Cr[0]*ze,yr[1]=Cr[1]*ze,yr[2]=Cr[2]*ze,yr}([],function(yr,Cr,ve){var xe=Cr[0],Ie=Cr[1],ze=Cr[2],Qe=ve[0],Xe=ve[1],nt=ve[2];return yr[0]=Ie*nt-ze*Xe,yr[1]=ze*Qe-xe*nt,yr[2]=xe*Xe-Ie*Qe,yr}([],L([],le[Ze[0]],le[Ze[1]]),L([],le[Ze[2]],le[Ze[1]]))),Mt=-((Jt=ut)[0]*($t=le[Ze[1]])[0]+Jt[1]*$t[1]+Jt[2]*$t[2]);var Jt,$t;return ut.concat(Mt)});return new ks(le,Fe)}}class bc{constructor(w,B){this.min=w,this.max=B,this.center=function(Q,ee,le){return Q[0]=.5*ee[0],Q[1]=.5*ee[1],Q[2]=.5*ee[2],Q}([],function(Q,ee,le){return Q[0]=ee[0]+le[0],Q[1]=ee[1]+le[1],Q[2]=ee[2]+le[2],Q}([],this.min,this.max))}quadrant(w){let B=[w%2==0,w<2],Q=M(this.min),ee=M(this.max);for(let le=0;le=0&&Fe++;if(Fe===0)return 0;Fe!==B.length&&(Q=!1)}if(Q)return 2;for(let ee=0;ee<3;ee++){let le=Number.MAX_VALUE,Fe=-Number.MAX_VALUE;for(let Ze=0;Zethis.max[ee]-this.min[ee])return 0}return 1}}class hu{constructor(w=0,B=0,Q=0,ee=0){if(isNaN(w)||w<0||isNaN(B)||B<0||isNaN(Q)||Q<0||isNaN(ee)||ee<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=w,this.bottom=B,this.left=Q,this.right=ee}interpolate(w,B,Q){return B.top!=null&&w.top!=null&&(this.top=a.y.number(w.top,B.top,Q)),B.bottom!=null&&w.bottom!=null&&(this.bottom=a.y.number(w.bottom,B.bottom,Q)),B.left!=null&&w.left!=null&&(this.left=a.y.number(w.left,B.left,Q)),B.right!=null&&w.right!=null&&(this.right=a.y.number(w.right,B.right,Q)),this}getCenter(w,B){let Q=a.ac((this.left+w-this.right)/2,0,w),ee=a.ac((this.top+B-this.bottom)/2,0,B);return new a.P(Q,ee)}equals(w){return this.top===w.top&&this.bottom===w.bottom&&this.left===w.left&&this.right===w.right}clone(){return new hu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let _u=85.051129;class nl{constructor(w,B,Q,ee,le){this.tileSize=512,this._renderWorldCopies=le===void 0||!!le,this._minZoom=w||0,this._maxZoom=B||22,this._minPitch=Q==null?0:Q,this._maxPitch=ee==null?60:ee,this.setMaxBounds(),this.width=0,this.height=0,this._center=new a.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new hu,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let w=new nl(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return w.apply(this),w}apply(w){this.tileSize=w.tileSize,this.latRange=w.latRange,this.lngRange=w.lngRange,this.width=w.width,this.height=w.height,this._center=w._center,this._elevation=w._elevation,this.minElevationForCurrentTile=w.minElevationForCurrentTile,this.zoom=w.zoom,this.angle=w.angle,this._fov=w._fov,this._pitch=w._pitch,this._unmodified=w._unmodified,this._edgeInsets=w._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(w){this._minZoom!==w&&(this._minZoom=w,this.zoom=Math.max(this.zoom,w))}get maxZoom(){return this._maxZoom}set maxZoom(w){this._maxZoom!==w&&(this._maxZoom=w,this.zoom=Math.min(this.zoom,w))}get minPitch(){return this._minPitch}set minPitch(w){this._minPitch!==w&&(this._minPitch=w,this.pitch=Math.max(this.pitch,w))}get maxPitch(){return this._maxPitch}set maxPitch(w){this._maxPitch!==w&&(this._maxPitch=w,this.pitch=Math.min(this.pitch,w))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(w){w===void 0?w=!0:w===null&&(w=!1),this._renderWorldCopies=w}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new a.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(w){let B=-a.b3(w,-180,180)*Math.PI/180;this.angle!==B&&(this._unmodified=!1,this.angle=B,this._calcMatrices(),this.rotationMatrix=function(){var Q=new a.A(4);return a.A!=Float32Array&&(Q[1]=0,Q[2]=0),Q[0]=1,Q[3]=1,Q}(),function(Q,ee,le){var Fe=ee[0],Ze=ee[1],ut=ee[2],Mt=ee[3],Jt=Math.sin(le),$t=Math.cos(le);Q[0]=Fe*$t+ut*Jt,Q[1]=Ze*$t+Mt*Jt,Q[2]=Fe*-Jt+ut*$t,Q[3]=Ze*-Jt+Mt*$t}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(w){let B=a.ac(w,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==B&&(this._unmodified=!1,this._pitch=B,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(w){w=Math.max(.01,Math.min(60,w)),this._fov!==w&&(this._unmodified=!1,this._fov=w/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(w){let B=Math.min(Math.max(w,this.minZoom),this.maxZoom);this._zoom!==B&&(this._unmodified=!1,this._zoom=B,this.tileZoom=Math.max(0,Math.floor(B)),this.scale=this.zoomScale(B),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(w){w.lat===this._center.lat&&w.lng===this._center.lng||(this._unmodified=!1,this._center=w,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(w){w!==this._elevation&&(this._elevation=w,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(w){this._edgeInsets.equals(w)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,w,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(w){return this._edgeInsets.equals(w)}interpolatePadding(w,B,Q){this._unmodified=!1,this._edgeInsets.interpolate(w,B,Q),this._constrain(),this._calcMatrices()}coveringZoomLevel(w){let B=(w.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/w.tileSize));return Math.max(0,B)}getVisibleUnwrappedCoordinates(w){let B=[new a.b4(0,w)];if(this._renderWorldCopies){let Q=this.pointCoordinate(new a.P(0,0)),ee=this.pointCoordinate(new a.P(this.width,0)),le=this.pointCoordinate(new a.P(this.width,this.height)),Fe=this.pointCoordinate(new a.P(0,this.height)),Ze=Math.floor(Math.min(Q.x,ee.x,le.x,Fe.x)),ut=Math.floor(Math.max(Q.x,ee.x,le.x,Fe.x)),Mt=1;for(let Jt=Ze-Mt;Jt<=ut+Mt;Jt++)Jt!==0&&B.push(new a.b4(Jt,w))}return B}coveringTiles(w){var B,Q;let ee=this.coveringZoomLevel(w),le=ee;if(w.minzoom!==void 0&&eew.maxzoom&&(ee=w.maxzoom);let Fe=this.pointCoordinate(this.getCameraPoint()),Ze=a.Z.fromLngLat(this.center),ut=Math.pow(2,ee),Mt=[ut*Fe.x,ut*Fe.y,0],Jt=[ut*Ze.x,ut*Ze.y,0],$t=ks.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,ee),yr=w.minzoom||0;!w.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(yr=ee);let Cr=w.terrain?2/Math.min(this.tileSize,w.tileSize)*this.tileSize:3,ve=Xe=>({aabb:new bc([Xe*ut,0,0],[(Xe+1)*ut,ut,0]),zoom:0,x:0,y:0,wrap:Xe,fullyVisible:!1}),xe=[],Ie=[],ze=ee,Qe=w.reparseOverscaled?le:ee;if(this._renderWorldCopies)for(let Xe=1;Xe<=3;Xe++)xe.push(ve(-Xe)),xe.push(ve(Xe));for(xe.push(ve(0));xe.length>0;){let Xe=xe.pop(),nt=Xe.x,qt=Xe.y,Wt=Xe.fullyVisible;if(!Wt){let Hr=Xe.aabb.intersects($t);if(Hr===0)continue;Wt=Hr===2}let nr=w.terrain?Mt:Jt,fr=Xe.aabb.distanceX(nr),br=Xe.aabb.distanceY(nr),Fr=Math.max(Math.abs(fr),Math.abs(br));if(Xe.zoom===ze||Fr>Cr+(1<=yr){let Hr=ze-Xe.zoom,ri=Mt[0]-.5-(nt<>1),cn=Xe.zoom+1,sn=Xe.aabb.quadrant(Hr);if(w.terrain){let Ln=new a.S(cn,Xe.wrap,cn,ri,Ci),Yn=w.terrain.getMinMaxElevation(Ln),Aa=(B=Yn.minElevation)!==null&&B!==void 0?B:this.elevation,fa=(Q=Yn.maxElevation)!==null&&Q!==void 0?Q:this.elevation;sn=new bc([sn.min[0],sn.min[1],Aa],[sn.max[0],sn.max[1],fa])}xe.push({aabb:sn,zoom:cn,x:ri,y:Ci,wrap:Xe.wrap,fullyVisible:Wt})}}return Ie.sort((Xe,nt)=>Xe.distanceSq-nt.distanceSq).map(Xe=>Xe.tileID)}resize(w,B){this.width=w,this.height=B,this.pixelsToGLUnits=[2/w,-2/B],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(w){return Math.pow(2,w)}scaleZoom(w){return Math.log(w)/Math.LN2}project(w){let B=a.ac(w.lat,-85.051129,_u);return new a.P(a.O(w.lng)*this.worldSize,a.Q(B)*this.worldSize)}unproject(w){return new a.Z(w.x/this.worldSize,w.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(w){let B=this.elevation,Q=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,ee=this.pointLocation(this.centerPoint,w),le=w.getElevationForLngLatZoom(ee,this.tileZoom);if(!(this.elevation-le))return;let Fe=Q+B-le,Ze=Math.cos(this._pitch)*this.cameraToCenterDistance/Fe/a.b5(1,ee.lat),ut=this.scaleZoom(Ze/this.tileSize);this._elevation=le,this._center=ee,this.zoom=ut}setLocationAtPoint(w,B){let Q=this.pointCoordinate(B),ee=this.pointCoordinate(this.centerPoint),le=this.locationCoordinate(w),Fe=new a.Z(le.x-(Q.x-ee.x),le.y-(Q.y-ee.y));this.center=this.coordinateLocation(Fe),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(w,B){return B?this.coordinatePoint(this.locationCoordinate(w),B.getElevationForLngLatZoom(w,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(w))}pointLocation(w,B){return this.coordinateLocation(this.pointCoordinate(w,B))}locationCoordinate(w){return a.Z.fromLngLat(w)}coordinateLocation(w){return w&&w.toLngLat()}pointCoordinate(w,B){if(B){let yr=B.pointCoordinate(w);if(yr!=null)return yr}let Q=[w.x,w.y,0,1],ee=[w.x,w.y,1,1];a.af(Q,Q,this.pixelMatrixInverse),a.af(ee,ee,this.pixelMatrixInverse);let le=Q[3],Fe=ee[3],Ze=Q[1]/le,ut=ee[1]/Fe,Mt=Q[2]/le,Jt=ee[2]/Fe,$t=Mt===Jt?0:(0-Mt)/(Jt-Mt);return new a.Z(a.y.number(Q[0]/le,ee[0]/Fe,$t)/this.worldSize,a.y.number(Ze,ut,$t)/this.worldSize)}coordinatePoint(w,B=0,Q=this.pixelMatrix){let ee=[w.x*this.worldSize,w.y*this.worldSize,B,1];return a.af(ee,ee,Q),new a.P(ee[0]/ee[3],ee[1]/ee[3])}getBounds(){let w=Math.max(0,this.height/2-this.getHorizon());return new ce().extend(this.pointLocation(new a.P(0,w))).extend(this.pointLocation(new a.P(this.width,w))).extend(this.pointLocation(new a.P(this.width,this.height))).extend(this.pointLocation(new a.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ce([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(w){w?(this.lngRange=[w.getWest(),w.getEast()],this.latRange=[w.getSouth(),w.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,_u])}calculateTileMatrix(w){let B=w.canonical,Q=this.worldSize/this.zoomScale(B.z),ee=B.x+Math.pow(2,B.z)*w.wrap,le=a.an(new Float64Array(16));return a.J(le,le,[ee*Q,B.y*Q,0]),a.K(le,le,[Q/a.X,Q/a.X,1]),le}calculatePosMatrix(w,B=!1){let Q=w.key,ee=B?this._alignedPosMatrixCache:this._posMatrixCache;if(ee[Q])return ee[Q];let le=this.calculateTileMatrix(w);return a.L(le,B?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,le),ee[Q]=new Float32Array(le),ee[Q]}calculateFogMatrix(w){let B=w.key,Q=this._fogMatrixCache;if(Q[B])return Q[B];let ee=this.calculateTileMatrix(w);return a.L(ee,this.fogMatrix,ee),Q[B]=new Float32Array(ee),Q[B]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(w,B){B=a.ac(+B,this.minZoom,this.maxZoom);let Q={center:new a.N(w.lng,w.lat),zoom:B},ee=this.lngRange;if(!this._renderWorldCopies&&ee===null){let Xe=179.9999999999;ee=[-Xe,Xe]}let le=this.tileSize*this.zoomScale(Q.zoom),Fe=0,Ze=le,ut=0,Mt=le,Jt=0,$t=0,{x:yr,y:Cr}=this.size;if(this.latRange){let Xe=this.latRange;Fe=a.Q(Xe[1])*le,Ze=a.Q(Xe[0])*le,Ze-FeZe&&(ze=Ze-Xe)}if(ee){let Xe=(ut+Mt)/2,nt=ve;this._renderWorldCopies&&(nt=a.b3(ve,Xe-le/2,Xe+le/2));let qt=yr/2;nt-qtMt&&(Ie=Mt-qt)}if(Ie!==void 0||ze!==void 0){let Xe=new a.P(Ie!=null?Ie:ve,ze!=null?ze:xe);Q.center=this.unproject.call({worldSize:le},Xe).wrap()}return Q}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let w=this._unmodified,{center:B,zoom:Q}=this.getConstrained(this.center,this.zoom);this.center=B,this.zoom=Q,this._unmodified=w,this._constraining=!1}_calcMatrices(){if(!this.height)return;let w=this.centerOffset,B=this.point.x,Q=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=a.b5(1,this.center.lat)*this.worldSize;let ee=a.an(new Float64Array(16));a.K(ee,ee,[this.width/2,-this.height/2,1]),a.J(ee,ee,[1,-1,0]),this.labelPlaneMatrix=ee,ee=a.an(new Float64Array(16)),a.K(ee,ee,[1,-1,1]),a.J(ee,ee,[-1,-1,0]),a.K(ee,ee,[2/this.width,2/this.height,1]),this.glCoordMatrix=ee;let le=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),Fe=Math.min(this.elevation,this.minElevationForCurrentTile),Ze=le-Fe*this._pixelPerMeter/Math.cos(this._pitch),ut=Fe<0?Ze:le,Mt=Math.PI/2+this._pitch,Jt=this._fov*(.5+w.y/this.height),$t=Math.sin(Jt)*ut/Math.sin(a.ac(Math.PI-Mt-Jt,.01,Math.PI-.01)),yr=this.getHorizon(),Cr=2*Math.atan(yr/this.cameraToCenterDistance)*(.5+w.y/(2*yr)),ve=Math.sin(Cr)*ut/Math.sin(a.ac(Math.PI-Mt-Cr,.01,Math.PI-.01)),xe=Math.min($t,ve);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*xe+ut),this.nearZ=this.height/50,ee=new Float64Array(16),a.b6(ee,this._fov,this.width/this.height,this.nearZ,this.farZ),ee[8]=2*-w.x/this.width,ee[9]=2*w.y/this.height,this.projectionMatrix=a.ae(ee),a.K(ee,ee,[1,-1,1]),a.J(ee,ee,[0,0,-this.cameraToCenterDistance]),a.b7(ee,ee,this._pitch),a.ad(ee,ee,this.angle),a.J(ee,ee,[-B,-Q,0]),this.mercatorMatrix=a.K([],ee,[this.worldSize,this.worldSize,this.worldSize]),a.K(ee,ee,[1,1,this._pixelPerMeter]),this.pixelMatrix=a.L(new Float64Array(16),this.labelPlaneMatrix,ee),a.J(ee,ee,[0,0,-this.elevation]),this.modelViewProjectionMatrix=ee,this.invModelViewProjectionMatrix=a.as([],ee),this.fogMatrix=new Float64Array(16),a.b6(this.fogMatrix,this._fov,this.width/this.height,le,this.farZ),this.fogMatrix[8]=2*-w.x/this.width,this.fogMatrix[9]=2*w.y/this.height,a.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),a.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),a.b7(this.fogMatrix,this.fogMatrix,this._pitch),a.ad(this.fogMatrix,this.fogMatrix,this.angle),a.J(this.fogMatrix,this.fogMatrix,[-B,-Q,0]),a.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),a.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=a.L(new Float64Array(16),this.labelPlaneMatrix,ee);let Ie=this.width%2/2,ze=this.height%2/2,Qe=Math.cos(this.angle),Xe=Math.sin(this.angle),nt=B-Math.round(B)+Qe*Ie+Xe*ze,qt=Q-Math.round(Q)+Qe*ze+Xe*Ie,Wt=new Float64Array(ee);if(a.J(Wt,Wt,[nt>.5?nt-1:nt,qt>.5?qt-1:qt,0]),this.alignedModelViewProjectionMatrix=Wt,ee=a.as(new Float64Array(16),this.pixelMatrix),!ee)throw new Error("failed to invert matrix");this.pixelMatrixInverse=ee,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let w=this.pointCoordinate(new a.P(0,0)),B=[w.x*this.worldSize,w.y*this.worldSize,0,1];return a.af(B,B,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let w=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.P(0,w))}getCameraQueryGeometry(w){let B=this.getCameraPoint();if(w.length===1)return[w[0],B];{let Q=B.x,ee=B.y,le=B.x,Fe=B.y;for(let Ze of w)Q=Math.min(Q,Ze.x),ee=Math.min(ee,Ze.y),le=Math.max(le,Ze.x),Fe=Math.max(Fe,Ze.y);return[new a.P(Q,ee),new a.P(le,ee),new a.P(le,Fe),new a.P(Q,Fe),new a.P(Q,ee)]}}lngLatToCameraDepth(w,B){let Q=this.locationCoordinate(w),ee=[Q.x*this.worldSize,Q.y*this.worldSize,B,1];return a.af(ee,ee,this.modelViewProjectionMatrix),ee[2]/ee[3]}}function nh(ue,w){let B,Q=!1,ee=null,le=null,Fe=()=>{ee=null,Q&&(ue.apply(le,B),ee=setTimeout(Fe,w),Q=!1)};return(...Ze)=>(Q=!0,le=this,B=Ze,ee||Fe(),ee)}class Mh{constructor(w){this._getCurrentHash=()=>{let B=window.location.hash.replace("#","");if(this._hashName){let Q;return B.split("&").map(ee=>ee.split("=")).forEach(ee=>{ee[0]===this._hashName&&(Q=ee)}),(Q&&Q[1]||"").split("/")}return B.split("/")},this._onHashChange=()=>{let B=this._getCurrentHash();if(B.length>=3&&!B.some(Q=>isNaN(Q))){let Q=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(B[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+B[2],+B[1]],zoom:+B[0],bearing:Q,pitch:+(B[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let B=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,B)},this._removeHash=()=>{let B=this._getCurrentHash();if(B.length===0)return;let Q=B.join("/"),ee=Q;ee.split("&").length>0&&(ee=ee.split("&")[0]),this._hashName&&(ee=`${this._hashName}=${Q}`);let le=window.location.hash.replace(ee,"");le.startsWith("#&")?le=le.slice(0,1)+le.slice(2):le==="#"&&(le="");let Fe=window.location.href.replace(/(#.+)?$/,le);Fe=Fe.replace("&&","&"),window.history.replaceState(window.history.state,null,Fe)},this._updateHash=nh(this._updateHashUnthrottled,300),this._hashName=w&&encodeURIComponent(w)}addTo(w){return this._map=w,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(w){let B=this._map.getCenter(),Q=Math.round(100*this._map.getZoom())/100,ee=Math.ceil((Q*Math.LN2+Math.log(512/360/.5))/Math.LN10),le=Math.pow(10,ee),Fe=Math.round(B.lng*le)/le,Ze=Math.round(B.lat*le)/le,ut=this._map.getBearing(),Mt=this._map.getPitch(),Jt="";if(Jt+=w?`/${Fe}/${Ze}/${Q}`:`${Q}/${Ze}/${Fe}`,(ut||Mt)&&(Jt+="/"+Math.round(10*ut)/10),Mt&&(Jt+=`/${Math.round(Mt)}`),this._hashName){let $t=this._hashName,yr=!1,Cr=window.location.hash.slice(1).split("&").map(ve=>{let xe=ve.split("=")[0];return xe===$t?(yr=!0,`${xe}=${Jt}`):ve}).filter(ve=>ve);return yr||Cr.push(`${$t}=${Jt}`),`#${Cr.join("&")}`}return`#${Jt}`}}let zu={linearity:.3,easing:a.b8(0,0,.3,1)},Fc=a.e({deceleration:2500,maxSpeed:1400},zu),wc=a.e({deceleration:20,maxSpeed:1400},zu),bd=a.e({deceleration:1e3,maxSpeed:360},zu),xf=a.e({deceleration:1e3,maxSpeed:90},zu);class Pf{constructor(w){this._map=w,this.clear()}clear(){this._inertiaBuffer=[]}record(w){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:u.now(),settings:w})}_drainInertiaBuffer(){let w=this._inertiaBuffer,B=u.now();for(;w.length>0&&B-w[0].time>160;)w.shift()}_onMoveEnd(w){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let B={zoom:0,bearing:0,pitch:0,pan:new a.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:le}of this._inertiaBuffer)B.zoom+=le.zoomDelta||0,B.bearing+=le.bearingDelta||0,B.pitch+=le.pitchDelta||0,le.panDelta&&B.pan._add(le.panDelta),le.around&&(B.around=le.around),le.pinchAround&&(B.pinchAround=le.pinchAround);let Q=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,ee={};if(B.pan.mag()){let le=bf(B.pan.mag(),Q,a.e({},Fc,w||{}));ee.offset=B.pan.mult(le.amount/B.pan.mag()),ee.center=this._map.transform.center,qu(ee,le)}if(B.zoom){let le=bf(B.zoom,Q,wc);ee.zoom=this._map.transform.zoom+le.amount,qu(ee,le)}if(B.bearing){let le=bf(B.bearing,Q,bd);ee.bearing=this._map.transform.bearing+a.ac(le.amount,-179,179),qu(ee,le)}if(B.pitch){let le=bf(B.pitch,Q,xf);ee.pitch=this._map.transform.pitch+le.amount,qu(ee,le)}if(ee.zoom||ee.bearing){let le=B.pinchAround===void 0?B.around:B.pinchAround;ee.around=le?this._map.unproject(le):this._map.getCenter()}return this.clear(),a.e(ee,{noMoveStart:!0})}}function qu(ue,w){(!ue.duration||ue.durationB.unproject(ut)),Ze=le.reduce((ut,Mt,Jt,$t)=>ut.add(Mt.div($t.length)),new a.P(0,0));super(w,{points:le,point:Ze,lngLats:Fe,lngLat:B.unproject(Ze),originalEvent:Q}),this._defaultPrevented=!1}}class Xh extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q){super(w,{originalEvent:Q}),this._defaultPrevented=!1}}class If{constructor(w,B){this._map=w,this._clickTolerance=B.clickTolerance}reset(){delete this._mousedownPos}wheel(w){return this._firePreventable(new Xh(w.type,this._map,w))}mousedown(w,B){return this._mousedownPos=B,this._firePreventable(new jl(w.type,this._map,w))}mouseup(w){this._map.fire(new jl(w.type,this._map,w))}click(w,B){this._mousedownPos&&this._mousedownPos.dist(B)>=this._clickTolerance||this._map.fire(new jl(w.type,this._map,w))}dblclick(w){return this._firePreventable(new jl(w.type,this._map,w))}mouseover(w){this._map.fire(new jl(w.type,this._map,w))}mouseout(w){this._map.fire(new jl(w.type,this._map,w))}touchstart(w){return this._firePreventable(new uf(w.type,this._map,w))}touchmove(w){this._map.fire(new uf(w.type,this._map,w))}touchend(w){this._map.fire(new uf(w.type,this._map,w))}touchcancel(w){this._map.fire(new uf(w.type,this._map,w))}_firePreventable(w){if(this._map.fire(w),w.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Cs{constructor(w){this._map=w}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(w){this._map.fire(new jl(w.type,this._map,w))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new jl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(w){this._delayContextMenu?this._contextMenuEvent=w:this._ignoreContextMenu||this._map.fire(new jl(w.type,this._map,w)),this._map.listens("contextmenu")&&w.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class du{constructor(w){this._map=w}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(w){return this.transform.pointLocation(a.P.convert(w),this._map.terrain)}}class ku{constructor(w,B){this._map=w,this._tr=new du(w),this._el=w.getCanvasContainer(),this._container=w.getContainer(),this._clickTolerance=B.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(w,B){this.isEnabled()&&w.shiftKey&&w.button===0&&(c.disableDrag(),this._startPos=this._lastPos=B,this._active=!0)}mousemoveWindow(w,B){if(!this._active)return;let Q=B;if(this._lastPos.equals(Q)||!this._box&&Q.dist(this._startPos)le.fitScreenCoordinates(Q,ee,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",w)}keydown(w){this._active&&w.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",w))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(c.remove(this._box),this._box=null),c.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(w,B){return this._map.fire(new a.k(w,{originalEvent:B}))}}function Xf(ue,w){if(ue.length!==w.length)throw new Error(`The number of touches and points are not equal - touches ${ue.length}, points ${w.length}`);let B={};for(let Q=0;Qthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=w.timeStamp),Q.length===this.numTouches&&(this.centroid=function(ee){let le=new a.P(0,0);for(let Fe of ee)le._add(Fe);return le.div(ee.length)}(B),this.touches=Xf(Q,B)))}touchmove(w,B,Q){if(this.aborted||!this.centroid)return;let ee=Xf(Q,B);for(let le in this.touches){let Fe=ee[le];(!Fe||Fe.dist(this.touches[le])>30)&&(this.aborted=!0)}}touchend(w,B,Q){if((!this.centroid||w.timeStamp-this.startTime>500)&&(this.aborted=!0),Q.length===0){let ee=!this.aborted&&this.centroid;if(this.reset(),ee)return ee}}}class wf{constructor(w){this.singleTap=new Us(w),this.numTaps=w.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(w,B,Q){this.singleTap.touchstart(w,B,Q)}touchmove(w,B,Q){this.singleTap.touchmove(w,B,Q)}touchend(w,B,Q){let ee=this.singleTap.touchend(w,B,Q);if(ee){let le=w.timeStamp-this.lastTime<500,Fe=!this.lastTap||this.lastTap.dist(ee)<30;if(le&&Fe||this.reset(),this.count++,this.lastTime=w.timeStamp,this.lastTap=ee,this.count===this.numTaps)return this.reset(),ee}}}class zc{constructor(w){this._tr=new du(w),this._zoomIn=new wf({numTouches:1,numTaps:2}),this._zoomOut=new wf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(w,B,Q){this._zoomIn.touchstart(w,B,Q),this._zoomOut.touchstart(w,B,Q)}touchmove(w,B,Q){this._zoomIn.touchmove(w,B,Q),this._zoomOut.touchmove(w,B,Q)}touchend(w,B,Q){let ee=this._zoomIn.touchend(w,B,Q),le=this._zoomOut.touchend(w,B,Q),Fe=this._tr;return ee?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Ze=>Ze.easeTo({duration:300,zoom:Fe.zoom+1,around:Fe.unproject(ee)},{originalEvent:w})}):le?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Ze=>Ze.easeTo({duration:300,zoom:Fe.zoom-1,around:Fe.unproject(le)},{originalEvent:w})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Wu{constructor(w){this._enabled=!!w.enable,this._moveStateManager=w.moveStateManager,this._clickTolerance=w.clickTolerance||1,this._moveFunction=w.move,this._activateOnStart=!!w.activateOnStart,w.assignEvents(this),this.reset()}reset(w){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(w)}_move(...w){let B=this._moveFunction(...w);if(B.bearingDelta||B.pitchDelta||B.around||B.panDelta)return this._active=!0,B}dragStart(w,B){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(w)&&(this._moveStateManager.startMove(w),this._lastPoint=B.length?B[0]:B,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(w,B){if(!this.isEnabled())return;let Q=this._lastPoint;if(!Q)return;if(w.preventDefault(),!this._moveStateManager.isValidMoveEvent(w))return void this.reset(w);let ee=B.length?B[0]:B;return!this._moved&&ee.dist(Q){ue.mousedown=ue.dragStart,ue.mousemoveWindow=ue.dragMove,ue.mouseup=ue.dragEnd,ue.contextmenu=w=>{w.preventDefault()}},Wl=({enable:ue,clickTolerance:w,bearingDegreesPerPixelMoved:B=.8})=>{let Q=new Xu({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,le)=>({bearingDelta:(le.x-ee.x)*B}),moveStateManager:Q,enable:ue,assignEvents:Zf})},ah=({enable:ue,clickTolerance:w,pitchDegreesPerPixelMoved:B=-.5})=>{let Q=new Xu({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,le)=>({pitchDelta:(le.y-ee.y)*B}),moveStateManager:Q,enable:ue,assignEvents:Zf})};class Zu{constructor(w,B){this._clickTolerance=w.clickTolerance||1,this._map=B,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new a.P(0,0)}_shouldBePrevented(w){return w<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(w,B,Q){return this._calculateTransform(w,B,Q)}touchmove(w,B,Q){if(this._active){if(!this._shouldBePrevented(Q.length))return w.preventDefault(),this._calculateTransform(w,B,Q);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",w)}}touchend(w,B,Q){this._calculateTransform(w,B,Q),this._active&&this._shouldBePrevented(Q.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(w,B,Q){Q.length>0&&(this._active=!0);let ee=Xf(Q,B),le=new a.P(0,0),Fe=new a.P(0,0),Ze=0;for(let Mt in ee){let Jt=ee[Mt],$t=this._touches[Mt];$t&&(le._add(Jt),Fe._add(Jt.sub($t)),Ze++,ee[Mt]=Jt)}if(this._touches=ee,this._shouldBePrevented(Ze)||!Fe.mag())return;let ut=Fe.div(Ze);return this._sum._add(ut),this._sum.mag()Math.abs(ue.x)}class Bc extends qc{constructor(w){super(),this._currentTouchCount=0,this._map=w}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(w,B,Q){super.touchstart(w,B,Q),this._currentTouchCount=Q.length}_start(w){this._lastPoints=w,fc(w[0].sub(w[1]))&&(this._valid=!1)}_move(w,B,Q){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let ee=w[0].sub(this._lastPoints[0]),le=w[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(ee,le,Q.timeStamp),this._valid?(this._lastPoints=w,this._active=!0,{pitchDelta:(ee.y+le.y)/2*-.5}):void 0}gestureBeginsVertically(w,B,Q){if(this._valid!==void 0)return this._valid;let ee=w.mag()>=2,le=B.mag()>=2;if(!ee&&!le)return;if(!ee||!le)return this._firstMove===void 0&&(this._firstMove=Q),Q-this._firstMove<100&&void 0;let Fe=w.y>0==B.y>0;return fc(w)&&fc(B)&&Fe}}let kt={panStep:100,bearingStep:15,pitchStep:10};class Zt{constructor(w){this._tr=new du(w);let B=kt;this._panStep=B.panStep,this._bearingStep=B.bearingStep,this._pitchStep=B.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(w){if(w.altKey||w.ctrlKey||w.metaKey)return;let B=0,Q=0,ee=0,le=0,Fe=0;switch(w.keyCode){case 61:case 107:case 171:case 187:B=1;break;case 189:case 109:case 173:B=-1;break;case 37:w.shiftKey?Q=-1:(w.preventDefault(),le=-1);break;case 39:w.shiftKey?Q=1:(w.preventDefault(),le=1);break;case 38:w.shiftKey?ee=1:(w.preventDefault(),Fe=-1);break;case 40:w.shiftKey?ee=-1:(w.preventDefault(),Fe=1);break;default:return}return this._rotationDisabled&&(Q=0,ee=0),{cameraAnimation:Ze=>{let ut=this._tr;Ze.easeTo({duration:300,easeId:"keyboardHandler",easing:Er,zoom:B?Math.round(ut.zoom)+B*(w.shiftKey?2:1):ut.zoom,bearing:ut.bearing+Q*this._bearingStep,pitch:ut.pitch+ee*this._pitchStep,offset:[-le*this._panStep,-Fe*this._panStep],center:ut.center},{originalEvent:w})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Er(ue){return ue*(2-ue)}let xr=4.000244140625;class Kr{constructor(w,B){this._onTimeout=Q=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Q)},this._map=w,this._tr=new du(w),this._triggerRenderFrame=B,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(w){this._defaultZoomRate=w}setWheelZoomRate(w){this._wheelZoomRate=w}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(w){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!w&&w.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(w){return!!this._map.cooperativeGestures.isEnabled()&&!(w.ctrlKey||this._map.cooperativeGestures.isBypassed(w))}wheel(w){if(!this.isEnabled())return;if(this._shouldBePrevented(w))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",w);let B=w.deltaMode===WheelEvent.DOM_DELTA_LINE?40*w.deltaY:w.deltaY,Q=u.now(),ee=Q-(this._lastWheelEventTime||0);this._lastWheelEventTime=Q,B!==0&&B%xr==0?this._type="wheel":B!==0&&Math.abs(B)<4?this._type="trackpad":ee>400?(this._type=null,this._lastValue=B,this._timeout=setTimeout(this._onTimeout,40,w)):this._type||(this._type=Math.abs(ee*B)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,B+=this._lastValue)),w.shiftKey&&B&&(B/=4),this._type&&(this._lastWheelEvent=w,this._delta-=B,this._active||this._start(w)),w.preventDefault()}_start(w){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let B=c.mousePos(this._map.getCanvas(),w),Q=this._tr;this._around=B.y>Q.transform.height/2-Q.transform.getHorizon()?a.N.convert(this._aroundCenter?Q.center:Q.unproject(B)):a.N.convert(Q.center),this._aroundPoint=Q.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let w=this._tr.transform;if(this._delta!==0){let ut=this._type==="wheel"&&Math.abs(this._delta)>xr?this._wheelZoomRate:this._defaultZoomRate,Mt=2/(1+Math.exp(-Math.abs(this._delta*ut)));this._delta<0&&Mt!==0&&(Mt=1/Mt);let Jt=typeof this._targetZoom=="number"?w.zoomScale(this._targetZoom):w.scale;this._targetZoom=Math.min(w.maxZoom,Math.max(w.minZoom,w.scaleZoom(Jt*Mt))),this._type==="wheel"&&(this._startZoom=w.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let B=typeof this._targetZoom=="number"?this._targetZoom:w.zoom,Q=this._startZoom,ee=this._easing,le,Fe=!1,Ze=u.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Q&&ee&&Ze){let ut=Math.min(Ze/200,1),Mt=ee(ut);le=a.y.number(Q,B,Mt),ut<1?this._frameId||(this._frameId=!0):Fe=!0}else le=B,Fe=!0;return this._active=!0,Fe&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Fe,zoomDelta:le-w.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(w){let B=a.b9;if(this._prevEase){let Q=this._prevEase,ee=(u.now()-Q.start)/Q.duration,le=Q.easing(ee+.01)-Q.easing(ee),Fe=.27/Math.sqrt(le*le+1e-4)*.01,Ze=Math.sqrt(.0729-Fe*Fe);B=a.b8(Fe,Ze,.25,1)}return this._prevEase={start:u.now(),duration:w,easing:B},B}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Mi{constructor(w,B){this._clickZoom=w,this._tapZoom=B}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Wi{constructor(w){this._tr=new du(w),this.reset()}reset(){this._active=!1}dblclick(w,B){return w.preventDefault(),{cameraAnimation:Q=>{Q.easeTo({duration:300,zoom:this._tr.zoom+(w.shiftKey?-1:1),around:this._tr.unproject(B)},{originalEvent:w})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class dn{constructor(){this._tap=new wf({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(w,B,Q){if(!this._swipePoint)if(this._tapTime){let ee=B[0],le=w.timeStamp-this._tapTime<500,Fe=this._tapPoint.dist(ee)<30;le&&Fe?Q.length>0&&(this._swipePoint=ee,this._swipeTouch=Q[0].identifier):this.reset()}else this._tap.touchstart(w,B,Q)}touchmove(w,B,Q){if(this._tapTime){if(this._swipePoint){if(Q[0].identifier!==this._swipeTouch)return;let ee=B[0],le=ee.y-this._swipePoint.y;return this._swipePoint=ee,w.preventDefault(),this._active=!0,{zoomDelta:le/128}}}else this._tap.touchmove(w,B,Q)}touchend(w,B,Q){if(this._tapTime)this._swipePoint&&Q.length===0&&this.reset();else{let ee=this._tap.touchend(w,B,Q);ee&&(this._tapTime=w.timeStamp,this._tapPoint=ee)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class wn{constructor(w,B,Q){this._el=w,this._mousePan=B,this._touchPan=Q}enable(w){this._inertiaOptions=w||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class On{constructor(w,B,Q){this._pitchWithRotate=w.pitchWithRotate,this._mouseRotate=B,this._mousePitch=Q}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Yi{constructor(w,B,Q,ee){this._el=w,this._touchZoom=B,this._touchRotate=Q,this._tapDragZoom=ee,this._rotationDisabled=!1,this._enabled=!0}enable(w){this._touchZoom.enable(w),this._rotationDisabled||this._touchRotate.enable(w),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class $i{constructor(w,B){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=w,this._options=B,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let w=this._map.getCanvasContainer();w.classList.add("maplibregl-cooperative-gestures"),this._container=c.create("div","maplibregl-cooperative-gesture-screen",w);let B=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(B=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let Q=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),ee=document.createElement("div");ee.className="maplibregl-desktop-message",ee.textContent=B,this._container.appendChild(ee);let le=document.createElement("div");le.className="maplibregl-mobile-message",le.textContent=Q,this._container.appendChild(le),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(c.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(w){return w[this._bypassKey]}notifyGestureBlocked(w,B){this._enabled&&(this._map.fire(new a.k("cooperativegestureprevented",{gestureType:w,originalEvent:B})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let an=ue=>ue.zoom||ue.drag||ue.pitch||ue.rotate;class Fi extends a.k{}function ta(ue){return ue.panDelta&&ue.panDelta.mag()||ue.zoomDelta||ue.bearingDelta||ue.pitchDelta}class Ca{constructor(w,B){this.handleWindowEvent=ee=>{this.handleEvent(ee,`${ee.type}Window`)},this.handleEvent=(ee,le)=>{if(ee.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let Fe=ee.type==="renderFrame"?void 0:ee,Ze={needsRenderFrame:!1},ut={},Mt={},Jt=ee.touches,$t=Jt?this._getMapTouches(Jt):void 0,yr=$t?c.touchPos(this._map.getCanvas(),$t):c.mousePos(this._map.getCanvas(),ee);for(let{handlerName:xe,handler:Ie,allowed:ze}of this._handlers){if(!Ie.isEnabled())continue;let Qe;this._blockedByActive(Mt,ze,xe)?Ie.reset():Ie[le||ee.type]&&(Qe=Ie[le||ee.type](ee,yr,$t),this.mergeHandlerResult(Ze,ut,Qe,xe,Fe),Qe&&Qe.needsRenderFrame&&this._triggerRenderFrame()),(Qe||Ie.isActive())&&(Mt[xe]=Ie)}let Cr={};for(let xe in this._previousActiveHandlers)Mt[xe]||(Cr[xe]=Fe);this._previousActiveHandlers=Mt,(Object.keys(Cr).length||ta(Ze))&&(this._changes.push([Ze,ut,Cr]),this._triggerRenderFrame()),(Object.keys(Mt).length||ta(Ze))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:ve}=Ze;ve&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ve(this._map))},this._map=w,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Pf(w),this._bearingSnap=B.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(B);let Q=this._el;this._listeners=[[Q,"touchstart",{passive:!0}],[Q,"touchmove",{passive:!1}],[Q,"touchend",void 0],[Q,"touchcancel",void 0],[Q,"mousedown",void 0],[Q,"mousemove",void 0],[Q,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[Q,"mouseover",void 0],[Q,"mouseout",void 0],[Q,"dblclick",void 0],[Q,"click",void 0],[Q,"keydown",{capture:!1}],[Q,"keyup",void 0],[Q,"wheel",{passive:!1}],[Q,"contextmenu",void 0],[window,"blur",void 0]];for(let[ee,le,Fe]of this._listeners)c.addEventListener(ee,le,ee===document?this.handleWindowEvent:this.handleEvent,Fe)}destroy(){for(let[w,B,Q]of this._listeners)c.removeEventListener(w,B,w===document?this.handleWindowEvent:this.handleEvent,Q)}_addDefaultHandlers(w){let B=this._map,Q=B.getCanvasContainer();this._add("mapEvent",new If(B,w));let ee=B.boxZoom=new ku(B,w);this._add("boxZoom",ee),w.interactive&&w.boxZoom&&ee.enable();let le=B.cooperativeGestures=new $i(B,w.cooperativeGestures);this._add("cooperativeGestures",le),w.cooperativeGestures&&le.enable();let Fe=new zc(B),Ze=new Wi(B);B.doubleClickZoom=new Mi(Ze,Fe),this._add("tapZoom",Fe),this._add("clickZoom",Ze),w.interactive&&w.doubleClickZoom&&B.doubleClickZoom.enable();let ut=new dn;this._add("tapDragZoom",ut);let Mt=B.touchPitch=new Bc(B);this._add("touchPitch",Mt),w.interactive&&w.touchPitch&&B.touchPitch.enable(w.touchPitch);let Jt=Wl(w),$t=ah(w);B.dragRotate=new On(w,Jt,$t),this._add("mouseRotate",Jt,["mousePitch"]),this._add("mousePitch",$t,["mouseRotate"]),w.interactive&&w.dragRotate&&B.dragRotate.enable();let yr=(({enable:Qe,clickTolerance:Xe})=>{let nt=new Xu({checkCorrectEvent:qt=>c.mouseButton(qt)===0&&!qt.ctrlKey});return new Wu({clickTolerance:Xe,move:(qt,Wt)=>({around:Wt,panDelta:Wt.sub(qt)}),activateOnStart:!0,moveStateManager:nt,enable:Qe,assignEvents:Zf})})(w),Cr=new Zu(w,B);B.dragPan=new wn(Q,yr,Cr),this._add("mousePan",yr),this._add("touchPan",Cr,["touchZoom","touchRotate"]),w.interactive&&w.dragPan&&B.dragPan.enable(w.dragPan);let ve=new ff,xe=new vu;B.touchZoomRotate=new Yi(Q,xe,ve,ut),this._add("touchRotate",ve,["touchPan","touchZoom"]),this._add("touchZoom",xe,["touchPan","touchRotate"]),w.interactive&&w.touchZoomRotate&&B.touchZoomRotate.enable(w.touchZoomRotate);let Ie=B.scrollZoom=new Kr(B,()=>this._triggerRenderFrame());this._add("scrollZoom",Ie,["mousePan"]),w.interactive&&w.scrollZoom&&B.scrollZoom.enable(w.scrollZoom);let ze=B.keyboard=new Zt(B);this._add("keyboard",ze),w.interactive&&w.keyboard&&B.keyboard.enable(),this._add("blockableMapEvent",new Cs(B))}_add(w,B,Q){this._handlers.push({handlerName:w,handler:B,allowed:Q}),this._handlersById[w]=B}stop(w){if(!this._updatingCamera){for(let{handler:B}of this._handlers)B.reset();this._inertia.clear(),this._fireEvents({},{},w),this._changes=[]}}isActive(){for(let{handler:w}of this._handlers)if(w.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!an(this._eventsInProgress)||this.isZooming()}_blockedByActive(w,B,Q){for(let ee in w)if(ee!==Q&&(!B||B.indexOf(ee)<0))return!0;return!1}_getMapTouches(w){let B=[];for(let Q of w)this._el.contains(Q.target)&&B.push(Q);return B}mergeHandlerResult(w,B,Q,ee,le){if(!Q)return;a.e(w,Q);let Fe={handlerName:ee,originalEvent:Q.originalEvent||le};Q.zoomDelta!==void 0&&(B.zoom=Fe),Q.panDelta!==void 0&&(B.drag=Fe),Q.pitchDelta!==void 0&&(B.pitch=Fe),Q.bearingDelta!==void 0&&(B.rotate=Fe)}_applyChanges(){let w={},B={},Q={};for(let[ee,le,Fe]of this._changes)ee.panDelta&&(w.panDelta=(w.panDelta||new a.P(0,0))._add(ee.panDelta)),ee.zoomDelta&&(w.zoomDelta=(w.zoomDelta||0)+ee.zoomDelta),ee.bearingDelta&&(w.bearingDelta=(w.bearingDelta||0)+ee.bearingDelta),ee.pitchDelta&&(w.pitchDelta=(w.pitchDelta||0)+ee.pitchDelta),ee.around!==void 0&&(w.around=ee.around),ee.pinchAround!==void 0&&(w.pinchAround=ee.pinchAround),ee.noInertia&&(w.noInertia=ee.noInertia),a.e(B,le),a.e(Q,Fe);this._updateMapTransform(w,B,Q),this._changes=[]}_updateMapTransform(w,B,Q){let ee=this._map,le=ee._getTransformForUpdate(),Fe=ee.terrain;if(!(ta(w)||Fe&&this._terrainMovement))return this._fireEvents(B,Q,!0);let{panDelta:Ze,zoomDelta:ut,bearingDelta:Mt,pitchDelta:Jt,around:$t,pinchAround:yr}=w;yr!==void 0&&($t=yr),ee._stop(!0),$t=$t||ee.transform.centerPoint;let Cr=le.pointLocation(Ze?$t.sub(Ze):$t);Mt&&(le.bearing+=Mt),Jt&&(le.pitch+=Jt),ut&&(le.zoom+=ut),Fe?this._terrainMovement||!B.drag&&!B.zoom?B.drag&&this._terrainMovement?le.center=le.pointLocation(le.centerPoint.sub(Ze)):le.setLocationAtPoint(Cr,$t):(this._terrainMovement=!0,this._map._elevationFreeze=!0,le.setLocationAtPoint(Cr,$t)):le.setLocationAtPoint(Cr,$t),ee._applyUpdatedTransform(le),this._map._update(),w.noInertia||this._inertia.record(w),this._fireEvents(B,Q,!0)}_fireEvents(w,B,Q){let ee=an(this._eventsInProgress),le=an(w),Fe={};for(let $t in w){let{originalEvent:yr}=w[$t];this._eventsInProgress[$t]||(Fe[`${$t}start`]=yr),this._eventsInProgress[$t]=w[$t]}!ee&&le&&this._fireEvent("movestart",le.originalEvent);for(let $t in Fe)this._fireEvent($t,Fe[$t]);le&&this._fireEvent("move",le.originalEvent);for(let $t in w){let{originalEvent:yr}=w[$t];this._fireEvent($t,yr)}let Ze={},ut;for(let $t in this._eventsInProgress){let{handlerName:yr,originalEvent:Cr}=this._eventsInProgress[$t];this._handlersById[yr].isActive()||(delete this._eventsInProgress[$t],ut=B[yr]||Cr,Ze[`${$t}end`]=ut)}for(let $t in Ze)this._fireEvent($t,Ze[$t]);let Mt=an(this._eventsInProgress),Jt=(ee||le)&&!Mt;if(Jt&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let $t=this._map._getTransformForUpdate();$t.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform($t)}if(Q&&Jt){this._updatingCamera=!0;let $t=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),yr=Cr=>Cr!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Fi("renderFrame",{timeStamp:w})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Ra extends a.E{constructor(w,B){super(),this._renderFrameCallback=()=>{let Q=Math.min((u.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Q)),Q<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=w,this._bearingSnap=B.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new a.N(this.transform.center.lng,this.transform.center.lat)}setCenter(w,B){return this.jumpTo({center:w},B)}panBy(w,B,Q){return w=a.P.convert(w).mult(-1),this.panTo(this.transform.center,a.e({offset:w},B),Q)}panTo(w,B,Q){return this.easeTo(a.e({center:w},B),Q)}getZoom(){return this.transform.zoom}setZoom(w,B){return this.jumpTo({zoom:w},B),this}zoomTo(w,B,Q){return this.easeTo(a.e({zoom:w},B),Q)}zoomIn(w,B){return this.zoomTo(this.getZoom()+1,w,B),this}zoomOut(w,B){return this.zoomTo(this.getZoom()-1,w,B),this}getBearing(){return this.transform.bearing}setBearing(w,B){return this.jumpTo({bearing:w},B),this}getPadding(){return this.transform.padding}setPadding(w,B){return this.jumpTo({padding:w},B),this}rotateTo(w,B,Q){return this.easeTo(a.e({bearing:w},B),Q)}resetNorth(w,B){return this.rotateTo(0,a.e({duration:1e3},w),B),this}resetNorthPitch(w,B){return this.easeTo(a.e({bearing:0,pitch:0,duration:1e3},w),B),this}snapToNorth(w,B){return Math.abs(this.getBearing()){if(this._zooming&&(ee.zoom=a.y.number(le,Ie,nr)),this._rotating&&(ee.bearing=a.y.number(Fe,Mt,nr)),this._pitching&&(ee.pitch=a.y.number(Ze,Jt,nr)),this._padding&&(ee.interpolatePadding(ut,$t,nr),Cr=ee.centerPoint.add(yr)),this.terrain&&!w.freezeElevation&&this._updateElevation(nr),nt)ee.setLocationAtPoint(nt,qt);else{let fr=ee.zoomScale(ee.zoom-le),br=Ie>le?Math.min(2,Xe):Math.max(.5,Xe),Fr=Math.pow(br,1-nr),Hr=ee.unproject(ze.add(Qe.mult(nr*Fr)).mult(fr));ee.setLocationAtPoint(ee.renderWorldCopies?Hr.wrap():Hr,Cr)}this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},nr=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B,nr)},w),this}_prepareEase(w,B,Q={}){this._moving=!0,B||Q.moving||this.fire(new a.k("movestart",w)),this._zooming&&!Q.zooming&&this.fire(new a.k("zoomstart",w)),this._rotating&&!Q.rotating&&this.fire(new a.k("rotatestart",w)),this._pitching&&!Q.pitching&&this.fire(new a.k("pitchstart",w))}_prepareElevation(w){this._elevationCenter=w,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(w,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(w){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let B=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(w<1&&B!==this._elevationTarget){let Q=this._elevationTarget-this._elevationStart;this._elevationStart+=w*(Q-(B-(Q*w+this._elevationStart))/(1-w)),this._elevationTarget=B}this.transform.elevation=a.y.number(this._elevationStart,this._elevationTarget,w)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(w){let B=w.getCameraPosition(),Q=this.terrain.getElevationForLngLatZoom(B.lngLat,w.zoom);if(B.altitudethis._elevateCameraIfInsideTerrain(ee)),this.transformCameraUpdate&&B.push(ee=>this.transformCameraUpdate(ee)),!B.length)return;let Q=w.clone();for(let ee of B){let le=Q.clone(),{center:Fe,zoom:Ze,pitch:ut,bearing:Mt,elevation:Jt}=ee(le);Fe&&(le.center=Fe),Ze!==void 0&&(le.zoom=Ze),ut!==void 0&&(le.pitch=ut),Mt!==void 0&&(le.bearing=Mt),Jt!==void 0&&(le.elevation=Jt),Q.apply(le)}this.transform.apply(Q)}_fireMoveEvents(w){this.fire(new a.k("move",w)),this._zooming&&this.fire(new a.k("zoom",w)),this._rotating&&this.fire(new a.k("rotate",w)),this._pitching&&this.fire(new a.k("pitch",w))}_afterEase(w,B){if(this._easeId&&B&&this._easeId===B)return;delete this._easeId;let Q=this._zooming,ee=this._rotating,le=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Q&&this.fire(new a.k("zoomend",w)),ee&&this.fire(new a.k("rotateend",w)),le&&this.fire(new a.k("pitchend",w)),this.fire(new a.k("moveend",w))}flyTo(w,B){var Q;if(!w.essential&&u.prefersReducedMotion){let Ln=a.M(w,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Ln,B)}this.stop(),w=a.e({offset:[0,0],speed:1.2,curve:1.42,easing:a.b9},w);let ee=this._getTransformForUpdate(),le=ee.zoom,Fe=ee.bearing,Ze=ee.pitch,ut=ee.padding,Mt="bearing"in w?this._normalizeBearing(w.bearing,Fe):Fe,Jt="pitch"in w?+w.pitch:Ze,$t="padding"in w?w.padding:ee.padding,yr=a.P.convert(w.offset),Cr=ee.centerPoint.add(yr),ve=ee.pointLocation(Cr),{center:xe,zoom:Ie}=ee.getConstrained(a.N.convert(w.center||ve),(Q=w.zoom)!==null&&Q!==void 0?Q:le);this._normalizeCenter(xe,ee);let ze=ee.zoomScale(Ie-le),Qe=ee.project(ve),Xe=ee.project(xe).sub(Qe),nt=w.curve,qt=Math.max(ee.width,ee.height),Wt=qt/ze,nr=Xe.mag();if("minZoom"in w){let Ln=a.ac(Math.min(w.minZoom,le,Ie),ee.minZoom,ee.maxZoom),Yn=qt/ee.zoomScale(Ln-le);nt=Math.sqrt(Yn/nr*2)}let fr=nt*nt;function br(Ln){let Yn=(Wt*Wt-qt*qt+(Ln?-1:1)*fr*fr*nr*nr)/(2*(Ln?Wt:qt)*fr*nr);return Math.log(Math.sqrt(Yn*Yn+1)-Yn)}function Fr(Ln){return(Math.exp(Ln)-Math.exp(-Ln))/2}function Hr(Ln){return(Math.exp(Ln)+Math.exp(-Ln))/2}let ri=br(!1),Ci=function(Ln){return Hr(ri)/Hr(ri+nt*Ln)},cn=function(Ln){return qt*((Hr(ri)*(Fr(Yn=ri+nt*Ln)/Hr(Yn))-Fr(ri))/fr)/nr;var Yn},sn=(br(!0)-ri)/nt;if(Math.abs(nr)<1e-6||!isFinite(sn)){if(Math.abs(qt-Wt)<1e-6)return this.easeTo(w,B);let Ln=Wt0,Ci=Yn=>Math.exp(Ln*nt*Yn)}return w.duration="duration"in w?+w.duration:1e3*sn/("screenSpeed"in w?+w.screenSpeed/nt:+w.speed),w.maxDuration&&w.duration>w.maxDuration&&(w.duration=0),this._zooming=!0,this._rotating=Fe!==Mt,this._pitching=Jt!==Ze,this._padding=!ee.isPaddingEqual($t),this._prepareEase(B,!1),this.terrain&&this._prepareElevation(xe),this._ease(Ln=>{let Yn=Ln*sn,Aa=1/Ci(Yn);ee.zoom=Ln===1?Ie:le+ee.scaleZoom(Aa),this._rotating&&(ee.bearing=a.y.number(Fe,Mt,Ln)),this._pitching&&(ee.pitch=a.y.number(Ze,Jt,Ln)),this._padding&&(ee.interpolatePadding(ut,$t,Ln),Cr=ee.centerPoint.add(yr)),this.terrain&&!w.freezeElevation&&this._updateElevation(Ln);let fa=Ln===1?xe:ee.unproject(Qe.add(Xe.mult(cn(Yn))).mult(Aa));ee.setLocationAtPoint(ee.renderWorldCopies?fa.wrap():fa,Cr),this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},()=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B)},w),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(w,B){var Q;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let ee=this._onEaseEnd;delete this._onEaseEnd,ee.call(this,B)}return w||(Q=this.handlers)===null||Q===void 0||Q.stop(!1),this}_ease(w,B,Q){Q.animate===!1||Q.duration===0?(w(1),B()):(this._easeStart=u.now(),this._easeOptions=Q,this._onEaseFrame=w,this._onEaseEnd=B,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(w,B){w=a.b3(w,-180,180);let Q=Math.abs(w-B);return Math.abs(w-360-B)180?-360:Q<-180?360:0}queryTerrainElevation(w){return this.terrain?this.terrain.getElevationForLngLatZoom(a.N.convert(w),this.transform.tileZoom)-this.transform.elevation:null}}let La={compact:!0,customAttribution:'MapLibre'};class Ua{constructor(w=La){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=B=>{!B||B.sourceDataType!=="metadata"&&B.sourceDataType!=="visibility"&&B.dataType!=="style"&&B.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=w}getDefaultPosition(){return"bottom-right"}onAdd(w){return this._map=w,this._compact=this.options.compact,this._container=c.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=c.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=c.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){c.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(w,B){let Q=this._map._getUIString(`AttributionControl.${B}`);w.title=Q,w.setAttribute("aria-label",Q)}_updateAttributions(){if(!this._map.style)return;let w=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?w=w.concat(this.options.customAttribution.map(ee=>typeof ee!="string"?"":ee)):typeof this.options.customAttribution=="string"&&w.push(this.options.customAttribution)),this._map.style.stylesheet){let ee=this._map.style.stylesheet;this.styleOwner=ee.owner,this.styleId=ee.id}let B=this._map.style.sourceCaches;for(let ee in B){let le=B[ee];if(le.used||le.usedForTerrain){let Fe=le.getSource();Fe.attribution&&w.indexOf(Fe.attribution)<0&&w.push(Fe.attribution)}}w=w.filter(ee=>String(ee).trim()),w.sort((ee,le)=>ee.length-le.length),w=w.filter((ee,le)=>{for(let Fe=le+1;Fe=0)return!1;return!0});let Q=w.join(" | ");Q!==this._attribHTML&&(this._attribHTML=Q,w.length?(this._innerContainer.innerHTML=Q,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Zn{constructor(w={}){this._updateCompact=()=>{let B=this._container.children;if(B.length){let Q=B[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Q.classList.add("maplibregl-compact"):Q.classList.remove("maplibregl-compact")}},this.options=w}getDefaultPosition(){return"bottom-left"}onAdd(w){this._map=w,this._compact=this.options&&this.options.compact,this._container=c.create("div","maplibregl-ctrl");let B=c.create("a","maplibregl-ctrl-logo");return B.target="_blank",B.rel="noopener nofollow",B.href="https://maplibre.org/",B.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),B.setAttribute("rel","noopener nofollow"),this._container.appendChild(B),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){c.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Dn{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(w){let B=++this._id;return this._queue.push({callback:w,id:B,cancelled:!1}),B}remove(w){let B=this._currentlyRunning,Q=B?this._queue.concat(B):this._queue;for(let ee of Q)if(ee.id===w)return void(ee.cancelled=!0)}run(w=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let B=this._currentlyRunning=this._queue;this._queue=[];for(let Q of B)if(!Q.cancelled&&(Q.callback(w),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ka=a.Y([{name:"a_pos3d",type:"Int16",components:3}]);class bo extends a.E{constructor(w){super(),this.sourceCache=w,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,w.usedForTerrain=!0,w.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(w,B){this.sourceCache.update(w,B),this._renderableTilesKeys=[];let Q={};for(let ee of w.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:B}))Q[ee.key]=!0,this._renderableTilesKeys.push(ee.key),this._tiles[ee.key]||(ee.posMatrix=new Float64Array(16),a.aP(ee.posMatrix,0,a.X,0,a.X,0,1),this._tiles[ee.key]=new Tt(ee,this.tileSize));for(let ee in this._tiles)Q[ee]||delete this._tiles[ee]}freeRtt(w){for(let B in this._tiles){let Q=this._tiles[B];(!w||Q.tileID.equals(w)||Q.tileID.isChildOf(w)||w.isChildOf(Q.tileID))&&(Q.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(w=>this.getTileByID(w))}getTileByID(w){return this._tiles[w]}getTerrainCoords(w){let B={};for(let Q of this._renderableTilesKeys){let ee=this._tiles[Q].tileID;if(ee.canonical.equals(w.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16),a.aP(le.posMatrix,0,a.X,0,a.X,0,1),B[Q]=le}else if(ee.canonical.isChildOf(w.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16);let Fe=ee.canonical.z-w.canonical.z,Ze=ee.canonical.x-(ee.canonical.x>>Fe<>Fe<>Fe;a.aP(le.posMatrix,0,Mt,0,Mt,0,1),a.J(le.posMatrix,le.posMatrix,[-Ze*Mt,-ut*Mt,0]),B[Q]=le}else if(w.canonical.isChildOf(ee.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16);let Fe=w.canonical.z-ee.canonical.z,Ze=w.canonical.x-(w.canonical.x>>Fe<>Fe<>Fe;a.aP(le.posMatrix,0,a.X,0,a.X,0,1),a.J(le.posMatrix,le.posMatrix,[Ze*Mt,ut*Mt,0]),a.K(le.posMatrix,le.posMatrix,[1/2**Fe,1/2**Fe,0]),B[Q]=le}}return B}getSourceTile(w,B){let Q=this.sourceCache._source,ee=w.overscaledZ-this.deltaZoom;if(ee>Q.maxzoom&&(ee=Q.maxzoom),ee=Q.minzoom&&(!le||!le.dem);)le=this.sourceCache.getTileByID(w.scaledTo(ee--).key);return le}tilesAfterTime(w=Date.now()){return Object.values(this._tiles).filter(B=>B.timeAdded>=w)}}class Zo{constructor(w,B,Q){this.painter=w,this.sourceCache=new bo(B),this.options=Q,this.exaggeration=typeof Q.exaggeration=="number"?Q.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(w,B,Q,ee=a.X){var le;if(!(B>=0&&B=0&&Qw.canonical.z&&(w.canonical.z>=ee?le=w.canonical.z-ee:a.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Fe=w.canonical.x-(w.canonical.x>>le<>le<>8<<4|le>>8,B[Fe+3]=0;let Q=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(B.buffer)),ee=new g(w,Q,w.gl.RGBA,{premultiply:!1});return ee.bind(w.gl.NEAREST,w.gl.CLAMP_TO_EDGE),this._coordsTexture=ee,ee}pointCoordinate(w){this.painter.maybeDrawDepthAndCoords(!0);let B=new Uint8Array(4),Q=this.painter.context,ee=Q.gl,le=Math.round(w.x*this.painter.pixelRatio/devicePixelRatio),Fe=Math.round(w.y*this.painter.pixelRatio/devicePixelRatio),Ze=Math.round(this.painter.height/devicePixelRatio);Q.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),ee.readPixels(le,Ze-Fe-1,1,1,ee.RGBA,ee.UNSIGNED_BYTE,B),Q.bindFramebuffer.set(null);let ut=B[0]+(B[2]>>4<<8),Mt=B[1]+((15&B[2])<<8),Jt=this.coordsIndex[255-B[3]],$t=Jt&&this.sourceCache.getTileByID(Jt);if(!$t)return null;let yr=this._coordsTextureSize,Cr=(1<<$t.tileID.canonical.z)*yr;return new a.Z(($t.tileID.canonical.x*yr+ut)/Cr+$t.tileID.wrap,($t.tileID.canonical.y*yr+Mt)/Cr,this.getElevation($t.tileID,ut,Mt,yr))}depthAtPoint(w){let B=new Uint8Array(4),Q=this.painter.context,ee=Q.gl;return Q.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),ee.readPixels(w.x,this.painter.height/devicePixelRatio-w.y-1,1,1,ee.RGBA,ee.UNSIGNED_BYTE,B),Q.bindFramebuffer.set(null),(B[0]/16777216+B[1]/65536+B[2]/256+B[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;let w=this.painter.context,B=new a.bd,Q=new a.aY,ee=this.meshSize,le=a.X/ee,Fe=ee*ee;for(let $t=0;$t<=ee;$t++)for(let yr=0;yr<=ee;yr++)B.emplaceBack(yr*le,$t*le,0);for(let $t=0;$tw.id!==B),this._recentlyUsed.push(w.id)}stampObject(w){w.stamp=++this._stamp}getOrCreateFreeObject(){for(let B of this._recentlyUsed)if(!this._objects[B].inUse)return this._objects[B];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let w=this._createObject(this._objects.length);return this._objects.push(w),w}freeObject(w){w.inUse=!1}freeAllObjects(){for(let w of this._objects)this.freeObject(w)}isFull(){return!(this._objects.length!w.inUse)===!1}}let as={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class ws{constructor(w,B){this.painter=w,this.terrain=B,this.pool=new Ss(w.context,30,B.sourceCache.tileSize*B.qualityFactor)}destruct(){this.pool.destruct()}getTexture(w){return this.pool.getObjectForId(w.rtt[this._stacks.length-1].id).texture}prepareForRender(w,B){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=w._order.filter(Q=>!w._layers[Q].isHidden(B)),this._coordsDescendingInv={};for(let Q in w.sourceCaches){this._coordsDescendingInv[Q]={};let ee=w.sourceCaches[Q].getVisibleCoordinates();for(let le of ee){let Fe=this.terrain.sourceCache.getTerrainCoords(le);for(let Ze in Fe)this._coordsDescendingInv[Q][Ze]||(this._coordsDescendingInv[Q][Ze]=[]),this._coordsDescendingInv[Q][Ze].push(Fe[Ze])}}this._coordsDescendingInvStr={};for(let Q of w._order){let ee=w._layers[Q],le=ee.source;if(as[ee.type]&&!this._coordsDescendingInvStr[le]){this._coordsDescendingInvStr[le]={};for(let Fe in this._coordsDescendingInv[le])this._coordsDescendingInvStr[le][Fe]=this._coordsDescendingInv[le][Fe].map(Ze=>Ze.key).sort().join()}}for(let Q of this._renderableTiles)for(let ee in this._coordsDescendingInvStr){let le=this._coordsDescendingInvStr[ee][Q.tileID.key];le&&le!==Q.rttCoords[ee]&&(Q.rtt=[])}}renderLayer(w){if(w.isHidden(this.painter.transform.zoom))return!1;let B=w.type,Q=this.painter,ee=this._renderableLayerIds[this._renderableLayerIds.length-1]===w.id;if(as[B]&&(this._prevType&&as[this._prevType]||this._stacks.push([]),this._prevType=B,this._stacks[this._stacks.length-1].push(w.id),!ee))return!0;if(as[this._prevType]||as[B]&&ee){this._prevType=B;let le=this._stacks.length-1,Fe=this._stacks[le]||[];for(let Ze of this._renderableTiles){if(this.pool.isFull()&&(js(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Ze),Ze.rtt[le]){let Mt=this.pool.getObjectForId(Ze.rtt[le].id);if(Mt.stamp===Ze.rtt[le].stamp){this.pool.useObject(Mt);continue}}let ut=this.pool.getOrCreateFreeObject();this.pool.useObject(ut),this.pool.stampObject(ut),Ze.rtt[le]={id:ut.id,stamp:ut.stamp},Q.context.bindFramebuffer.set(ut.fbo.framebuffer),Q.context.clear({color:a.aM.transparent,stencil:0}),Q.currentStencilSource=void 0;for(let Mt=0;Mt{ue.touchstart=ue.dragStart,ue.touchmoveWindow=ue.dragMove,ue.touchend=ue.dragEnd},va={showCompass:!0,showZoom:!0,visualizePitch:!1};class no{constructor(w,B,Q=!1){this.mousedown=Fe=>{this.startMouse(a.e({},Fe,{ctrlKey:!0,preventDefault:()=>Fe.preventDefault()}),c.mousePos(this.element,Fe)),c.addEventListener(window,"mousemove",this.mousemove),c.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=Fe=>{this.moveMouse(Fe,c.mousePos(this.element,Fe))},this.mouseup=Fe=>{this.mouseRotate.dragEnd(Fe),this.mousePitch&&this.mousePitch.dragEnd(Fe),this.offTemp()},this.touchstart=Fe=>{Fe.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=c.touchPos(this.element,Fe.targetTouches)[0],this.startTouch(Fe,this._startPos),c.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.addEventListener(window,"touchend",this.touchend))},this.touchmove=Fe=>{Fe.targetTouches.length!==1?this.reset():(this._lastPos=c.touchPos(this.element,Fe.targetTouches)[0],this.moveTouch(Fe,this._lastPos))},this.touchend=Fe=>{Fe.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let ee=w.dragRotate._mouseRotate.getClickTolerance(),le=w.dragRotate._mousePitch.getClickTolerance();this.element=B,this.mouseRotate=Wl({clickTolerance:ee,enable:!0}),this.touchRotate=(({enable:Fe,clickTolerance:Ze,bearingDegreesPerPixelMoved:ut=.8})=>{let Mt=new cf;return new Wu({clickTolerance:Ze,move:(Jt,$t)=>({bearingDelta:($t.x-Jt.x)*ut}),moveStateManager:Mt,enable:Fe,assignEvents:Ls})})({clickTolerance:ee,enable:!0}),this.map=w,Q&&(this.mousePitch=ah({clickTolerance:le,enable:!0}),this.touchPitch=(({enable:Fe,clickTolerance:Ze,pitchDegreesPerPixelMoved:ut=-.5})=>{let Mt=new cf;return new Wu({clickTolerance:Ze,move:(Jt,$t)=>({pitchDelta:($t.y-Jt.y)*ut}),moveStateManager:Mt,enable:Fe,assignEvents:Ls})})({clickTolerance:le,enable:!0})),c.addEventListener(B,"mousedown",this.mousedown),c.addEventListener(B,"touchstart",this.touchstart,{passive:!1}),c.addEventListener(B,"touchcancel",this.reset)}startMouse(w,B){this.mouseRotate.dragStart(w,B),this.mousePitch&&this.mousePitch.dragStart(w,B),c.disableDrag()}startTouch(w,B){this.touchRotate.dragStart(w,B),this.touchPitch&&this.touchPitch.dragStart(w,B),c.disableDrag()}moveMouse(w,B){let Q=this.map,{bearingDelta:ee}=this.mouseRotate.dragMove(w,B)||{};if(ee&&Q.setBearing(Q.getBearing()+ee),this.mousePitch){let{pitchDelta:le}=this.mousePitch.dragMove(w,B)||{};le&&Q.setPitch(Q.getPitch()+le)}}moveTouch(w,B){let Q=this.map,{bearingDelta:ee}=this.touchRotate.dragMove(w,B)||{};if(ee&&Q.setBearing(Q.getBearing()+ee),this.touchPitch){let{pitchDelta:le}=this.touchPitch.dragMove(w,B)||{};le&&Q.setPitch(Q.getPitch()+le)}}off(){let w=this.element;c.removeEventListener(w,"mousedown",this.mousedown),c.removeEventListener(w,"touchstart",this.touchstart,{passive:!1}),c.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.removeEventListener(window,"touchend",this.touchend),c.removeEventListener(w,"touchcancel",this.reset),this.offTemp()}offTemp(){c.enableDrag(),c.removeEventListener(window,"mousemove",this.mousemove),c.removeEventListener(window,"mouseup",this.mouseup),c.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.removeEventListener(window,"touchend",this.touchend)}}let ys;function rs(ue,w,B){let Q=new a.N(ue.lng,ue.lat);if(ue=new a.N(ue.lng,ue.lat),w){let ee=new a.N(ue.lng-360,ue.lat),le=new a.N(ue.lng+360,ue.lat),Fe=B.locationPoint(ue).distSqr(w);B.locationPoint(ee).distSqr(w)180;){let ee=B.locationPoint(ue);if(ee.x>=0&&ee.y>=0&&ee.x<=B.width&&ee.y<=B.height)break;ue.lng>B.center.lng?ue.lng-=360:ue.lng+=360}return ue.lng!==Q.lng&&B.locationPoint(ue).y>B.height/2-B.getHorizon()?ue:Q}let Ql={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 Cu(ue,w,B){let Q=ue.classList;for(let ee in Ql)Q.remove(`maplibregl-${B}-anchor-${ee}`);Q.add(`maplibregl-${B}-anchor-${w}`)}class Yu extends a.E{constructor(w){if(super(),this._onKeyPress=B=>{let Q=B.code,ee=B.charCode||B.keyCode;Q!=="Space"&&Q!=="Enter"&&ee!==32&&ee!==13||this.togglePopup()},this._onMapClick=B=>{let Q=B.originalEvent.target,ee=this._element;this._popup&&(Q===ee||ee.contains(Q))&&this.togglePopup()},this._update=B=>{var Q;if(!this._map)return;let ee=this._map.loaded()&&!this._map.isMoving();((B==null?void 0:B.type)==="terrain"||(B==null?void 0:B.type)==="render"&&!ee)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?rs(this._lngLat,this._flatPos,this._map.transform):(Q=this._lngLat)===null||Q===void 0?void 0:Q.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let le="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?le=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(le=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let Fe="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?Fe="rotateX(0deg)":this._pitchAlignment==="map"&&(Fe=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||B&&B.type!=="moveend"||(this._pos=this._pos.round()),c.setTransform(this._element,`${Ql[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${Fe} ${le}`),u.frameAsync(new AbortController).then(()=>{this._updateOpacity(B&&B.type==="moveend")}).catch(()=>{})},this._onMove=B=>{if(!this._isDragging){let Q=this._clickTolerance||this._map._clickTolerance;this._isDragging=B.point.dist(this._pointerdownPos)>=Q}this._isDragging&&(this._pos=B.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 a.k("dragstart"))),this.fire(new a.k("drag")))},this._onUp=()=>{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 a.k("dragend")),this._state="inactive"},this._addDragHandler=B=>{this._element.contains(B.originalEvent.target)&&(B.preventDefault(),this._positionDelta=B.point.sub(this._pos).add(this._offset),this._pointerdownPos=B.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))},this._anchor=w&&w.anchor||"center",this._color=w&&w.color||"#3FB1CE",this._scale=w&&w.scale||1,this._draggable=w&&w.draggable||!1,this._clickTolerance=w&&w.clickTolerance||0,this._subpixelPositioning=w&&w.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=w&&w.rotation||0,this._rotationAlignment=w&&w.rotationAlignment||"auto",this._pitchAlignment=w&&w.pitchAlignment&&w.pitchAlignment!=="auto"?w.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(w==null?void 0:w.opacity,w==null?void 0:w.opacityWhenCovered),w&&w.element)this._element=w.element,this._offset=a.P.convert(w&&w.offset||[0,0]);else{this._defaultMarker=!0,this._element=c.create("div");let B=c.createNS("http://www.w3.org/2000/svg","svg"),Q=41,ee=27;B.setAttributeNS(null,"display","block"),B.setAttributeNS(null,"height",`${Q}px`),B.setAttributeNS(null,"width",`${ee}px`),B.setAttributeNS(null,"viewBox",`0 0 ${ee} ${Q}`);let le=c.createNS("http://www.w3.org/2000/svg","g");le.setAttributeNS(null,"stroke","none"),le.setAttributeNS(null,"stroke-width","1"),le.setAttributeNS(null,"fill","none"),le.setAttributeNS(null,"fill-rule","evenodd");let Fe=c.createNS("http://www.w3.org/2000/svg","g");Fe.setAttributeNS(null,"fill-rule","nonzero");let Ze=c.createNS("http://www.w3.org/2000/svg","g");Ze.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Ze.setAttributeNS(null,"fill","#000000");let ut=[{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"}];for(let ze of ut){let Qe=c.createNS("http://www.w3.org/2000/svg","ellipse");Qe.setAttributeNS(null,"opacity","0.04"),Qe.setAttributeNS(null,"cx","10.5"),Qe.setAttributeNS(null,"cy","5.80029008"),Qe.setAttributeNS(null,"rx",ze.rx),Qe.setAttributeNS(null,"ry",ze.ry),Ze.appendChild(Qe)}let Mt=c.createNS("http://www.w3.org/2000/svg","g");Mt.setAttributeNS(null,"fill",this._color);let Jt=c.createNS("http://www.w3.org/2000/svg","path");Jt.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Mt.appendChild(Jt);let $t=c.createNS("http://www.w3.org/2000/svg","g");$t.setAttributeNS(null,"opacity","0.25"),$t.setAttributeNS(null,"fill","#000000");let yr=c.createNS("http://www.w3.org/2000/svg","path");yr.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),$t.appendChild(yr);let Cr=c.createNS("http://www.w3.org/2000/svg","g");Cr.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Cr.setAttributeNS(null,"fill","#FFFFFF");let ve=c.createNS("http://www.w3.org/2000/svg","g");ve.setAttributeNS(null,"transform","translate(8.0, 8.0)");let xe=c.createNS("http://www.w3.org/2000/svg","circle");xe.setAttributeNS(null,"fill","#000000"),xe.setAttributeNS(null,"opacity","0.25"),xe.setAttributeNS(null,"cx","5.5"),xe.setAttributeNS(null,"cy","5.5"),xe.setAttributeNS(null,"r","5.4999962");let Ie=c.createNS("http://www.w3.org/2000/svg","circle");Ie.setAttributeNS(null,"fill","#FFFFFF"),Ie.setAttributeNS(null,"cx","5.5"),Ie.setAttributeNS(null,"cy","5.5"),Ie.setAttributeNS(null,"r","5.4999962"),ve.appendChild(xe),ve.appendChild(Ie),Fe.appendChild(Ze),Fe.appendChild(Mt),Fe.appendChild($t),Fe.appendChild(Cr),Fe.appendChild(ve),B.appendChild(Fe),B.setAttributeNS(null,"height",Q*this._scale+"px"),B.setAttributeNS(null,"width",ee*this._scale+"px"),this._element.appendChild(B),this._offset=a.P.convert(w&&w.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",B=>{B.preventDefault()}),this._element.addEventListener("mousedown",B=>{B.preventDefault()}),Cu(this._element,this._anchor,"marker"),w&&w.className)for(let B of w.className.split(" "))this._element.classList.add(B);this._popup=null}addTo(w){return this.remove(),this._map=w,this._element.setAttribute("aria-label",w._getUIString("Marker.Title")),w.getCanvasContainer().appendChild(this._element),w.on("move",this._update),w.on("moveend",this._update),w.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),c.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(w){return this._lngLat=a.N.convert(w),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(w){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),w){if(!("offset"in w.options)){let ee=Math.abs(13.5)/Math.SQRT2;w.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[ee,-1*(38.1-13.5+ee)],"bottom-right":[-ee,-1*(38.1-13.5+ee)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=w,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(w){return this._subpixelPositioning=w,this}getPopup(){return this._popup}togglePopup(){let w=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:w?(w.isOpen()?w.remove():(w.setLngLat(this._lngLat),w.addTo(this._map)),this):this}_updateOpacity(w=!1){var B,Q;if(!(!((B=this._map)===null||B===void 0)&&B.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(w)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let ee=this._map,le=ee.terrain.depthAtPoint(this._pos),Fe=ee.terrain.getElevationForLngLatZoom(this._lngLat,ee.transform.tileZoom);if(ee.transform.lngLatToCameraDepth(this._lngLat,Fe)-le<.006)return void(this._element.style.opacity=this._opacity);let Ze=-this._offset.y/ee.transform._pixelPerMeter,ut=Math.sin(ee.getPitch()*Math.PI/180)*Ze,Mt=ee.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),Jt=ee.transform.lngLatToCameraDepth(this._lngLat,Fe+ut)-Mt>.006;!((Q=this._popup)===null||Q===void 0)&&Q.isOpen()&&Jt&&this._popup.remove(),this._element.style.opacity=Jt?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(w){return this._offset=a.P.convert(w),this._update(),this}addClassName(w){this._element.classList.add(w)}removeClassName(w){this._element.classList.remove(w)}toggleClassName(w){return this._element.classList.toggle(w)}setDraggable(w){return this._draggable=!!w,this._map&&(w?(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}isDraggable(){return this._draggable}setRotation(w){return this._rotation=w||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(w){return this._rotationAlignment=w||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(w){return this._pitchAlignment=w&&w!=="auto"?w:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(w,B){return w===void 0&&B===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),w!==void 0&&(this._opacity=w),B!==void 0&&(this._opacityWhenCovered=B),this._map&&this._updateOpacity(!0),this}}let Nc={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},pu=0,Uc=!1,xu={maxWidth:100,unit:"metric"};function Ac(ue,w,B){let Q=B&&B.maxWidth||100,ee=ue._container.clientHeight/2,le=ue.unproject([0,ee]),Fe=ue.unproject([Q,ee]),Ze=le.distanceTo(Fe);if(B&&B.unit==="imperial"){let ut=3.2808*Ze;ut>5280?Va(w,Q,ut/5280,ue._getUIString("ScaleControl.Miles")):Va(w,Q,ut,ue._getUIString("ScaleControl.Feet"))}else B&&B.unit==="nautical"?Va(w,Q,Ze/1852,ue._getUIString("ScaleControl.NauticalMiles")):Ze>=1e3?Va(w,Q,Ze/1e3,ue._getUIString("ScaleControl.Kilometers")):Va(w,Q,Ze,ue._getUIString("ScaleControl.Meters"))}function Va(ue,w,B,Q){let ee=function(le){let Fe=Math.pow(10,`${Math.floor(le)}`.length-1),Ze=le/Fe;return Ze=Ze>=10?10:Ze>=5?5:Ze>=3?3:Ze>=2?2:Ze>=1?1:function(ut){let Mt=Math.pow(10,Math.ceil(-Math.log(ut)/Math.LN10));return Math.round(ut*Mt)/Mt}(Ze),Fe*Ze}(B);ue.style.width=w*(ee/B)+"px",ue.innerHTML=`${ee} ${Q}`}let oo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Vc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function hc(ue){if(ue){if(typeof ue=="number"){let w=Math.round(Math.abs(ue)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,ue),"top-left":new a.P(w,w),"top-right":new a.P(-w,w),bottom:new a.P(0,-ue),"bottom-left":new a.P(w,-w),"bottom-right":new a.P(-w,-w),left:new a.P(ue,0),right:new a.P(-ue,0)}}if(ue instanceof a.P||Array.isArray(ue)){let w=a.P.convert(ue);return{center:w,top:w,"top-left":w,"top-right":w,bottom:w,"bottom-left":w,"bottom-right":w,left:w,right:w}}return{center:a.P.convert(ue.center||[0,0]),top:a.P.convert(ue.top||[0,0]),"top-left":a.P.convert(ue["top-left"]||[0,0]),"top-right":a.P.convert(ue["top-right"]||[0,0]),bottom:a.P.convert(ue.bottom||[0,0]),"bottom-left":a.P.convert(ue["bottom-left"]||[0,0]),"bottom-right":a.P.convert(ue["bottom-right"]||[0,0]),left:a.P.convert(ue.left||[0,0]),right:a.P.convert(ue.right||[0,0])}}return hc(new a.P(0,0))}let Ku=o;i.AJAXError=a.bh,i.Evented=a.E,i.LngLat=a.N,i.MercatorCoordinate=a.Z,i.Point=a.P,i.addProtocol=a.bi,i.config=a.a,i.removeProtocol=a.bj,i.AttributionControl=Ua,i.BoxZoomHandler=ku,i.CanvasSource=rr,i.CooperativeGesturesHandler=$i,i.DoubleClickZoomHandler=Mi,i.DragPanHandler=wn,i.DragRotateHandler=On,i.EdgeInsets=hu,i.FullscreenControl=class extends a.E{constructor(ue={}){super(),this._onFullscreenChange=()=>{var w;let B=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((w=B==null?void 0:B.shadowRoot)===null||w===void 0)&&w.fullscreenElement;)B=B.shadowRoot.fullscreenElement;B===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,ue&&ue.container&&(ue.container instanceof HTMLElement?this._container=ue.container:a.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(ue){return this._map=ue,this._container||(this._container=this._map.getContainer()),this._controlContainer=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){c.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let ue=this._fullscreenButton=c.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);c.create("span","maplibregl-ctrl-icon",ue).setAttribute("aria-hidden","true"),ue.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let ue=this._getTitle();this._fullscreenButton.setAttribute("aria-label",ue),this._fullscreenButton.title=ue}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new a.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new a.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},i.GeoJSONSource=at,i.GeolocateControl=class extends a.E{constructor(ue){super(),this._onSuccess=w=>{if(this._map){if(this._isOutOfMapMaxBounds(w))return this._setErrorState(),this.fire(new a.k("outofmaxbounds",w)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=w,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(w),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(w),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new a.k("geolocate",w)),this._finish()}},this._updateCamera=w=>{let B=new a.N(w.coords.longitude,w.coords.latitude),Q=w.coords.accuracy,ee=this._map.getBearing(),le=a.e({bearing:ee},this.options.fitBoundsOptions),Fe=ce.fromLngLat(B,Q);this._map.fitBounds(Fe,le,{geolocateSource:!0})},this._updateMarker=w=>{if(w){let B=new a.N(w.coords.longitude,w.coords.latitude);this._accuracyCircleMarker.setLngLat(B).addTo(this._map),this._userLocationDotMarker.setLngLat(B).addTo(this._map),this._accuracy=w.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=w=>{if(this._map){if(this.options.trackUserLocation)if(w.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let B=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=B,this._geolocateButton.setAttribute("aria-label",B),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(w.code===3&&Uc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new a.k("error",w)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",w=>w.preventDefault()),this._geolocateButton=c.create("button","maplibregl-ctrl-geolocate",this._container),c.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=w=>{if(this._map){if(w===!1){a.w("Geolocation support is not available so the GeolocateControl will be disabled.");let B=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=B,this._geolocateButton.setAttribute("aria-label",B)}else{let B=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=B,this._geolocateButton.setAttribute("aria-label",B)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=c.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Yu({element:this._dotElement}),this._circleElement=c.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Yu({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",B=>{B.geolocateSource||this._watchState!=="ACTIVE_LOCK"||B.originalEvent&&B.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new a.k("trackuserlocationend")),this.fire(new a.k("userlocationlostfocus")))})}},this.options=a.e({},Nc,ue)}onAdd(ue){return this._map=ue,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return a._(this,arguments,void 0,function*(w=!1){if(ys!==void 0&&!w)return ys;if(window.navigator.permissions===void 0)return ys=!!window.navigator.geolocation,ys;try{ys=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(B){ys=!!window.navigator.geolocation}return ys})}().then(w=>this._finishSetupUI(w)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(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(),c.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,pu=0,Uc=!1}_isOutOfMapMaxBounds(ue){let w=this._map.getMaxBounds(),B=ue.coords;return w&&(B.longitudew.getEast()||B.latitudew.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let ue=this._map.getBounds(),w=ue.getSouthEast(),B=ue.getNorthEast(),Q=w.distanceTo(B),ee=Math.ceil(this._accuracy/(Q/this._map._container.clientHeight)*2);this._circleElement.style.width=`${ee}px`,this._circleElement.style.height=`${ee}px`}trigger(){if(!this._setup)return a.w("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 a.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":pu--,Uc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new a.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new a.k("trackuserlocationstart")),this.fire(new a.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let ue;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),pu++,pu>1?(ue={maximumAge:6e5,timeout:0},Uc=!0):(ue=this.options.positionOptions,Uc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,ue)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},i.Hash=Mh,i.ImageSource=ar,i.KeyboardHandler=Zt,i.LngLatBounds=ce,i.LogoControl=Zn,i.Map=class extends Ra{constructor(ue){a.bf.mark(a.bg.create);let w=Object.assign(Object.assign({},Ws),ue);if(w.minZoom!=null&&w.maxZoom!=null&&w.minZoom>w.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(w.minPitch!=null&&w.maxPitch!=null&&w.minPitch>w.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(w.minPitch!=null&&w.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(w.maxPitch!=null&&w.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new nl(w.minZoom,w.maxZoom,w.minPitch,w.maxPitch,w.renderWorldCopies),{bearingSnap:w.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Dn,this._controls=[],this._mapId=a.a4(),this._contextLost=B=>{B.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new a.k("webglcontextlost",{originalEvent:B}))},this._contextRestored=B=>{this._setupPainter(),this.resize(),this._update(),this.fire(new a.k("webglcontextrestored",{originalEvent:B}))},this._onMapScroll=B=>{if(B.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=w.interactive,this._maxTileCacheSize=w.maxTileCacheSize,this._maxTileCacheZoomLevels=w.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=w.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=w.preserveDrawingBuffer===!0,this._antialias=w.antialias===!0,this._trackResize=w.trackResize===!0,this._bearingSnap=w.bearingSnap,this._refreshExpiredTiles=w.refreshExpiredTiles===!0,this._fadeDuration=w.fadeDuration,this._crossSourceCollisions=w.crossSourceCollisions===!0,this._collectResourceTiming=w.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Ho),w.locale),this._clickTolerance=w.clickTolerance,this._overridePixelRatio=w.pixelRatio,this._maxCanvasSize=w.maxCanvasSize,this.transformCameraUpdate=w.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=w.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=p.addThrottleControl(()=>this.isMoving()),this._requestManager=new k(w.transformRequest),typeof w.container=="string"){if(this._container=document.getElementById(w.container),!this._container)throw new Error(`Container '${w.container}' not found.`)}else{if(!(w.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=w.container}if(w.maxBounds&&this.setMaxBounds(w.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window!="undefined"){addEventListener("online",this._onWindowOnline,!1);let B=!1,Q=nh(ee=>{this._trackResize&&!this._removed&&(this.resize(ee),this.redraw())},50);this._resizeObserver=new ResizeObserver(ee=>{B?Q(ee):B=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Ca(this,w),this._hash=w.hash&&new Mh(typeof w.hash=="string"&&w.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:w.center,zoom:w.zoom,bearing:w.bearing,pitch:w.pitch}),w.bounds&&(this.resize(),this.fitBounds(w.bounds,a.e({},w.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=w.localIdeographFontFamily,this._validateStyle=w.validateStyle,w.style&&this.setStyle(w.style,{localIdeographFontFamily:w.localIdeographFontFamily}),w.attributionControl&&this.addControl(new Ua(typeof w.attributionControl=="boolean"?void 0:w.attributionControl)),w.maplibreLogo&&this.addControl(new Zn,w.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",B=>{this._update(B.dataType==="style"),this.fire(new a.k(`${B.dataType}data`,B))}),this.on("dataloading",B=>{this.fire(new a.k(`${B.dataType}dataloading`,B))}),this.on("dataabort",B=>{this.fire(new a.k("sourcedataabort",B))})}_getMapId(){return this._mapId}addControl(ue,w){if(w===void 0&&(w=ue.getDefaultPosition?ue.getDefaultPosition():"top-right"),!ue||!ue.onAdd)return this.fire(new a.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let B=ue.onAdd(this);this._controls.push(ue);let Q=this._controlPositions[w];return w.indexOf("bottom")!==-1?Q.insertBefore(B,Q.firstChild):Q.appendChild(B),this}removeControl(ue){if(!ue||!ue.onRemove)return this.fire(new a.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let w=this._controls.indexOf(ue);return w>-1&&this._controls.splice(w,1),ue.onRemove(this),this}hasControl(ue){return this._controls.indexOf(ue)>-1}calculateCameraOptionsFromTo(ue,w,B,Q){return Q==null&&this.terrain&&(Q=this.terrain.getElevationForLngLatZoom(B,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(ue,w,B,Q)}resize(ue){var w;let B=this._containerDimensions(),Q=B[0],ee=B[1],le=this._getClampedPixelRatio(Q,ee);if(this._resizeCanvas(Q,ee,le),this.painter.resize(Q,ee,le),this.painter.overLimit()){let Ze=this.painter.context.gl;this._maxCanvasSize=[Ze.drawingBufferWidth,Ze.drawingBufferHeight];let ut=this._getClampedPixelRatio(Q,ee);this._resizeCanvas(Q,ee,ut),this.painter.resize(Q,ee,ut)}this.transform.resize(Q,ee),(w=this._requestedCameraState)===null||w===void 0||w.resize(Q,ee);let Fe=!this._moving;return Fe&&(this.stop(),this.fire(new a.k("movestart",ue)).fire(new a.k("move",ue))),this.fire(new a.k("resize",ue)),Fe&&this.fire(new a.k("moveend",ue)),this}_getClampedPixelRatio(ue,w){let{0:B,1:Q}=this._maxCanvasSize,ee=this.getPixelRatio(),le=ue*ee,Fe=w*ee;return Math.min(le>B?B/le:1,Fe>Q?Q/Fe:1)*ee}getPixelRatio(){var ue;return(ue=this._overridePixelRatio)!==null&&ue!==void 0?ue:devicePixelRatio}setPixelRatio(ue){this._overridePixelRatio=ue,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(ue){return this.transform.setMaxBounds(ce.convert(ue)),this._update()}setMinZoom(ue){if((ue=ue==null?-2:ue)>=-2&&ue<=this.transform.maxZoom)return this.transform.minZoom=ue,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=ue,this._update(),this.getZoom()>ue&&this.setZoom(ue),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(ue){if((ue=ue==null?0:ue)<0)throw new Error("minPitch must be greater than or equal to 0");if(ue>=0&&ue<=this.transform.maxPitch)return this.transform.minPitch=ue,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(ue>=this.transform.minPitch)return this.transform.maxPitch=ue,this._update(),this.getPitch()>ue&&this.setPitch(ue),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(ue){return this.transform.renderWorldCopies=ue,this._update()}project(ue){return this.transform.locationPoint(a.N.convert(ue),this.style&&this.terrain)}unproject(ue){return this.transform.pointLocation(a.P.convert(ue),this.terrain)}isMoving(){var ue;return this._moving||((ue=this.handlers)===null||ue===void 0?void 0:ue.isMoving())}isZooming(){var ue;return this._zooming||((ue=this.handlers)===null||ue===void 0?void 0:ue.isZooming())}isRotating(){var ue;return this._rotating||((ue=this.handlers)===null||ue===void 0?void 0:ue.isRotating())}_createDelegatedListener(ue,w,B){if(ue==="mouseenter"||ue==="mouseover"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:le=>{let Fe=w.filter(ut=>this.getLayer(ut)),Ze=Fe.length!==0?this.queryRenderedFeatures(le.point,{layers:Fe}):[];Ze.length?Q||(Q=!0,B.call(this,new jl(ue,this,le.originalEvent,{features:Ze}))):Q=!1},mouseout:()=>{Q=!1}}}}if(ue==="mouseleave"||ue==="mouseout"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:Fe=>{let Ze=w.filter(ut=>this.getLayer(ut));(Ze.length!==0?this.queryRenderedFeatures(Fe.point,{layers:Ze}):[]).length?Q=!0:Q&&(Q=!1,B.call(this,new jl(ue,this,Fe.originalEvent)))},mouseout:Fe=>{Q&&(Q=!1,B.call(this,new jl(ue,this,Fe.originalEvent)))}}}}{let Q=ee=>{let le=w.filter(Ze=>this.getLayer(Ze)),Fe=le.length!==0?this.queryRenderedFeatures(ee.point,{layers:le}):[];Fe.length&&(ee.features=Fe,B.call(this,ee),delete ee.features)};return{layers:w,listener:B,delegates:{[ue]:Q}}}}_saveDelegatedListener(ue,w){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ue]=this._delegatedListeners[ue]||[],this._delegatedListeners[ue].push(w)}_removeDelegatedListener(ue,w,B){if(!this._delegatedListeners||!this._delegatedListeners[ue])return;let Q=this._delegatedListeners[ue];for(let ee=0;eew.includes(Fe))){for(let Fe in le.delegates)this.off(Fe,le.delegates[Fe]);return void Q.splice(ee,1)}}}on(ue,w,B){if(B===void 0)return super.on(ue,w);let Q=this._createDelegatedListener(ue,typeof w=="string"?[w]:w,B);this._saveDelegatedListener(ue,Q);for(let ee in Q.delegates)this.on(ee,Q.delegates[ee]);return this}once(ue,w,B){if(B===void 0)return super.once(ue,w);let Q=typeof w=="string"?[w]:w,ee=this._createDelegatedListener(ue,Q,B);for(let le in ee.delegates){let Fe=ee.delegates[le];ee.delegates[le]=(...Ze)=>{this._removeDelegatedListener(ue,Q,B),Fe(...Ze)}}this._saveDelegatedListener(ue,ee);for(let le in ee.delegates)this.once(le,ee.delegates[le]);return this}off(ue,w,B){return B===void 0?super.off(ue,w):(this._removeDelegatedListener(ue,typeof w=="string"?[w]:w,B),this)}queryRenderedFeatures(ue,w){if(!this.style)return[];let B,Q=ue instanceof a.P||Array.isArray(ue),ee=Q?ue:[[0,0],[this.transform.width,this.transform.height]];if(w=w||(Q?{}:ue)||{},ee instanceof a.P||typeof ee[0]=="number")B=[a.P.convert(ee)];else{let le=a.P.convert(ee[0]),Fe=a.P.convert(ee[1]);B=[le,new a.P(Fe.x,le.y),Fe,new a.P(le.x,Fe.y),le]}return this.style.queryRenderedFeatures(B,w,this.transform)}querySourceFeatures(ue,w){return this.style.querySourceFeatures(ue,w)}setStyle(ue,w){return(w=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},w)).diff!==!1&&w.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&ue?(this._diffStyle(ue,w),this):(this._localIdeographFontFamily=w.localIdeographFontFamily,this._updateStyle(ue,w))}setTransformRequest(ue){return this._requestManager.setTransformRequest(ue),this}_getUIString(ue){let w=this._locale[ue];if(w==null)throw new Error(`Missing UI string '${ue}'`);return w}_updateStyle(ue,w){if(w.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(ue,w));let B=this.style&&w.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!ue)),ue?(this.style=new Ha(this,w||{}),this.style.setEventedParent(this,{style:this.style}),typeof ue=="string"?this.style.loadURL(ue,w,B):this.style.loadJSON(ue,w,B),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ha(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(ue,w){if(typeof ue=="string"){let B=this._requestManager.transformRequest(ue,"Style");a.h(B,new AbortController).then(Q=>{this._updateDiff(Q.data,w)}).catch(Q=>{Q&&this.fire(new a.j(Q))})}else typeof ue=="object"&&this._updateDiff(ue,w)}_updateDiff(ue,w){try{this.style.setState(ue,w)&&this._update(!0)}catch(B){a.w(`Unable to perform style diff: ${B.message||B.error||B}. Rebuilding the style from scratch.`),this._updateStyle(ue,w)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():a.w("There is no style added to the map.")}addSource(ue,w){return this._lazyInitEmptyStyle(),this.style.addSource(ue,w),this._update(!0)}isSourceLoaded(ue){let w=this.style&&this.style.sourceCaches[ue];if(w!==void 0)return w.loaded();this.fire(new a.j(new Error(`There is no source with ID '${ue}'`)))}setTerrain(ue){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),ue){let w=this.style.sourceCaches[ue.source];if(!w)throw new Error(`cannot load terrain, because there exists no source with ID: ${ue.source}`);this.terrain===null&&w.reload();for(let B in this.style._layers){let Q=this.style._layers[B];Q.type==="hillshade"&&Q.source===ue.source&&a.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Zo(this.painter,w,ue),this.painter.renderToTexture=new ws(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=B=>{B.dataType==="style"?this.terrain.sourceCache.freeRtt():B.dataType==="source"&&B.tile&&(B.sourceId!==ue.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(B.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new a.k("terrain",{terrain:ue})),this}getTerrain(){var ue,w;return(w=(ue=this.terrain)===null||ue===void 0?void 0:ue.options)!==null&&w!==void 0?w:null}areTilesLoaded(){let ue=this.style&&this.style.sourceCaches;for(let w in ue){let B=ue[w]._tiles;for(let Q in B){let ee=B[Q];if(ee.state!=="loaded"&&ee.state!=="errored")return!1}}return!0}removeSource(ue){return this.style.removeSource(ue),this._update(!0)}getSource(ue){return this.style.getSource(ue)}addImage(ue,w,B={}){let{pixelRatio:Q=1,sdf:ee=!1,stretchX:le,stretchY:Fe,content:Ze,textFitWidth:ut,textFitHeight:Mt}=B;if(this._lazyInitEmptyStyle(),!(w instanceof HTMLImageElement||a.b(w))){if(w.width===void 0||w.height===void 0)return this.fire(new a.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Jt,height:$t,data:yr}=w,Cr=w;return this.style.addImage(ue,{data:new a.R({width:Jt,height:$t},new Uint8Array(yr)),pixelRatio:Q,stretchX:le,stretchY:Fe,content:Ze,textFitWidth:ut,textFitHeight:Mt,sdf:ee,version:0,userImage:Cr}),Cr.onAdd&&Cr.onAdd(this,ue),this}}{let{width:Jt,height:$t,data:yr}=u.getImageData(w);this.style.addImage(ue,{data:new a.R({width:Jt,height:$t},yr),pixelRatio:Q,stretchX:le,stretchY:Fe,content:Ze,textFitWidth:ut,textFitHeight:Mt,sdf:ee,version:0})}}updateImage(ue,w){let B=this.style.getImage(ue);if(!B)return this.fire(new a.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let Q=w instanceof HTMLImageElement||a.b(w)?u.getImageData(w):w,{width:ee,height:le,data:Fe}=Q;if(ee===void 0||le===void 0)return this.fire(new a.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(ee!==B.data.width||le!==B.data.height)return this.fire(new a.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let Ze=!(w instanceof HTMLImageElement||a.b(w));return B.data.replace(Fe,Ze),this.style.updateImage(ue,B),this}getImage(ue){return this.style.getImage(ue)}hasImage(ue){return ue?!!this.style.getImage(ue):(this.fire(new a.j(new Error("Missing required image id"))),!1)}removeImage(ue){this.style.removeImage(ue)}loadImage(ue){return p.getImage(this._requestManager.transformRequest(ue,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(ue,w){return this._lazyInitEmptyStyle(),this.style.addLayer(ue,w),this._update(!0)}moveLayer(ue,w){return this.style.moveLayer(ue,w),this._update(!0)}removeLayer(ue){return this.style.removeLayer(ue),this._update(!0)}getLayer(ue){return this.style.getLayer(ue)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(ue,w,B){return this.style.setLayerZoomRange(ue,w,B),this._update(!0)}setFilter(ue,w,B={}){return this.style.setFilter(ue,w,B),this._update(!0)}getFilter(ue){return this.style.getFilter(ue)}setPaintProperty(ue,w,B,Q={}){return this.style.setPaintProperty(ue,w,B,Q),this._update(!0)}getPaintProperty(ue,w){return this.style.getPaintProperty(ue,w)}setLayoutProperty(ue,w,B,Q={}){return this.style.setLayoutProperty(ue,w,B,Q),this._update(!0)}getLayoutProperty(ue,w){return this.style.getLayoutProperty(ue,w)}setGlyphs(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(ue,w),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(ue,w,B={}){return this._lazyInitEmptyStyle(),this.style.addSprite(ue,w,B,Q=>{Q||this._update(!0)}),this}removeSprite(ue){return this._lazyInitEmptyStyle(),this.style.removeSprite(ue),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setSprite(ue,w,B=>{B||this._update(!0)}),this}setLight(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setLight(ue,w),this._update(!0)}getLight(){return this.style.getLight()}setSky(ue){return this._lazyInitEmptyStyle(),this.style.setSky(ue),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(ue,w){return this.style.setFeatureState(ue,w),this._update()}removeFeatureState(ue,w){return this.style.removeFeatureState(ue,w),this._update()}getFeatureState(ue){return this.style.getFeatureState(ue)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let ue=0,w=0;return this._container&&(ue=this._container.clientWidth||400,w=this._container.clientHeight||300),[ue,w]}_setupContainer(){let ue=this._container;ue.classList.add("maplibregl-map");let w=this._canvasContainer=c.create("div","maplibregl-canvas-container",ue);this._interactive&&w.classList.add("maplibregl-interactive"),this._canvas=c.create("canvas","maplibregl-canvas",w),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let B=this._containerDimensions(),Q=this._getClampedPixelRatio(B[0],B[1]);this._resizeCanvas(B[0],B[1],Q);let ee=this._controlContainer=c.create("div","maplibregl-control-container",ue),le=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(Fe=>{le[Fe]=c.create("div",`maplibregl-ctrl-${Fe} `,ee)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(ue,w,B){this._canvas.width=Math.floor(B*ue),this._canvas.height=Math.floor(B*w),this._canvas.style.width=`${ue}px`,this._canvas.style.height=`${w}px`}_setupPainter(){let ue={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},w=null;this._canvas.addEventListener("webglcontextcreationerror",Q=>{w={requestedAttributes:ue},Q&&(w.statusMessage=Q.statusMessage,w.type=Q.type)},{once:!0});let B=this._canvas.getContext("webgl2",ue)||this._canvas.getContext("webgl",ue);if(!B){let Q="Failed to initialize WebGL";throw w?(w.message=Q,new Error(JSON.stringify(w))):new Error(Q)}this.painter=new Dc(B,this.transform),f.testSupport(B)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(ue){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||ue,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(ue){return this._update(),this._renderTaskQueue.add(ue)}_cancelRenderFrame(ue){this._renderTaskQueue.remove(ue)}_render(ue){let w=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(ue),this._removed)return;let B=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let ee=this.transform.zoom,le=u.now();this.style.zoomHistory.update(ee,le);let Fe=new a.z(ee,{now:le,fadeDuration:w,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Ze=Fe.crossFadingFactor();Ze===1&&Ze===this._crossFadingFactor||(B=!0,this._crossFadingFactor=Ze),this.style.update(Fe)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,w,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:w,showPadding:this.showPadding}),this.fire(new a.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,a.bf.mark(a.bg.load),this.fire(new a.k("load"))),this.style&&(this.style.hasTransitions()||B)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Q=this._sourcesDirty||this._styleDirty||this._placementDirty;return Q||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.k("idle")),!this._loaded||this._fullyLoaded||Q||(this._fullyLoaded=!0,a.bf.mark(a.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var ue;this._hash&&this._hash.remove();for(let B of this._controls)B.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window!="undefined"&&removeEventListener("online",this._onWindowOnline,!1),p.removeThrottleControl(this._imageQueueHandle),(ue=this._resizeObserver)===null||ue===void 0||ue.disconnect();let w=this.painter.context.gl.getExtension("WEBGL_lose_context");w!=null&&w.loseContext&&w.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),c.remove(this._canvasContainer),c.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),a.bf.clearMetrics(),this._removed=!0,this.fire(new a.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then(ue=>{a.bf.frame(ue),this._frameRequest=null,this._render(ue)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(ue){this._showTileBoundaries!==ue&&(this._showTileBoundaries=ue,this._update())}get showPadding(){return!!this._showPadding}set showPadding(ue){this._showPadding!==ue&&(this._showPadding=ue,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(ue){this._showCollisionBoxes!==ue&&(this._showCollisionBoxes=ue,ue?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(ue){this._showOverdrawInspector!==ue&&(this._showOverdrawInspector=ue,this._update())}get repaint(){return!!this._repaint}set repaint(ue){this._repaint!==ue&&(this._repaint=ue,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(ue){this._vertices=ue,this._update()}get version(){return ml}getCameraTargetElevation(){return this.transform.elevation}},i.MapMouseEvent=jl,i.MapTouchEvent=uf,i.MapWheelEvent=Xh,i.Marker=Yu,i.NavigationControl=class{constructor(ue){this._updateZoomButtons=()=>{let w=this._map.getZoom(),B=w===this._map.getMaxZoom(),Q=w===this._map.getMinZoom();this._zoomInButton.disabled=B,this._zoomOutButton.disabled=Q,this._zoomInButton.setAttribute("aria-disabled",B.toString()),this._zoomOutButton.setAttribute("aria-disabled",Q.toString())},this._rotateCompassArrow=()=>{let w=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=w},this._setButtonTitle=(w,B)=>{let Q=this._map._getUIString(`NavigationControl.${B}`);w.title=Q,w.setAttribute("aria-label",Q)},this.options=a.e({},va,ue),this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",w=>w.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",w=>this._map.zoomIn({},{originalEvent:w})),c.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",w=>this._map.zoomOut({},{originalEvent:w})),c.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",w=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:w}):this._map.resetNorth({},{originalEvent:w})}),this._compassIcon=c.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(ue){return this._map=ue,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new no(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){c.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(ue,w){let B=c.create("button",ue,this._container);return B.type="button",B.addEventListener("click",w),B}},i.Popup=class extends a.E{constructor(ue){super(),this.remove=()=>(this._content&&c.remove(this._content),this._container&&(c.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),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new a.k("close"))),this),this._onMouseUp=w=>{this._update(w.point)},this._onMouseMove=w=>{this._update(w.point)},this._onDrag=w=>{this._update(w.point)},this._update=w=>{var B;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=c.create("div","maplibregl-popup",this._map.getContainer()),this._tip=c.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let Ze of this.options.className.split(" "))this._container.classList.add(Ze);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?rs(this._lngLat,this._flatPos,this._map.transform):(B=this._lngLat)===null||B===void 0?void 0:B.wrap(),this._trackPointer&&!w)return;let Q=this._flatPos=this._pos=this._trackPointer&&w?w:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&w?w:this._map.transform.locationPoint(this._lngLat));let ee=this.options.anchor,le=hc(this.options.offset);if(!ee){let Ze=this._container.offsetWidth,ut=this._container.offsetHeight,Mt;Mt=Q.y+le.bottom.ythis._map.transform.height-ut?["bottom"]:[],Q.xthis._map.transform.width-Ze/2&&Mt.push("right"),ee=Mt.length===0?"bottom":Mt.join("-")}let Fe=Q.add(le[ee]);this.options.subpixelPositioning||(Fe=Fe.round()),c.setTransform(this._container,`${Ql[ee]} translate(${Fe.x}px,${Fe.y}px)`),Cu(this._container,ee,"popup")},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(oo),ue)}addTo(ue){return this._map&&this.remove(),this._map=ue,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("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new a.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(ue){return this._lngLat=a.N.convert(ue),this._pos=null,this._flatPos=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("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=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("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(ue){return this.setDOMContent(document.createTextNode(ue))}setHTML(ue){let w=document.createDocumentFragment(),B=document.createElement("body"),Q;for(B.innerHTML=ue;Q=B.firstChild,Q;)w.appendChild(Q);return this.setDOMContent(w)}getMaxWidth(){var ue;return(ue=this._container)===null||ue===void 0?void 0:ue.style.maxWidth}setMaxWidth(ue){return this.options.maxWidth=ue,this._update(),this}setDOMContent(ue){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=c.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(ue),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(ue){return this._container&&this._container.classList.add(ue),this}removeClassName(ue){return this._container&&this._container.classList.remove(ue),this}setOffset(ue){return this.options.offset=ue,this._update(),this}toggleClassName(ue){if(this._container)return this._container.classList.toggle(ue)}setSubpixelPositioning(ue){this.options.subpixelPositioning=ue}_createCloseButton(){this.options.closeButton&&(this._closeButton=c.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let ue=this._container.querySelector(Vc);ue&&ue.focus()}},i.RasterDEMTileSource=Ht,i.RasterTileSource=mt,i.ScaleControl=class{constructor(ue){this._onMove=()=>{Ac(this._map,this._container,this.options)},this.setUnit=w=>{this.options.unit=w,Ac(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},xu),ue)}getDefaultPosition(){return"bottom-left"}onAdd(ue){return this._map=ue,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-scale",ue.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){c.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},i.ScrollZoomHandler=Kr,i.Style=Ha,i.TerrainControl=class{constructor(ue){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=ue}onAdd(ue){return this._map=ue,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=c.create("button","maplibregl-ctrl-terrain",this._container),c.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){c.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},i.TwoFingersTouchPitchHandler=Bc,i.TwoFingersTouchRotateHandler=ff,i.TwoFingersTouchZoomHandler=vu,i.TwoFingersTouchZoomRotateHandler=Yi,i.VectorTileSource=lt,i.VideoSource=Vt,i.addSourceType=(ue,w)=>a._(void 0,void 0,void 0,function*(){if(je(ue))throw new Error(`A source type called "${ue}" already exists.`);((B,Q)=>{tt[B]=Q})(ue,w)}),i.clearPrewarmedResources=function(){let ue=ge;ue&&(ue.isPreloaded()&&ue.numActive()===1?(ue.release(_e),ge=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},i.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},i.getRTLTextPluginStatus=function(){return St().getRTLTextPluginStatus()},i.getVersion=function(){return Ku},i.getWorkerCount=function(){return Ee.workerCount},i.getWorkerUrl=function(){return a.a.WORKER_URL},i.importScriptInWorkers=function(ue){return be().broadcast("IS",ue)},i.prewarm=function(){Se().acquire(_e)},i.setMaxParallelImageRequests=function(ue){a.a.MAX_PARALLEL_IMAGE_REQUESTS=ue},i.setRTLTextPlugin=function(ue,w){return St().setRTLTextPlugin(ue,w)},i.setWorkerCount=function(ue){Ee.workerCount=ue},i.setWorkerUrl=function(ue){a.a.WORKER_URL=ue}});var n=e;return n})});var wje=ye((Kbr,bje)=>{"use strict";var gw=Pr(),jXt=Zl().sanitizeHTML,WXt=RJ(),yje=Ix();function _je(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=yje.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var sg=_je.prototype;sg.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=g7(t)};sg.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};sg.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};sg.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};sg.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};sg.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};sg.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!g7(e)){var r=XXt(e);t.addSource(this.idSource,r)}};sg.findFollowingMapLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function xje(e){var t={},r={};switch(e.type){case"circle":gw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":gw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":gw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=WXt(n.textposition,n.iconsize);gw.extendFlat(t,{"icon-image":n.icon+"-15","icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":i.anchor,"text-offset":i.offset,"symbol-placement":n.placement}),gw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":gw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function XXt(e){var t=e.sourcetype,r=e.source,n={type:t},i;return t==="geojson"?i="data":t==="vector"?i=typeof r=="string"?"url":"tiles":t==="raster"?(i="tiles",n.tileSize=256):t==="image"&&(i="url",n.coordinates=e.coordinates),n[i]=r,e.sourceattribution&&(n.attribution=jXt(e.sourceattribution)),n}bje.exports=function(t,r,n){var i=new _je(t,r);return i.update(n),i}});var Lje=ye((Jbr,Cje)=>{"use strict";var BJ=mje(),NJ=Pr(),Sje=dx(),Tje=Oa(),ZXt=ho(),YXt=yv(),m7=ef(),Mje=Cg(),KXt=Mje.drawMode,JXt=Mje.selectMode,$Xt=qf().prepSelect,QXt=qf().clearOutline,eZt=qf().clearSelectionsCache,tZt=qf().selectOnClick,mw=Ix(),rZt=wje();function Eje(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Hh=Eje.prototype;Hh.plot=function(e,t,r){var n=this,i;n.map?i=new Promise(function(a,o){n.updateMap(e,t,a,o)}):i=new Promise(function(a,o){n.createMap(e,t,a,o)}),r.push(i)};Hh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=kje(a.style),s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null,u=i.map=new BJ.Map({container:i.div,style:o.style,center:UJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new BJ.AttributionControl({compact:!0})),c={};u.on("styleimagemissing",function(h){var d=h.id;if(!c[d]&&d.includes("-15")){c[d]=!0;var v=new Image(15,15);v.onload=function(){u.addImage(d,v)},v.crossOrigin="Anonymous",v.src="https://unpkg.com/maki@2.1.0/icons/"+d+".svg"}}),u.setTransformRequest(function(h){return h=h.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),h=h.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),h=h.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:h}}),u._canvas.style.left="0px",u._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var f=[];f.push(new Promise(function(h){u.once("load",h)})),f=f.concat(Sje.fetchTraceGeoData(e)),Promise.all(f).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Hh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=kje(o.style);JSON.stringify(i.styleObj)!==JSON.stringify(l)&&(i.styleObj=l,a.setStyle(l.style),i.traceHash={},s.push(new Promise(function(u){a.once("styledata",u)}))),s=s.concat(Sje.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Hh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i1)for(i=0;i-1&&tZt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&m7.click(n,l.originalEvent)}}};Hh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[i([u.xmin,u.ymin]),i([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(i)}};var s=t.dragOptions;t.dragOptions=NJ.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),JXt(a)||KXt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){$Xt(l,u,c,t.dragOptions,a)},YXt.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};Hh.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Hh.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,i;if(r.length!==n.length){for(i=0;i{"use strict";var VJ=Pr(),nZt=q_(),aZt=Kd(),Pje=eC();Ije.exports=function(t,r,n){nZt(t,r,n,{type:"map",attributes:Pje,handleDefaults:oZt,partition:"y"})};function oZt(e,t,r){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var n=r("bounds.west"),i=r("bounds.east"),a=r("bounds.south"),o=r("bounds.north");(n===void 0||i===void 0||a===void 0||o===void 0)&&delete t.bounds,aZt(e,t,{name:"layers",handleItemDefaults:sZt}),t._input=e}function sZt(e,t){function r(l,u){return VJ.coerce(e,t,Pje.layers,l,u)}var n=r("visible");if(n){var i=r("sourcetype"),a=i==="raster"||i==="image";r("source"),r("sourceattribution"),i==="vector"&&r("sourcelayer"),i==="image"&&r("coordinates");var o;a&&(o="raster");var s=r("type",o);a&&s!=="raster"&&(s=t.type="raster",VJ.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),s==="circle"&&r("circle.radius"),s==="line"&&(r("line.width"),r("line.dash")),s==="fill"&&r("fill.outlinecolor"),s==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),VJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var _7=ye(u0=>{"use strict";var y7=Pr(),Dje=y7.strTranslate,lZt=y7.strScale,uZt=Id().getSubplotCalcData,cZt=Wp(),fZt=qa(),Fje=So(),hZt=Zl(),dZt=Lje(),Rx="map";u0.name=Rx;u0.attr="subplot";u0.idRoot=Rx;u0.idRegex=u0.attrRegex=y7.counterRegex(Rx);u0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};u0.layoutAttributes=eC();u0.supplyLayoutDefaults=Rje();u0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[Rx],a=0;am/2){var b=f.split("|").join("
");d.text(b).attr("data-unformatted",b).call(hZt.convertToTspans,e),v=Fje.bBox(d.node())}d.attr("transform",Dje(-3,-v.height+8)),h.insert("rect",".static-attribution").attr({x:-v.width-6,y:-v.height-3,width:v.width+6,height:v.height+3,fill:"rgba(255, 255, 255, 0.75)"});var p=1;v.width+6>m&&(p=m/(v.width+6));var k=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];h.attr("transform",Dje(k[0],k[1])+lZt(p))}};u0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[Rx],n=0;n{"use strict";zje.exports={attributes:c7(),supplyDefaults:YHe(),colorbar:Qd(),formatLabels:IJ(),calc:bF(),plot:uje(),hoverPoints:p7().hoverPoints,eventData:dje(),selectPoints:pje(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:_7(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var Bje=ye((t2r,Oje)=>{"use strict";Oje.exports=qje()});var GJ=ye((r2r,Nje)=>{"use strict";var x1=o5(),vZt=Tu(),{hovertemplateAttrs:pZt,templatefallbackAttrs:gZt}=Ll(),mZt=Gl(),Dx=Ao().extendFlat;Nje.exports=Dx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Dx({},x1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:x1.text,hovertext:x1.hovertext,marker:{line:{color:Dx({},x1.marker.line.color,{editType:"plot"}),width:Dx({},x1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Dx({},x1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Dx({},x1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Dx({},x1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:x1.hoverinfo,hovertemplate:pZt({},{keys:["properties"]}),hovertemplatefallback:gZt(),showlegend:Dx({},mZt.showlegend,{dflt:!1})},vZt("",{cLetter:"z",editTypeOverride:"calc"}))});var Vje=ye((i2r,Uje)=>{"use strict";var nC=Pr(),yZt=td(),_Zt=GJ();Uje.exports=function(t,r,n,i){function a(c,f){return nC.coerce(t,r,_Zt,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!nC.isArrayOrTypedArray(o)||!o.length||!nC.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||nC.isPlainObject(l))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var u=a("marker.line.width");u&&a("marker.line.color"),a("marker.opacity"),yZt(t,r,i,a,{prefix:"",cLetter:"z"}),nC.coerceSelectionMarkerOpacity(r,a)}});var HJ=ye((n2r,jje)=>{"use strict";var xZt=Eo(),b1=Pr(),bZt=tc(),wZt=So(),TZt=fx().makeBlank,Gje=dx();function AZt(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:"none"},paint:{}},i={layout:{visibility:"none"},paint:{}},a=t._opts={fill:n,line:i,geojson:TZt()};if(!r)return a;var o=Gje.extractTraceFeature(e);if(!o)return a;var s=bZt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;b1.isArrayOrTypedArray(l.opacity)&&(c=function(k){var M=k.mo;return xZt(M)?+b1.constrain(M,0,1):0});var f;b1.isArrayOrTypedArray(u.color)&&(f=function(k){return k.mlc});var h;b1.isArrayOrTypedArray(u.width)&&(h=function(k){return k.mlw});for(var d=0;d{"use strict";var Xje=HJ().convert,SZt=HJ().convertOnSelect,Wje=Ix().traceLayerPrefix;function Zje(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",Wje+t+"-fill"],["line",Wje+t+"-line"]],this.below=null}var F5=Zje.prototype;F5.update=function(e){this._update(Xje(e)),e[0].trace._glTrace=this};F5.updateOnSelect=function(e){this._update(SZt(e))};F5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i=0;r--)e.removeLayer(t[r][1])};F5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};Yje.exports=function(t,r){var n=r[0].trace,i=new Zje(t,n.uid),a=i.sourceId,o=Xje(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),r[0].trace._glTrace=i,i}});var $je=ye((o2r,Jje)=>{"use strict";Jje.exports={attributes:GJ(),supplyDefaults:Vje(),colorbar:D_(),calc:VF(),plot:Kje(),hoverPoints:HF(),eventData:jF(),selectPoints:WF(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if(typeof i=="string"&&i.indexOf("water")===0){for(var a=n+1;a{"use strict";Qje.exports=$je()});var WJ=ye((l2r,rWe)=>{"use strict";var MZt=Tu(),{hovertemplateAttrs:EZt,templatefallbackAttrs:kZt}=Ll(),tWe=Gl(),x7=c7(),jJ=Ao().extendFlat;rWe.exports=jJ({lon:x7.lon,lat:x7.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:x7.text,hovertext:x7.hovertext,hoverinfo:jJ({},tWe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:EZt(),hovertemplatefallback:kZt(),showlegend:jJ({},tWe.showlegend,{dflt:!1})},MZt("",{cLetter:"z",editTypeOverride:"calc"}))});var nWe=ye((u2r,iWe)=>{"use strict";var CZt=Pr(),LZt=td(),PZt=WJ();iWe.exports=function(t,r,n,i){function a(u,c){return CZt.coerce(t,r,PZt,u,c)}var o=a("lon")||[],s=a("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),LZt(t,r,i,a,{prefix:"",cLetter:"z"})}});var sWe=ye((c2r,oWe)=>{"use strict";var XJ=Eo(),IZt=Pr().isArrayOrTypedArray,ZJ=fs().BADNUM,RZt=gv(),aWe=Pr()._;oWe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=IZt(a)&&a.length,s=0;s{"use strict";var DZt=Eo(),YJ=Pr(),lWe=ka(),uWe=tc(),cWe=fs().BADNUM,FZt=fx().makeBlank;fWe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,i={layout:{visibility:"none"},paint:{}},a=r._opts={heatmap:i,geojson:FZt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=YJ.isArrayOrTypedArray(l)&&l.length,f=YJ.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var b=uWe.extractOpts(r),p=b.reversescale?uWe.flipScale(b.colorscale):b.colorscale,k=p[0][1],M=lWe.opacity(k)<1?k:lWe.addOpacity(k,0),T=["interpolate",["linear"],["heatmap-density"],0,M];for(s=1;s{"use strict";var dWe=hWe(),zZt=Ix().traceLayerPrefix;function vWe(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",zZt+t+"-heatmap"]],this.below=null}var b7=vWe.prototype;b7.update=function(e){var t=this.subplot,r=this.layerList,n=dWe(e),i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(n,i),this.below=i);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};b7.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};pWe.exports=function(t,r){var n=r[0].trace,i=new vWe(t,n.uid),a=i.sourceId,o=dWe(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),i}});var yWe=ye((d2r,mWe)=>{"use strict";var qZt=ho(),OZt=p7().hoverPoints,BZt=p7().getExtraText;mWe.exports=function(t,r,n){var i=OZt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,"z"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=qZt.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=BZt(s,l,o[0].t.labels),[a]}}});var xWe=ye((v2r,_We)=>{"use strict";_We.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var wWe=ye((p2r,bWe)=>{"use strict";bWe.exports={attributes:WJ(),supplyDefaults:nWe(),colorbar:D_(),formatLabels:IJ(),calc:sWe(),plot:gWe(),hoverPoints:yWe(),eventData:xWe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";TWe.exports=wWe()});var JJ=ye((y2r,CWe)=>{"use strict";var NZt=ec(),UZt=Gl(),SWe=Ih(),KJ=g3(),VZt=Cc().attributes,{hovertemplateAttrs:MWe,templatefallbackAttrs:EWe}=Ll(),GZt=Tu(),HZt=vl().templatedArray,jZt=vf().descriptionOnlyNumbers,kWe=Ao().extendFlat,WZt=mc().overrideAll,m2r=CWe.exports=WZt({hoverinfo:kWe({},UZt.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:KJ.hoverlabel,domain:VZt({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:jZt("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:NZt({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:SWe.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:KJ.hoverlabel,hovertemplate:MWe({},{keys:["value","label"]}),hovertemplatefallback:EWe(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:SWe.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:KJ.hoverlabel,hovertemplate:MWe({},{keys:["value","label"]}),hovertemplatefallback:EWe(),colorscales:HZt("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:kWe(GZt().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")});var DWe=ye((_2r,RWe)=>{"use strict";var z5=Pr(),w7=JJ(),XZt=ka(),LWe=fd(),ZZt=Cc().defaults,PWe=xM(),IWe=vl(),YZt=Kd();RWe.exports=function(t,r,n,i){function a(T,L){return z5.coerce(t,r,w7,T,L)}var o=z5.extendDeep(i.hoverlabel,t.hoverlabel),s=t.node,l=IWe.newContainer(r,"node");function u(T,L){return z5.coerce(s,l,w7.node,T,L)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",t.hoverinfo),PWe(s,l,u,o),u("hovertemplate"),u("align");var c=i.colorway,f=function(T){return c[T%c.length]};u("color",l.label.map(function(T,L){return XZt.addOpacity(f(L),.8)})),u("customdata");var h=t.link||{},d=IWe.newContainer(r,"link");function v(T,L){return z5.coerce(h,d,w7.link,T,L)}v("label"),v("arrowlen"),v("source"),v("target"),v("value"),v("line.color"),v("line.width"),v("hoverinfo",t.hoverinfo),PWe(h,d,v,o),v("hovertemplate");var m=LWe(i.paper_bgcolor).getLuminance()<.333,b=m?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",p=v("color",b);function k(T){var L=LWe(T);if(!L.isValid())return T;var x=L.getAlpha();return x<=.8?L.setAlpha(x+.2):L=m?L.brighten():L.darken(),L.toRgbString()}v("hovercolor",Array.isArray(p)?p.map(k):k(p)),v("customdata"),YZt(h,d,{name:"colorscales",handleItemDefaults:KZt}),ZZt(r,i,a),a("orientation"),a("valueformat"),a("valuesuffix");var M;l.x.length&&l.y.length&&(M="freeform"),a("arrangement",M),z5.coerceFont(a,"textfont",i.font,{autoShadowDflt:!0}),r._length=null};function KZt(e,t){function r(n,i){return z5.coerce(e,t,w7.link.colorscales,n,i)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var $J=ye((x2r,FWe)=>{"use strict";FWe.exports=JZt;function JZt(e){for(var t=e.length,r=new Array(t),n=new Array(t),i=new Array(t),a=new Array(t),o=new Array(t),s=new Array(t),l=0;l0;){b=k[k.length-1];var M=e[b];if(a[b]=0&&s[b].push(o[L])}a[b]=T}else{if(n[b]===r[b]){for(var x=[],C=[],S=0,T=p.length-1;T>=0;--T){var g=p[T];if(i[g]=!1,x.push(g),C.push(s[g]),S+=s[g].length,o[g]=c.length,g===b){p.length=T;break}}c.push(x);for(var P=new Array(S),T=0;T{"use strict";var $Zt=$J(),q5=Pr(),QZt=ny().wrap,aC=q5.isArrayOrTypedArray,zWe=q5.isIndex,qWe=tc();function eYt(e){var t=e.node,r=e.link,n=[],i=aC(r.color),a=aC(r.hovercolor),o=aC(r.customdata),s={},l={},u=r.colorscales.length,c;for(c=0;cv&&(v=r.source[c]),r.target[c]>v&&(v=r.target[c]);var m=v+1;e.node._count=m;var b,p=e.node.groups,k={};for(c=0;c0&&zWe(S,m)&&zWe(g,m)&&!(k.hasOwnProperty(S)&&k.hasOwnProperty(g)&&k[S]===k[g])){k.hasOwnProperty(g)&&(g=k[g]),k.hasOwnProperty(S)&&(S=k[S]),S=+S,g=+g,s[S]=s[g]=!0;var P="";r.label&&r.label[c]&&(P=r.label[c]);var E=null;P&&l.hasOwnProperty(P)&&(E=l[P]),n.push({pointNumber:c,label:P,color:i?r.color[c]:r.color,hovercolor:a?r.hovercolor[c]:r.hovercolor,customdata:o?r.customdata[c]:r.customdata,concentrationscale:E,source:S,target:g,value:+C}),x.source.push(S),x.target.push(g)}}var z=m+p.length,q=aC(t.color),V=aC(t.customdata),G=[];for(c=0;cm-1,childrenNodes:[],pointNumber:c,label:Z,color:q?t.color[c]:t.color,customdata:V?t.customdata[c]:t.customdata})}var j=!1;return tYt(z,x.source,x.target)&&(j=!0),{circular:j,links:n,nodes:G,groups:p,groupLookup:k}}function tYt(e,t,r){for(var n=q5.init2dArray(e,0),i=0;i1})}OWe.exports=function(t,r){var n=eYt(r);return QZt({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var UWe=ye((T7,NWe)=>{(function(e,t){typeof T7=="object"&&typeof NWe!="undefined"?t(T7):(e=e||self,t(e.d3=e.d3||{}))})(T7,function(e){"use strict";function t(C){var S=+this._x.call(null,C),g=+this._y.call(null,C);return r(this.cover(S,g),S,g,C)}function r(C,S,g,P){if(isNaN(S)||isNaN(g))return C;var E,z=C._root,q={data:P},V=C._x0,G=C._y0,Z=C._x1,j=C._y1,N,H,ie,ae,_e,Ee,Ce,ge;if(!z)return C._root=q,C;for(;z.length;)if((_e=S>=(N=(V+Z)/2))?V=N:Z=N,(Ee=g>=(H=(G+j)/2))?G=H:j=H,E=z,!(z=z[Ce=Ee<<1|_e]))return E[Ce]=q,C;if(ie=+C._x.call(null,z.data),ae=+C._y.call(null,z.data),S===ie&&g===ae)return q.next=z,E?E[Ce]=q:C._root=q,C;do E=E?E[Ce]=new Array(4):C._root=new Array(4),(_e=S>=(N=(V+Z)/2))?V=N:Z=N,(Ee=g>=(H=(G+j)/2))?G=H:j=H;while((Ce=Ee<<1|_e)===(ge=(ae>=H)<<1|ie>=N));return E[ge]=z,E[Ce]=q,C}function n(C){var S,g,P=C.length,E,z,q=new Array(P),V=new Array(P),G=1/0,Z=1/0,j=-1/0,N=-1/0;for(g=0;gj&&(j=E),zN&&(N=z));if(G>j||Z>N)return this;for(this.cover(G,Z).cover(j,N),g=0;gC||C>=E||P>S||S>=z;)switch(Z=(Sj||(V=ae.y0)>N||(G=ae.x1)=Ce)<<1|C>=Ee)&&(ae=H[H.length-1],H[H.length-1]=H[H.length-1-_e],H[H.length-1-_e]=ae)}else{var ge=C-+this._x.call(null,ie.data),re=S-+this._y.call(null,ie.data),Se=ge*ge+re*re;if(Se=(H=(q+G)/2))?q=H:G=H,(_e=N>=(ie=(V+Z)/2))?V=ie:Z=ie,S=g,!(g=g[Ee=_e<<1|ae]))return this;if(!g.length)break;(S[Ee+1&3]||S[Ee+2&3]||S[Ee+3&3])&&(P=S,Ce=Ee)}for(;g.data!==C;)if(E=g,!(g=g.next))return this;return(z=g.next)&&delete g.next,E?(z?E.next=z:delete E.next,this):S?(z?S[Ee]=z:delete S[Ee],(g=S[0]||S[1]||S[2]||S[3])&&g===(S[3]||S[2]||S[1]||S[0])&&!g.length&&(P?P[Ce]=g:this._root=g),this):(this._root=z,this)}function c(C){for(var S=0,g=C.length;S{(function(e,t){t(typeof A7=="object"&&typeof VWe!="undefined"?A7:e.d3=e.d3||{})})(A7,function(e){"use strict";var t="$";function r(){}r.prototype=n.prototype={constructor:r,has:function(m){return t+m in this},get:function(m){return this[t+m]},set:function(m,b){return this[t+m]=b,this},remove:function(m){var b=t+m;return b in this&&delete this[b]},clear:function(){for(var m in this)m[0]===t&&delete this[m]},keys:function(){var m=[];for(var b in this)b[0]===t&&m.push(b.slice(1));return m},values:function(){var m=[];for(var b in this)b[0]===t&&m.push(this[b]);return m},entries:function(){var m=[];for(var b in this)b[0]===t&&m.push({key:b.slice(1),value:this[b]});return m},size:function(){var m=0;for(var b in this)b[0]===t&&++m;return m},empty:function(){for(var m in this)if(m[0]===t)return!1;return!0},each:function(m){for(var b in this)b[0]===t&&m(this[b],b.slice(1),this)}};function n(m,b){var p=new r;if(m instanceof r)m.each(function(x,C){p.set(C,x)});else if(Array.isArray(m)){var k=-1,M=m.length,T;if(b==null)for(;++k=m.length)return p!=null&&x.sort(p),k!=null?k(x):x;for(var P=-1,E=x.length,z=m[C++],q,V,G=n(),Z,j=S();++Pm.length)return x;var S,g=b[C-1];return k!=null&&C>=m.length?S=x.entries():(S=[],x.each(function(P,E){S.push({key:E,values:L(P,C)})})),g!=null?S.sort(function(P,E){return g(P.key,E.key)}):S}return M={object:function(x){return T(x,0,a,o)},map:function(x){return T(x,0,s,l)},entries:function(x){return L(T(x,0,s,l),0)},key:function(x){return m.push(x),M},sortKeys:function(x){return b[m.length-1]=x,M},sortValues:function(x){return p=x,M},rollup:function(x){return k=x,M}}}function a(){return{}}function o(m,b,p){m[b]=p}function s(){return n()}function l(m,b,p){m.set(b,p)}function u(){}var c=n.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(m){return m+="",this[t+m]=m,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(m,b){var p=new u;if(m instanceof u)m.each(function(T){p.add(T)});else if(m){var k=-1,M=m.length;if(b==null)for(;++k{(function(e,t){typeof M7=="object"&&typeof GWe!="undefined"?t(M7):(e=e||self,t(e.d3=e.d3||{}))})(M7,function(e){"use strict";var t={value:function(){}};function r(){for(var s=0,l=arguments.length,u={},c;s=0&&(c=u.slice(f+1),u=u.slice(0,f)),u&&!l.hasOwnProperty(u))throw new Error("unknown type: "+u);return{type:u,name:c}})}n.prototype=r.prototype={constructor:n,on:function(s,l){var u=this._,c=i(s+"",u),f,h=-1,d=c.length;if(arguments.length<2){for(;++h0)for(var u=new Array(f),c=0,f,h;c{(function(e,t){typeof E7=="object"&&typeof jWe!="undefined"?t(E7):(e=e||self,t(e.d3=e.d3||{}))})(E7,function(e){"use strict";var t=0,r=0,n=0,i=1e3,a,o,s=0,l=0,u=0,c=typeof performance=="object"&&performance.now?performance:Date,f=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(C){setTimeout(C,17)};function h(){return l||(f(d),l=c.now()+u)}function d(){l=0}function v(){this._call=this._time=this._next=null}v.prototype=m.prototype={constructor:v,restart:function(C,S,g){if(typeof C!="function")throw new TypeError("callback is not a function");g=(g==null?h():+g)+(S==null?0:+S),!this._next&&o!==this&&(o?o._next=this:a=this,o=this),this._call=C,this._time=g,T()},stop:function(){this._call&&(this._call=null,this._time=1/0,T())}};function m(C,S,g){var P=new v;return P.restart(C,S,g),P}function b(){h(),++t;for(var C=a,S;C;)(S=l-C._time)>=0&&C._call.call(null,S),C=C._next;--t}function p(){l=(s=c.now())+u,t=r=0;try{b()}finally{t=0,M(),l=0}}function k(){var C=c.now(),S=C-s;S>i&&(u-=S,s=C)}function M(){for(var C,S=a,g,P=1/0;S;)S._call?(P>S._time&&(P=S._time),C=S,S=S._next):(g=S._next,S._next=null,S=C?C._next=g:a=g);o=C,T(P)}function T(C){if(!t){r&&(r=clearTimeout(r));var S=C-l;S>24?(C<1/0&&(r=setTimeout(p,C-c.now()-u)),n&&(n=clearInterval(n))):(n||(s=c.now(),n=setInterval(k,i)),t=1,f(p))}}function L(C,S,g){var P=new v;return S=S==null?0:+S,P.restart(function(E){P.stop(),C(E+S)},S,g),P}function x(C,S,g){var P=new v,E=S;return S==null?(P.restart(C,S,g),P):(S=+S,g=g==null?h():+g,P.restart(function z(q){q+=E,P.restart(z,E+=S,g),C(q)},S,g),P)}e.interval=x,e.now=h,e.timeout=L,e.timer=m,e.timerFlush=b,Object.defineProperty(e,"__esModule",{value:!0})})});var ZWe=ye((k7,XWe)=>{(function(e,t){typeof k7=="object"&&typeof XWe!="undefined"?t(k7,UWe(),S7(),HWe(),WWe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(k7,function(e,t,r,n,i){"use strict";function a(C,S){var g;C==null&&(C=0),S==null&&(S=0);function P(){var E,z=g.length,q,V=0,G=0;for(E=0;EN.index){var Pe=H-Be.x-Be.vx,ce=ie-Be.y-Be.vy,He=Pe*Pe+ce*ce;HeH+me||keie+me||beG.r&&(G.r=G[Z].r)}function V(){if(S){var G,Z=S.length,j;for(g=new Array(Z),G=0;G1?(_e==null?V.remove(ae):V.set(ae,ie(_e)),S):V.get(ae)},find:function(ae,_e,Ee){var Ce=0,ge=C.length,re,Se,ke,be,Be;for(Ee==null?Ee=1/0:Ee*=Ee,Ce=0;Ce1?(Z.on(ae,_e),S):Z.on(ae)}}}function M(){var C,S,g,P=o(-30),E,z=1,q=1/0,V=.81;function G(H){var ie,ae=C.length,_e=t.quadtree(C,v,m).visitAfter(j);for(g=H,ie=0;ie=q)return;(H.data!==S||H.next)&&(Ee===0&&(Ee=s(),re+=Ee*Ee),Ce===0&&(Ce=s(),re+=Ce*Ce),re{(function(e,t){typeof C7=="object"&&typeof YWe!="undefined"?t(C7):(e=e||self,t(e.d3=e.d3||{}))})(C7,function(e){"use strict";var t=Math.PI,r=2*t,n=1e-6,i=r-n;function a(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function o(){return new a}a.prototype=o.prototype={constructor:a,moveTo:function(s,l){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(s,l){this._+="L"+(this._x1=+s)+","+(this._y1=+l)},quadraticCurveTo:function(s,l,u,c){this._+="Q"+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+c)},bezierCurveTo:function(s,l,u,c,f,h){this._+="C"+ +s+","+ +l+","+ +u+","+ +c+","+(this._x1=+f)+","+(this._y1=+h)},arcTo:function(s,l,u,c,f){s=+s,l=+l,u=+u,c=+c,f=+f;var h=this._x1,d=this._y1,v=u-s,m=c-l,b=h-s,p=d-l,k=b*b+p*p;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=l);else if(k>n)if(!(Math.abs(p*v-m*b)>n)||!f)this._+="L"+(this._x1=s)+","+(this._y1=l);else{var M=u-h,T=c-d,L=v*v+m*m,x=M*M+T*T,C=Math.sqrt(L),S=Math.sqrt(k),g=f*Math.tan((t-Math.acos((L+k-x)/(2*C*S)))/2),P=g/S,E=g/C;Math.abs(P-1)>n&&(this._+="L"+(s+P*b)+","+(l+P*p)),this._+="A"+f+","+f+",0,0,"+ +(p*M>b*T)+","+(this._x1=s+E*v)+","+(this._y1=l+E*m)}},arc:function(s,l,u,c,f,h){s=+s,l=+l,u=+u,h=!!h;var d=u*Math.cos(c),v=u*Math.sin(c),m=s+d,b=l+v,p=1^h,k=h?c-f:f-c;if(u<0)throw new Error("negative radius: "+u);this._x1===null?this._+="M"+m+","+b:(Math.abs(this._x1-m)>n||Math.abs(this._y1-b)>n)&&(this._+="L"+m+","+b),u&&(k<0&&(k=k%r+r),k>i?this._+="A"+u+","+u+",0,1,"+p+","+(s-d)+","+(l-v)+"A"+u+","+u+",0,1,"+p+","+(this._x1=m)+","+(this._y1=b):k>n&&(this._+="A"+u+","+u+",0,"+ +(k>=t)+","+p+","+(this._x1=s+u*Math.cos(f))+","+(this._y1=l+u*Math.sin(f))))},rect:function(s,l,u,c){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)+"h"+ +u+"v"+ +c+"h"+-u+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var QJ=ye((L7,JWe)=>{(function(e,t){typeof L7=="object"&&typeof JWe!="undefined"?t(L7,KWe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(L7,function(e,t){"use strict";function r(Ct){return function(){return Ct}}var n=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,f=Math.PI,h=f/2,d=2*f;function v(Ct){return Ct>1?0:Ct<-1?f:Math.acos(Ct)}function m(Ct){return Ct>=1?h:Ct<=-1?-h:Math.asin(Ct)}function b(Ct){return Ct.innerRadius}function p(Ct){return Ct.outerRadius}function k(Ct){return Ct.startAngle}function M(Ct){return Ct.endAngle}function T(Ct){return Ct&&Ct.padAngle}function L(Ct,Sr,Jr,hi,hn,Sn,En,ki){var _n=Jr-Ct,ya=hi-Sr,ea=En-hn,Ma=ki-Sn,_o=Ma*_n-ea*ya;if(!(_o*_oYl*Yl+Su*Su&&(As=Ks,cl=zs),{cx:As,cy:cl,x01:-ea,y01:-Ma,x11:As*(hn/zl-1),y11:cl*(hn/zl-1)}}function C(){var Ct=b,Sr=p,Jr=r(0),hi=null,hn=k,Sn=M,En=T,ki=null;function _n(){var ya,ea,Ma=+Ct.apply(this,arguments),_o=+Sr.apply(this,arguments),No=hn.apply(this,arguments)-h,po=Sn.apply(this,arguments)-h,Lo=n(po-No),ko=po>No;if(ki||(ki=ya=t.path()),_oc))ki.moveTo(0,0);else if(Lo>d-c)ki.moveTo(_o*a(No),_o*l(No)),ki.arc(0,0,_o,No,po,!ko),Ma>c&&(ki.moveTo(Ma*a(po),Ma*l(po)),ki.arc(0,0,Ma,po,No,ko));else{var Ds=No,Fs=po,ll=No,ul=po,zl=Lo,us=Lo,il=En.apply(this,arguments)/2,As=il>c&&(hi?+hi.apply(this,arguments):u(Ma*Ma+_o*_o)),cl=s(n(_o-Ma)/2,+Jr.apply(this,arguments)),Ks=cl,zs=cl,Io,ls;if(As>c){var Yl=m(As/Ma*l(il)),Su=m(As/_o*l(il));(zl-=Yl*2)>c?(Yl*=ko?1:-1,ll+=Yl,ul-=Yl):(zl=0,ll=ul=(No+po)/2),(us-=Su*2)>c?(Su*=ko?1:-1,Ds+=Su,Fs-=Su):(us=0,Ds=Fs=(No+po)/2)}var nc=_o*a(Ds),bs=_o*l(Ds),Rn=Ma*a(ul),_a=Ma*l(ul);if(cl>c){var Vu=_o*a(Fs),ql=_o*l(Fs),xo=Ma*a(ll),Kl=Ma*l(ll),Ns;if(Loc?zs>c?(Io=x(xo,Kl,nc,bs,_o,zs,ko),ls=x(Vu,ql,Rn,_a,_o,zs,ko),ki.moveTo(Io.cx+Io.x01,Io.cy+Io.y01),zsc)||!(zl>c)?ki.lineTo(Rn,_a):Ks>c?(Io=x(Rn,_a,Vu,ql,Ma,-Ks,ko),ls=x(nc,bs,xo,Kl,Ma,-Ks,ko),ki.lineTo(Io.cx+Io.x01,Io.cy+Io.y01),Ks=_o;--No)ki.point(Fs[No],ll[No]);ki.lineEnd(),ki.areaEnd()}ko&&(Fs[Ma]=+Ct(Lo,Ma,ea),ll[Ma]=+Jr(Lo,Ma,ea),ki.point(Sr?+Sr(Lo,Ma,ea):Fs[Ma],hi?+hi(Lo,Ma,ea):ll[Ma]))}if(Ds)return ki=null,Ds+""||null}function ya(){return z().defined(hn).curve(En).context(Sn)}return _n.x=function(ea){return arguments.length?(Ct=typeof ea=="function"?ea:r(+ea),Sr=null,_n):Ct},_n.x0=function(ea){return arguments.length?(Ct=typeof ea=="function"?ea:r(+ea),_n):Ct},_n.x1=function(ea){return arguments.length?(Sr=ea==null?null:typeof ea=="function"?ea:r(+ea),_n):Sr},_n.y=function(ea){return arguments.length?(Jr=typeof ea=="function"?ea:r(+ea),hi=null,_n):Jr},_n.y0=function(ea){return arguments.length?(Jr=typeof ea=="function"?ea:r(+ea),_n):Jr},_n.y1=function(ea){return arguments.length?(hi=ea==null?null:typeof ea=="function"?ea:r(+ea),_n):hi},_n.lineX0=_n.lineY0=function(){return ya().x(Ct).y(Jr)},_n.lineY1=function(){return ya().x(Ct).y(hi)},_n.lineX1=function(){return ya().x(Sr).y(Jr)},_n.defined=function(ea){return arguments.length?(hn=typeof ea=="function"?ea:r(!!ea),_n):hn},_n.curve=function(ea){return arguments.length?(En=ea,Sn!=null&&(ki=En(Sn)),_n):En},_n.context=function(ea){return arguments.length?(ea==null?Sn=ki=null:ki=En(Sn=ea),_n):Sn},_n}function V(Ct,Sr){return SrCt?1:Sr>=Ct?0:NaN}function G(Ct){return Ct}function Z(){var Ct=G,Sr=V,Jr=null,hi=r(0),hn=r(d),Sn=r(0);function En(ki){var _n,ya=ki.length,ea,Ma,_o=0,No=new Array(ya),po=new Array(ya),Lo=+hi.apply(this,arguments),ko=Math.min(d,Math.max(-d,hn.apply(this,arguments)-Lo)),Ds,Fs=Math.min(Math.abs(ko)/ya,Sn.apply(this,arguments)),ll=Fs*(ko<0?-1:1),ul;for(_n=0;_n0&&(_o+=ul);for(Sr!=null?No.sort(function(zl,us){return Sr(po[zl],po[us])}):Jr!=null&&No.sort(function(zl,us){return Jr(ki[zl],ki[us])}),_n=0,Ma=_o?(ko-ya*ll)/_o:0;_n0?ul*Ma:0)+ll,po[ea]={data:ki[ea],index:_n,value:ul,startAngle:Lo,endAngle:Ds,padAngle:Fs};return po}return En.value=function(ki){return arguments.length?(Ct=typeof ki=="function"?ki:r(+ki),En):Ct},En.sortValues=function(ki){return arguments.length?(Sr=ki,Jr=null,En):Sr},En.sort=function(ki){return arguments.length?(Jr=ki,Sr=null,En):Jr},En.startAngle=function(ki){return arguments.length?(hi=typeof ki=="function"?ki:r(+ki),En):hi},En.endAngle=function(ki){return arguments.length?(hn=typeof ki=="function"?ki:r(+ki),En):hn},En.padAngle=function(ki){return arguments.length?(Sn=typeof ki=="function"?ki:r(+ki),En):Sn},En}var j=H(g);function N(Ct){this._curve=Ct}N.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Ct,Sr){this._curve.point(Sr*Math.sin(Ct),Sr*-Math.cos(Ct))}};function H(Ct){function Sr(Jr){return new N(Ct(Jr))}return Sr._curve=Ct,Sr}function ie(Ct){var Sr=Ct.curve;return Ct.angle=Ct.x,delete Ct.x,Ct.radius=Ct.y,delete Ct.y,Ct.curve=function(Jr){return arguments.length?Sr(H(Jr)):Sr()._curve},Ct}function ae(){return ie(z().curve(j))}function _e(){var Ct=q().curve(j),Sr=Ct.curve,Jr=Ct.lineX0,hi=Ct.lineX1,hn=Ct.lineY0,Sn=Ct.lineY1;return Ct.angle=Ct.x,delete Ct.x,Ct.startAngle=Ct.x0,delete Ct.x0,Ct.endAngle=Ct.x1,delete Ct.x1,Ct.radius=Ct.y,delete Ct.y,Ct.innerRadius=Ct.y0,delete Ct.y0,Ct.outerRadius=Ct.y1,delete Ct.y1,Ct.lineStartAngle=function(){return ie(Jr())},delete Ct.lineX0,Ct.lineEndAngle=function(){return ie(hi())},delete Ct.lineX1,Ct.lineInnerRadius=function(){return ie(hn())},delete Ct.lineY0,Ct.lineOuterRadius=function(){return ie(Sn())},delete Ct.lineY1,Ct.curve=function(En){return arguments.length?Sr(H(En)):Sr()._curve},Ct}function Ee(Ct,Sr){return[(Sr=+Sr)*Math.cos(Ct-=Math.PI/2),Sr*Math.sin(Ct)]}var Ce=Array.prototype.slice;function ge(Ct){return Ct.source}function re(Ct){return Ct.target}function Se(Ct){var Sr=ge,Jr=re,hi=P,hn=E,Sn=null;function En(){var ki,_n=Ce.call(arguments),ya=Sr.apply(this,_n),ea=Jr.apply(this,_n);if(Sn||(Sn=ki=t.path()),Ct(Sn,+hi.apply(this,(_n[0]=ya,_n)),+hn.apply(this,_n),+hi.apply(this,(_n[0]=ea,_n)),+hn.apply(this,_n)),ki)return Sn=null,ki+""||null}return En.source=function(ki){return arguments.length?(Sr=ki,En):Sr},En.target=function(ki){return arguments.length?(Jr=ki,En):Jr},En.x=function(ki){return arguments.length?(hi=typeof ki=="function"?ki:r(+ki),En):hi},En.y=function(ki){return arguments.length?(hn=typeof ki=="function"?ki:r(+ki),En):hn},En.context=function(ki){return arguments.length?(Sn=ki==null?null:ki,En):Sn},En}function ke(Ct,Sr,Jr,hi,hn){Ct.moveTo(Sr,Jr),Ct.bezierCurveTo(Sr=(Sr+hi)/2,Jr,Sr,hn,hi,hn)}function be(Ct,Sr,Jr,hi,hn){Ct.moveTo(Sr,Jr),Ct.bezierCurveTo(Sr,Jr=(Jr+hn)/2,hi,Jr,hi,hn)}function Be(Ct,Sr,Jr,hi,hn){var Sn=Ee(Sr,Jr),En=Ee(Sr,Jr=(Jr+hn)/2),ki=Ee(hi,Jr),_n=Ee(hi,hn);Ct.moveTo(Sn[0],Sn[1]),Ct.bezierCurveTo(En[0],En[1],ki[0],ki[1],_n[0],_n[1])}function Le(){return Se(ke)}function me(){return Se(be)}function Pe(){var Ct=Se(Be);return Ct.angle=Ct.x,delete Ct.x,Ct.radius=Ct.y,delete Ct.y,Ct}var ce={draw:function(Ct,Sr){var Jr=Math.sqrt(Sr/f);Ct.moveTo(Jr,0),Ct.arc(0,0,Jr,0,d)}},He={draw:function(Ct,Sr){var Jr=Math.sqrt(Sr/5)/2;Ct.moveTo(-3*Jr,-Jr),Ct.lineTo(-Jr,-Jr),Ct.lineTo(-Jr,-3*Jr),Ct.lineTo(Jr,-3*Jr),Ct.lineTo(Jr,-Jr),Ct.lineTo(3*Jr,-Jr),Ct.lineTo(3*Jr,Jr),Ct.lineTo(Jr,Jr),Ct.lineTo(Jr,3*Jr),Ct.lineTo(-Jr,3*Jr),Ct.lineTo(-Jr,Jr),Ct.lineTo(-3*Jr,Jr),Ct.closePath()}},lt=Math.sqrt(1/3),mt=lt*2,Ht={draw:function(Ct,Sr){var Jr=Math.sqrt(Sr/mt),hi=Jr*lt;Ct.moveTo(0,-Jr),Ct.lineTo(hi,0),Ct.lineTo(0,Jr),Ct.lineTo(-hi,0),Ct.closePath()}},at=.8908130915292852,ct=Math.sin(f/10)/Math.sin(7*f/10),ar=Math.sin(d/10)*ct,Vt=-Math.cos(d/10)*ct,rr={draw:function(Ct,Sr){var Jr=Math.sqrt(Sr*at),hi=ar*Jr,hn=Vt*Jr;Ct.moveTo(0,-Jr),Ct.lineTo(hi,hn);for(var Sn=1;Sn<5;++Sn){var En=d*Sn/5,ki=Math.cos(En),_n=Math.sin(En);Ct.lineTo(_n*Jr,-ki*Jr),Ct.lineTo(ki*hi-_n*hn,_n*hi+ki*hn)}Ct.closePath()}},tt={draw:function(Ct,Sr){var Jr=Math.sqrt(Sr),hi=-Jr/2;Ct.rect(hi,hi,Jr,Jr)}},je=Math.sqrt(3),Ue={draw:function(Ct,Sr){var Jr=-Math.sqrt(Sr/(je*3));Ct.moveTo(0,Jr*2),Ct.lineTo(-je*Jr,-Jr),Ct.lineTo(je*Jr,-Jr),Ct.closePath()}},Ae=-.5,rt=Math.sqrt(3)/2,St=1/Math.sqrt(12),Tt=(St/2+1)*3,dt={draw:function(Ct,Sr){var Jr=Math.sqrt(Sr/Tt),hi=Jr/2,hn=Jr*St,Sn=hi,En=Jr*St+Jr,ki=-Sn,_n=En;Ct.moveTo(hi,hn),Ct.lineTo(Sn,En),Ct.lineTo(ki,_n),Ct.lineTo(Ae*hi-rt*hn,rt*hi+Ae*hn),Ct.lineTo(Ae*Sn-rt*En,rt*Sn+Ae*En),Ct.lineTo(Ae*ki-rt*_n,rt*ki+Ae*_n),Ct.lineTo(Ae*hi+rt*hn,Ae*hn-rt*hi),Ct.lineTo(Ae*Sn+rt*En,Ae*En-rt*Sn),Ct.lineTo(Ae*ki+rt*_n,Ae*_n-rt*ki),Ct.closePath()}},Et=[ce,He,Ht,tt,rr,Ue,dt];function pt(){var Ct=r(ce),Sr=r(64),Jr=null;function hi(){var hn;if(Jr||(Jr=hn=t.path()),Ct.apply(this,arguments).draw(Jr,+Sr.apply(this,arguments)),hn)return Jr=null,hn+""||null}return hi.type=function(hn){return arguments.length?(Ct=typeof hn=="function"?hn:r(hn),hi):Ct},hi.size=function(hn){return arguments.length?(Sr=typeof hn=="function"?hn:r(+hn),hi):Sr},hi.context=function(hn){return arguments.length?(Jr=hn==null?null:hn,hi):Jr},hi}function jt(){}function or(Ct,Sr,Jr){Ct._context.bezierCurveTo((2*Ct._x0+Ct._x1)/3,(2*Ct._y0+Ct._y1)/3,(Ct._x0+2*Ct._x1)/3,(Ct._y0+2*Ct._y1)/3,(Ct._x0+4*Ct._x1+Sr)/6,(Ct._y0+4*Ct._y1+Jr)/6)}function mr(Ct){this._context=Ct}mr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:or(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ct,Sr){switch(Ct=+Ct,Sr=+Sr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ct,Sr):this._context.moveTo(Ct,Sr);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:or(this,Ct,Sr);break}this._x0=this._x1,this._x1=Ct,this._y0=this._y1,this._y1=Sr}};function Ar(Ct){return new mr(Ct)}function ei(Ct){this._context=Ct}ei.prototype={areaStart:jt,areaEnd:jt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(Ct,Sr){switch(Ct=+Ct,Sr=+Sr,this._point){case 0:this._point=1,this._x2=Ct,this._y2=Sr;break;case 1:this._point=2,this._x3=Ct,this._y3=Sr;break;case 2:this._point=3,this._x4=Ct,this._y4=Sr,this._context.moveTo((this._x0+4*this._x1+Ct)/6,(this._y0+4*this._y1+Sr)/6);break;default:or(this,Ct,Sr);break}this._x0=this._x1,this._x1=Ct,this._y0=this._y1,this._y1=Sr}};function qr(Ct){return new ei(Ct)}function jr(Ct){this._context=Ct}jr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ct,Sr){switch(Ct=+Ct,Sr=+Sr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Jr=(this._x0+4*this._x1+Ct)/6,hi=(this._y0+4*this._y1+Sr)/6;this._line?this._context.lineTo(Jr,hi):this._context.moveTo(Jr,hi);break;case 3:this._point=4;default:or(this,Ct,Sr);break}this._x0=this._x1,this._x1=Ct,this._y0=this._y1,this._y1=Sr}};function gt(Ct){return new jr(Ct)}function Ge(Ct,Sr){this._basis=new mr(Ct),this._beta=Sr}Ge.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Ct=this._x,Sr=this._y,Jr=Ct.length-1;if(Jr>0)for(var hi=Ct[0],hn=Sr[0],Sn=Ct[Jr]-hi,En=Sr[Jr]-hn,ki=-1,_n;++ki<=Jr;)_n=ki/Jr,this._basis.point(this._beta*Ct[ki]+(1-this._beta)*(hi+_n*Sn),this._beta*Sr[ki]+(1-this._beta)*(hn+_n*En));this._x=this._y=null,this._basis.lineEnd()},point:function(Ct,Sr){this._x.push(+Ct),this._y.push(+Sr)}};var Je=function Ct(Sr){function Jr(hi){return Sr===1?new mr(hi):new Ge(hi,Sr)}return Jr.beta=function(hi){return Ct(+hi)},Jr}(.85);function We(Ct,Sr,Jr){Ct._context.bezierCurveTo(Ct._x1+Ct._k*(Ct._x2-Ct._x0),Ct._y1+Ct._k*(Ct._y2-Ct._y0),Ct._x2+Ct._k*(Ct._x1-Sr),Ct._y2+Ct._k*(Ct._y1-Jr),Ct._x2,Ct._y2)}function et(Ct,Sr){this._context=Ct,this._k=(1-Sr)/6}et.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:We(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ct,Sr){switch(Ct=+Ct,Sr=+Sr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ct,Sr):this._context.moveTo(Ct,Sr);break;case 1:this._point=2,this._x1=Ct,this._y1=Sr;break;case 2:this._point=3;default:We(this,Ct,Sr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Sr}};var xt=function Ct(Sr){function Jr(hi){return new et(hi,Sr)}return Jr.tension=function(hi){return Ct(+hi)},Jr}(0);function At(Ct,Sr){this._context=Ct,this._k=(1-Sr)/6}At.prototype={areaStart:jt,areaEnd:jt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(Ct,Sr){switch(Ct=+Ct,Sr=+Sr,this._point){case 0:this._point=1,this._x3=Ct,this._y3=Sr;break;case 1:this._point=2,this._context.moveTo(this._x4=Ct,this._y4=Sr);break;case 2:this._point=3,this._x5=Ct,this._y5=Sr;break;default:We(this,Ct,Sr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Sr}};var Kt=function Ct(Sr){function Jr(hi){return new At(hi,Sr)}return Jr.tension=function(hi){return Ct(+hi)},Jr}(0);function Qt(Ct,Sr){this._context=Ct,this._k=(1-Sr)/6}Qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ct,Sr){switch(Ct=+Ct,Sr=+Sr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:We(this,Ct,Sr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Sr}};var Mr=function Ct(Sr){function Jr(hi){return new Qt(hi,Sr)}return Jr.tension=function(hi){return Ct(+hi)},Jr}(0);function Gr(Ct,Sr,Jr){var hi=Ct._x1,hn=Ct._y1,Sn=Ct._x2,En=Ct._y2;if(Ct._l01_a>c){var ki=2*Ct._l01_2a+3*Ct._l01_a*Ct._l12_a+Ct._l12_2a,_n=3*Ct._l01_a*(Ct._l01_a+Ct._l12_a);hi=(hi*ki-Ct._x0*Ct._l12_2a+Ct._x2*Ct._l01_2a)/_n,hn=(hn*ki-Ct._y0*Ct._l12_2a+Ct._y2*Ct._l01_2a)/_n}if(Ct._l23_a>c){var ya=2*Ct._l23_2a+3*Ct._l23_a*Ct._l12_a+Ct._l12_2a,ea=3*Ct._l23_a*(Ct._l23_a+Ct._l12_a);Sn=(Sn*ya+Ct._x1*Ct._l23_2a-Sr*Ct._l12_2a)/ea,En=(En*ya+Ct._y1*Ct._l23_2a-Jr*Ct._l12_2a)/ea}Ct._context.bezierCurveTo(hi,hn,Sn,En,Ct._x2,Ct._y2)}function Ir(Ct,Sr){this._context=Ct,this._alpha=Sr}Ir.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ct,Sr){if(Ct=+Ct,Sr=+Sr,this._point){var Jr=this._x2-Ct,hi=this._y2-Sr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+hi*hi,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ct,Sr):this._context.moveTo(Ct,Sr);break;case 1:this._point=2;break;case 2:this._point=3;default:Gr(this,Ct,Sr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Sr}};var Yr=function Ct(Sr){function Jr(hi){return Sr?new Ir(hi,Sr):new et(hi,0)}return Jr.alpha=function(hi){return Ct(+hi)},Jr}(.5);function _i(Ct,Sr){this._context=Ct,this._alpha=Sr}_i.prototype={areaStart:jt,areaEnd:jt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(Ct,Sr){if(Ct=+Ct,Sr=+Sr,this._point){var Jr=this._x2-Ct,hi=this._y2-Sr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+hi*hi,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Ct,this._y3=Sr;break;case 1:this._point=2,this._context.moveTo(this._x4=Ct,this._y4=Sr);break;case 2:this._point=3,this._x5=Ct,this._y5=Sr;break;default:Gr(this,Ct,Sr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Sr}};var Pi=function Ct(Sr){function Jr(hi){return Sr?new _i(hi,Sr):new At(hi,0)}return Jr.alpha=function(hi){return Ct(+hi)},Jr}(.5);function ai(Ct,Sr){this._context=Ct,this._alpha=Sr}ai.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ct,Sr){if(Ct=+Ct,Sr=+Sr,this._point){var Jr=this._x2-Ct,hi=this._y2-Sr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+hi*hi,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Gr(this,Ct,Sr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Sr}};var mi=function Ct(Sr){function Jr(hi){return Sr?new ai(hi,Sr):new Qt(hi,0)}return Jr.alpha=function(hi){return Ct(+hi)},Jr}(.5);function un(Ct){this._context=Ct}un.prototype={areaStart:jt,areaEnd:jt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Ct,Sr){Ct=+Ct,Sr=+Sr,this._point?this._context.lineTo(Ct,Sr):(this._point=1,this._context.moveTo(Ct,Sr))}};function Fn(Ct){return new un(Ct)}function An(Ct){return Ct<0?-1:1}function Hn(Ct,Sr,Jr){var hi=Ct._x1-Ct._x0,hn=Sr-Ct._x1,Sn=(Ct._y1-Ct._y0)/(hi||hn<0&&-0),En=(Jr-Ct._y1)/(hn||hi<0&&-0),ki=(Sn*hn+En*hi)/(hi+hn);return(An(Sn)+An(En))*Math.min(Math.abs(Sn),Math.abs(En),.5*Math.abs(ki))||0}function Qn(Ct,Sr){var Jr=Ct._x1-Ct._x0;return Jr?(3*(Ct._y1-Ct._y0)/Jr-Sr)/2:Sr}function Vi(Ct,Sr,Jr){var hi=Ct._x0,hn=Ct._y0,Sn=Ct._x1,En=Ct._y1,ki=(Sn-hi)/3;Ct._context.bezierCurveTo(hi+ki,hn+ki*Sr,Sn-ki,En-ki*Jr,Sn,En)}function Kn(Ct){this._context=Ct}Kn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Vi(this,this._t0,Qn(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ct,Sr){var Jr=NaN;if(Ct=+Ct,Sr=+Sr,!(Ct===this._x1&&Sr===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ct,Sr):this._context.moveTo(Ct,Sr);break;case 1:this._point=2;break;case 2:this._point=3,Vi(this,Qn(this,Jr=Hn(this,Ct,Sr)),Jr);break;default:Vi(this,this._t0,Jr=Hn(this,Ct,Sr));break}this._x0=this._x1,this._x1=Ct,this._y0=this._y1,this._y1=Sr,this._t0=Jr}}};function Jn(Ct){this._context=new Gt(Ct)}(Jn.prototype=Object.create(Kn.prototype)).point=function(Ct,Sr){Kn.prototype.point.call(this,Sr,Ct)};function Gt(Ct){this._context=Ct}Gt.prototype={moveTo:function(Ct,Sr){this._context.moveTo(Sr,Ct)},closePath:function(){this._context.closePath()},lineTo:function(Ct,Sr){this._context.lineTo(Sr,Ct)},bezierCurveTo:function(Ct,Sr,Jr,hi,hn,Sn){this._context.bezierCurveTo(Sr,Ct,hi,Jr,Sn,hn)}};function wt(Ct){return new Kn(Ct)}function tr(Ct){return new Jn(Ct)}function ir(Ct){this._context=Ct}ir.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Ct=this._x,Sr=this._y,Jr=Ct.length;if(Jr)if(this._line?this._context.lineTo(Ct[0],Sr[0]):this._context.moveTo(Ct[0],Sr[0]),Jr===2)this._context.lineTo(Ct[1],Sr[1]);else for(var hi=wr(Ct),hn=wr(Sr),Sn=0,En=1;En=0;--Sr)hn[Sr]=(En[Sr]-hn[Sr+1])/Sn[Sr];for(Sn[Jr-1]=(Ct[Jr]+hn[Jr-1])/2,Sr=0;Sr=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Ct,Sr){switch(Ct=+Ct,Sr=+Sr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ct,Sr):this._context.moveTo(Ct,Sr);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Sr),this._context.lineTo(Ct,Sr);else{var Jr=this._x*(1-this._t)+Ct*this._t;this._context.lineTo(Jr,this._y),this._context.lineTo(Jr,Sr)}break}}this._x=Ct,this._y=Sr}};function $r(Ct){return new ti(Ct,.5)}function Ri(Ct){return new ti(Ct,0)}function Zi(Ct){return new ti(Ct,1)}function en(Ct,Sr){if((En=Ct.length)>1)for(var Jr=1,hi,hn,Sn=Ct[Sr[0]],En,ki=Sn.length;Jr=0;)Jr[Sr]=Sr;return Jr}function yn(Ct,Sr){return Ct[Sr]}function Mn(){var Ct=r([]),Sr=fn,Jr=en,hi=yn;function hn(Sn){var En=Ct.apply(this,arguments),ki,_n=Sn.length,ya=En.length,ea=new Array(ya),Ma;for(ki=0;ki0){for(var Jr,hi,hn=0,Sn=Ct[0].length,En;hn0)for(var Jr,hi=0,hn,Sn,En,ki,_n,ya=Ct[Sr[0]].length;hi0?(hn[0]=En,hn[1]=En+=Sn):Sn<0?(hn[1]=ki,hn[0]=ki+=Sn):(hn[0]=0,hn[1]=Sn)}function ma(Ct,Sr){if((hn=Ct.length)>0){for(var Jr=0,hi=Ct[Sr[0]],hn,Sn=hi.length;Jr0)||!((Sn=(hn=Ct[Sr[0]]).length)>0))){for(var Jr=0,hi=1,hn,Sn,En;hiSn&&(Sn=hn,Jr=Sr);return Jr}function da(Ct){var Sr=Ct.map(jn);return fn(Ct).sort(function(Jr,hi){return Sr[Jr]-Sr[hi]})}function jn(Ct){for(var Sr=0,Jr=-1,hi=Ct.length,hn;++Jr{(function(e,t){typeof P7=="object"&&typeof $We!="undefined"?t(P7,dk(),S7(),QJ()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3)})(P7,function(e,t,r,n){"use strict";function i(g){return g.target.depth}function a(g){return g.depth}function o(g,P){return P-1-g.height}function s(g,P){return g.sourceLinks.length?g.depth:P-1}function l(g){return g.targetLinks.length?g.depth:g.sourceLinks.length?t.min(g.sourceLinks,i)-1:0}function u(g){return function(){return g}}function c(g,P){return h(g.source,P.source)||g.index-P.index}function f(g,P){return h(g.target,P.target)||g.index-P.index}function h(g,P){return g.y0-P.y0}function d(g){return g.value}function v(g){return(g.y0+g.y1)/2}function m(g){return v(g.source)*g.value}function b(g){return v(g.target)*g.value}function p(g){return g.index}function k(g){return g.nodes}function M(g){return g.links}function T(g,P){var E=g.get(P);if(!E)throw new Error("missing: "+P);return E}var L=function(){var g=0,P=0,E=1,z=1,q=24,V=8,G=p,Z=s,j=k,N=M,H=32,ie=2/3;function ae(){var Se={nodes:j.apply(null,arguments),links:N.apply(null,arguments)};return _e(Se),Ee(Se),Ce(Se),ge(Se,H),re(Se),Se}ae.update=function(Se){return re(Se),Se},ae.nodeId=function(Se){return arguments.length?(G=typeof Se=="function"?Se:u(Se),ae):G},ae.nodeAlign=function(Se){return arguments.length?(Z=typeof Se=="function"?Se:u(Se),ae):Z},ae.nodeWidth=function(Se){return arguments.length?(q=+Se,ae):q},ae.nodePadding=function(Se){return arguments.length?(V=+Se,ae):V},ae.nodes=function(Se){return arguments.length?(j=typeof Se=="function"?Se:u(Se),ae):j},ae.links=function(Se){return arguments.length?(N=typeof Se=="function"?Se:u(Se),ae):N},ae.size=function(Se){return arguments.length?(g=P=0,E=+Se[0],z=+Se[1],ae):[E-g,z-P]},ae.extent=function(Se){return arguments.length?(g=+Se[0][0],E=+Se[1][0],P=+Se[0][1],z=+Se[1][1],ae):[[g,P],[E,z]]},ae.iterations=function(Se){return arguments.length?(H=+Se,ae):H};function _e(Se){Se.nodes.forEach(function(be,Be){be.index=Be,be.sourceLinks=[],be.targetLinks=[]});var ke=r.map(Se.nodes,G);Se.links.forEach(function(be,Be){be.index=Be;var Le=be.source,me=be.target;typeof Le!="object"&&(Le=be.source=T(ke,Le)),typeof me!="object"&&(me=be.target=T(ke,me)),Le.sourceLinks.push(be),me.targetLinks.push(be)})}function Ee(Se){Se.nodes.forEach(function(ke){ke.value=Math.max(t.sum(ke.sourceLinks,d),t.sum(ke.targetLinks,d))})}function Ce(Se){var ke,be,Be;for(ke=Se.nodes,be=[],Be=0;ke.length;++Be,ke=be,be=[])ke.forEach(function(me){me.depth=Be,me.sourceLinks.forEach(function(Pe){be.indexOf(Pe.target)<0&&be.push(Pe.target)})});for(ke=Se.nodes,be=[],Be=0;ke.length;++Be,ke=be,be=[])ke.forEach(function(me){me.height=Be,me.targetLinks.forEach(function(Pe){be.indexOf(Pe.source)<0&&be.push(Pe.source)})});var Le=(E-g-q)/(Be-1);Se.nodes.forEach(function(me){me.x1=(me.x0=g+Math.max(0,Math.min(Be-1,Math.floor(Z.call(null,me,Be))))*Le)+q})}function ge(Se){var ke=r.nest().key(function(He){return He.x0}).sortKeys(t.ascending).entries(Se.nodes).map(function(He){return He.values});Le(),ce();for(var be=1,Be=H;Be>0;--Be)Pe(be*=.99),ce(),me(be),ce();function Le(){var He=t.max(ke,function(Ht){return Ht.length}),lt=ie*(z-P)/(He-1);V>lt&&(V=lt);var mt=t.min(ke,function(Ht){return(z-P-(Ht.length-1)*V)/t.sum(Ht,d)});ke.forEach(function(Ht){Ht.forEach(function(at,ct){at.y1=(at.y0=ct)+at.value*mt})}),Se.links.forEach(function(Ht){Ht.width=Ht.value*mt})}function me(He){ke.forEach(function(lt){lt.forEach(function(mt){if(mt.targetLinks.length){var Ht=(t.sum(mt.targetLinks,m)/t.sum(mt.targetLinks,d)-v(mt))*He;mt.y0+=Ht,mt.y1+=Ht}})})}function Pe(He){ke.slice().reverse().forEach(function(lt){lt.forEach(function(mt){if(mt.sourceLinks.length){var Ht=(t.sum(mt.sourceLinks,b)/t.sum(mt.sourceLinks,d)-v(mt))*He;mt.y0+=Ht,mt.y1+=Ht}})})}function ce(){ke.forEach(function(He){var lt,mt,Ht=P,at=He.length,ct;for(He.sort(h),ct=0;ct0&&(lt.y0+=mt,lt.y1+=mt),Ht=lt.y1+V;if(mt=Ht-V-z,mt>0)for(Ht=lt.y0-=mt,lt.y1-=mt,ct=at-2;ct>=0;--ct)lt=He[ct],mt=lt.y1+V-Ht,mt>0&&(lt.y0-=mt,lt.y1-=mt),Ht=lt.y0})}}function re(Se){Se.nodes.forEach(function(ke){ke.sourceLinks.sort(f),ke.targetLinks.sort(c)}),Se.nodes.forEach(function(ke){var be=ke.y0,Be=be;ke.sourceLinks.forEach(function(Le){Le.y0=be+Le.width/2,be+=Le.width}),ke.targetLinks.forEach(function(Le){Le.y1=Be+Le.width/2,Be+=Le.width})})}return ae};function x(g){return[g.source.x1,g.y0]}function C(g){return[g.target.x0,g.y1]}var S=function(){return n.linkHorizontal().source(x).target(C)};e.sankey=L,e.sankeyCenter=l,e.sankeyLeft=a,e.sankeyRight=o,e.sankeyJustify=s,e.sankeyLinkHorizontal=S,Object.defineProperty(e,"__esModule",{value:!0})})});var tXe=ye((w2r,eXe)=>{var rYt=$J();eXe.exports=function(t,r){var n=[],i=[],a=[],o={},s=[],l;function u(M){a[M]=!1,o.hasOwnProperty(M)&&Object.keys(o[M]).forEach(function(T){delete o[M][T],a[T]&&u(T)})}function c(M){var T=!1;i.push(M),a[M]=!0;var L,x;for(L=0;L=M})}function d(M){h(M);for(var T=t,L=rYt(T),x=L.components.filter(function(q){return q.length>1}),C=1/0,S,g=0;g{(function(e,t){typeof I7=="object"&&typeof rXe!="undefined"?t(I7,dk(),S7(),QJ(),tXe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(I7,function(e,t,r,n,i){"use strict";i=i&&i.hasOwnProperty("default")?i.default:i;function a(at){return at.target.depth}function o(at){return at.depth}function s(at,ct){return ct-1-at.height}function l(at,ct){return at.sourceLinks.length?at.depth:ct-1}function u(at){return at.targetLinks.length?at.depth:at.sourceLinks.length?t.min(at.sourceLinks,a)-1:0}function c(at){return function(){return at}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(at){return typeof at}:function(at){return at&&typeof Symbol=="function"&&at.constructor===Symbol&&at!==Symbol.prototype?"symbol":typeof at};function h(at,ct){return v(at.source,ct.source)||at.index-ct.index}function d(at,ct){return v(at.target,ct.target)||at.index-ct.index}function v(at,ct){return at.partOfCycle===ct.partOfCycle?at.y0-ct.y0:at.circularLinkType==="top"||ct.circularLinkType==="bottom"?-1:1}function m(at){return at.value}function b(at){return(at.y0+at.y1)/2}function p(at){return b(at.source)}function k(at){return b(at.target)}function M(at){return at.index}function T(at){return at.nodes}function L(at){return at.links}function x(at,ct){var ar=at.get(ct);if(!ar)throw new Error("missing: "+ct);return ar}function C(at,ct){return ct(at)}var S=25,g=10,P=.3;function E(){var at=0,ct=0,ar=1,Vt=1,rr=24,tt,je=M,Ue=l,Ae=T,rt=L,St=32,Tt=2,dt,Et=null;function pt(){var gt={nodes:Ae.apply(null,arguments),links:rt.apply(null,arguments)};jt(gt),z(gt,je,Et),or(gt),ei(gt),q(gt,je),qr(gt,St,je),jr(gt);for(var Ge=4,Je=0;Je0?Ge+S+g:Ge,Je=Je>0?Je+S+g:Je,We=We>0?We+S+g:We,et=et>0?et+S+g:et,{top:Ge,bottom:Je,left:et,right:We}}function Ar(gt,Ge){var Je=t.max(gt.nodes,function(Mr){return Mr.column}),We=ar-at,et=Vt-ct,xt=We+Ge.right+Ge.left,At=et+Ge.top+Ge.bottom,Kt=We/xt,Qt=et/At;return at=at*Kt+Ge.left,ar=Ge.right==0?ar:ar*Kt,ct=ct*Qt+Ge.top,Vt=Vt*Qt,gt.nodes.forEach(function(Mr){Mr.x0=at+Mr.column*((ar-at-rr)/Je),Mr.x1=Mr.x0+rr}),Qt}function ei(gt){var Ge,Je,We;for(Ge=gt.nodes,Je=[],We=0;Ge.length;++We,Ge=Je,Je=[])Ge.forEach(function(et){et.depth=We,et.sourceLinks.forEach(function(xt){Je.indexOf(xt.target)<0&&!xt.circular&&Je.push(xt.target)})});for(Ge=gt.nodes,Je=[],We=0;Ge.length;++We,Ge=Je,Je=[])Ge.forEach(function(et){et.height=We,et.targetLinks.forEach(function(xt){Je.indexOf(xt.source)<0&&!xt.circular&&Je.push(xt.source)})});gt.nodes.forEach(function(et){et.column=Math.floor(Ue.call(null,et,We))})}function qr(gt,Ge,Je){var We=r.nest().key(function(Mr){return Mr.column}).sortKeys(t.ascending).entries(gt.nodes).map(function(Mr){return Mr.values});At(Je),Qt();for(var et=1,xt=Ge;xt>0;--xt)Kt(et*=.99,Je),Qt();function At(Mr){if(dt){var Gr=1/0;We.forEach(function(Pi){var ai=Vt*dt/(Pi.length+1);Gr=ai0))if(Pi==0&&_i==1)mi=ai.y1-ai.y0,ai.y0=Vt/2-mi/2,ai.y1=Vt/2+mi/2;else if(Pi==Ir-1&&_i==1)mi=ai.y1-ai.y0,ai.y0=Vt/2-mi/2,ai.y1=Vt/2+mi/2;else{var un=0,Fn=t.mean(ai.sourceLinks,k),An=t.mean(ai.targetLinks,p);Fn&&An?un=(Fn+An)/2:un=Fn||An;var Hn=(un-b(ai))*Mr;ai.y0+=Hn,ai.y1+=Hn}})})}function Qt(){We.forEach(function(Mr){var Gr,Ir,Yr=ct,_i=Mr.length,Pi;for(Mr.sort(v),Pi=0;Pi<_i;++Pi)Gr=Mr[Pi],Ir=Yr-Gr.y0,Ir>0&&(Gr.y0+=Ir,Gr.y1+=Ir),Yr=Gr.y1+tt;if(Ir=Yr-tt-Vt,Ir>0)for(Yr=Gr.y0-=Ir,Gr.y1-=Ir,Pi=_i-2;Pi>=0;--Pi)Gr=Mr[Pi],Ir=Gr.y1+tt-Yr,Ir>0&&(Gr.y0-=Ir,Gr.y1-=Ir),Yr=Gr.y0})}}function jr(gt){gt.nodes.forEach(function(Ge){Ge.sourceLinks.sort(d),Ge.targetLinks.sort(h)}),gt.nodes.forEach(function(Ge){var Je=Ge.y0,We=Je,et=Ge.y1,xt=et;Ge.sourceLinks.forEach(function(At){At.circular?(At.y0=et-At.width/2,et=et-At.width):(At.y0=Je+At.width/2,Je+=At.width)}),Ge.targetLinks.forEach(function(At){At.circular?(At.y1=xt-At.width/2,xt=xt-At.width):(At.y1=We+At.width/2,We+=At.width)})})}return pt}function z(at,ct,ar){var Vt=0;if(ar===null){for(var rr=[],tt=0;ttct.source.column)}function Z(at,ct){var ar=0;at.sourceLinks.forEach(function(rr){ar=rr.circular&&!mt(rr,ct)?ar+1:ar});var Vt=0;return at.targetLinks.forEach(function(rr){Vt=rr.circular&&!mt(rr,ct)?Vt+1:Vt}),ar+Vt}function j(at){var ct=at.source.sourceLinks,ar=0;ct.forEach(function(tt){ar=tt.circular?ar+1:ar});var Vt=at.target.targetLinks,rr=0;return Vt.forEach(function(tt){rr=tt.circular?rr+1:rr}),!(ar>1||rr>1)}function N(at,ct,ar){return at.sort(ae),at.forEach(function(Vt,rr){var tt=0;if(mt(Vt,ar)&&j(Vt))Vt.circularPathData.verticalBuffer=tt+Vt.width/2;else{var je=0;for(je;jett?Ue:tt}Vt.circularPathData.verticalBuffer=tt+Vt.width/2}}),at}function H(at,ct,ar,Vt){var rr=5,tt=t.min(at.links,function(Ae){return Ae.source.y0});at.links.forEach(function(Ae){Ae.circular&&(Ae.circularPathData={})});var je=at.links.filter(function(Ae){return Ae.circularLinkType=="top"});N(je,ct,Vt);var Ue=at.links.filter(function(Ae){return Ae.circularLinkType=="bottom"});N(Ue,ct,Vt),at.links.forEach(function(Ae){if(Ae.circular){if(Ae.circularPathData.arcRadius=Ae.width+g,Ae.circularPathData.leftNodeBuffer=rr,Ae.circularPathData.rightNodeBuffer=rr,Ae.circularPathData.sourceWidth=Ae.source.x1-Ae.source.x0,Ae.circularPathData.sourceX=Ae.source.x0+Ae.circularPathData.sourceWidth,Ae.circularPathData.targetX=Ae.target.x0,Ae.circularPathData.sourceY=Ae.y0,Ae.circularPathData.targetY=Ae.y1,mt(Ae,Vt)&&j(Ae))Ae.circularPathData.leftSmallArcRadius=g+Ae.width/2,Ae.circularPathData.leftLargeArcRadius=g+Ae.width/2,Ae.circularPathData.rightSmallArcRadius=g+Ae.width/2,Ae.circularPathData.rightLargeArcRadius=g+Ae.width/2,Ae.circularLinkType=="bottom"?(Ae.circularPathData.verticalFullExtent=Ae.source.y1+S+Ae.circularPathData.verticalBuffer,Ae.circularPathData.verticalLeftInnerExtent=Ae.circularPathData.verticalFullExtent-Ae.circularPathData.leftLargeArcRadius,Ae.circularPathData.verticalRightInnerExtent=Ae.circularPathData.verticalFullExtent-Ae.circularPathData.rightLargeArcRadius):(Ae.circularPathData.verticalFullExtent=Ae.source.y0-S-Ae.circularPathData.verticalBuffer,Ae.circularPathData.verticalLeftInnerExtent=Ae.circularPathData.verticalFullExtent+Ae.circularPathData.leftLargeArcRadius,Ae.circularPathData.verticalRightInnerExtent=Ae.circularPathData.verticalFullExtent+Ae.circularPathData.rightLargeArcRadius);else{var rt=Ae.source.column,St=Ae.circularLinkType,Tt=at.links.filter(function(pt){return pt.source.column==rt&&pt.circularLinkType==St});Ae.circularLinkType=="bottom"?Tt.sort(Ee):Tt.sort(_e);var dt=0;Tt.forEach(function(pt,jt){pt.circularLinkID==Ae.circularLinkID&&(Ae.circularPathData.leftSmallArcRadius=g+Ae.width/2+dt,Ae.circularPathData.leftLargeArcRadius=g+Ae.width/2+jt*ct+dt),dt=dt+pt.width}),rt=Ae.target.column,Tt=at.links.filter(function(pt){return pt.target.column==rt&&pt.circularLinkType==St}),Ae.circularLinkType=="bottom"?Tt.sort(ge):Tt.sort(Ce),dt=0,Tt.forEach(function(pt,jt){pt.circularLinkID==Ae.circularLinkID&&(Ae.circularPathData.rightSmallArcRadius=g+Ae.width/2+dt,Ae.circularPathData.rightLargeArcRadius=g+Ae.width/2+jt*ct+dt),dt=dt+pt.width}),Ae.circularLinkType=="bottom"?(Ae.circularPathData.verticalFullExtent=Math.max(ar,Ae.source.y1,Ae.target.y1)+S+Ae.circularPathData.verticalBuffer,Ae.circularPathData.verticalLeftInnerExtent=Ae.circularPathData.verticalFullExtent-Ae.circularPathData.leftLargeArcRadius,Ae.circularPathData.verticalRightInnerExtent=Ae.circularPathData.verticalFullExtent-Ae.circularPathData.rightLargeArcRadius):(Ae.circularPathData.verticalFullExtent=tt-S-Ae.circularPathData.verticalBuffer,Ae.circularPathData.verticalLeftInnerExtent=Ae.circularPathData.verticalFullExtent+Ae.circularPathData.leftLargeArcRadius,Ae.circularPathData.verticalRightInnerExtent=Ae.circularPathData.verticalFullExtent+Ae.circularPathData.rightLargeArcRadius)}Ae.circularPathData.leftInnerExtent=Ae.circularPathData.sourceX+Ae.circularPathData.leftNodeBuffer,Ae.circularPathData.rightInnerExtent=Ae.circularPathData.targetX-Ae.circularPathData.rightNodeBuffer,Ae.circularPathData.leftFullExtent=Ae.circularPathData.sourceX+Ae.circularPathData.leftLargeArcRadius+Ae.circularPathData.leftNodeBuffer,Ae.circularPathData.rightFullExtent=Ae.circularPathData.targetX-Ae.circularPathData.rightLargeArcRadius-Ae.circularPathData.rightNodeBuffer}if(Ae.circular)Ae.path=ie(Ae);else{var Et=n.linkHorizontal().source(function(pt){var jt=pt.source.x0+(pt.source.x1-pt.source.x0),or=pt.y0;return[jt,or]}).target(function(pt){var jt=pt.target.x0,or=pt.y1;return[jt,or]});Ae.path=Et(Ae)}})}function ie(at){var ct="";return at.circularLinkType=="top"?ct="M"+at.circularPathData.sourceX+" "+at.circularPathData.sourceY+" L"+at.circularPathData.leftInnerExtent+" "+at.circularPathData.sourceY+" A"+at.circularPathData.leftLargeArcRadius+" "+at.circularPathData.leftSmallArcRadius+" 0 0 0 "+at.circularPathData.leftFullExtent+" "+(at.circularPathData.sourceY-at.circularPathData.leftSmallArcRadius)+" L"+at.circularPathData.leftFullExtent+" "+at.circularPathData.verticalLeftInnerExtent+" A"+at.circularPathData.leftLargeArcRadius+" "+at.circularPathData.leftLargeArcRadius+" 0 0 0 "+at.circularPathData.leftInnerExtent+" "+at.circularPathData.verticalFullExtent+" L"+at.circularPathData.rightInnerExtent+" "+at.circularPathData.verticalFullExtent+" A"+at.circularPathData.rightLargeArcRadius+" "+at.circularPathData.rightLargeArcRadius+" 0 0 0 "+at.circularPathData.rightFullExtent+" "+at.circularPathData.verticalRightInnerExtent+" L"+at.circularPathData.rightFullExtent+" "+(at.circularPathData.targetY-at.circularPathData.rightSmallArcRadius)+" A"+at.circularPathData.rightLargeArcRadius+" "+at.circularPathData.rightSmallArcRadius+" 0 0 0 "+at.circularPathData.rightInnerExtent+" "+at.circularPathData.targetY+" L"+at.circularPathData.targetX+" "+at.circularPathData.targetY:ct="M"+at.circularPathData.sourceX+" "+at.circularPathData.sourceY+" L"+at.circularPathData.leftInnerExtent+" "+at.circularPathData.sourceY+" A"+at.circularPathData.leftLargeArcRadius+" "+at.circularPathData.leftSmallArcRadius+" 0 0 1 "+at.circularPathData.leftFullExtent+" "+(at.circularPathData.sourceY+at.circularPathData.leftSmallArcRadius)+" L"+at.circularPathData.leftFullExtent+" "+at.circularPathData.verticalLeftInnerExtent+" A"+at.circularPathData.leftLargeArcRadius+" "+at.circularPathData.leftLargeArcRadius+" 0 0 1 "+at.circularPathData.leftInnerExtent+" "+at.circularPathData.verticalFullExtent+" L"+at.circularPathData.rightInnerExtent+" "+at.circularPathData.verticalFullExtent+" A"+at.circularPathData.rightLargeArcRadius+" "+at.circularPathData.rightLargeArcRadius+" 0 0 1 "+at.circularPathData.rightFullExtent+" "+at.circularPathData.verticalRightInnerExtent+" L"+at.circularPathData.rightFullExtent+" "+(at.circularPathData.targetY+at.circularPathData.rightSmallArcRadius)+" A"+at.circularPathData.rightLargeArcRadius+" "+at.circularPathData.rightSmallArcRadius+" 0 0 1 "+at.circularPathData.rightInnerExtent+" "+at.circularPathData.targetY+" L"+at.circularPathData.targetX+" "+at.circularPathData.targetY,ct}function ae(at,ct){return re(at)==re(ct)?at.circularLinkType=="bottom"?Ee(at,ct):_e(at,ct):re(ct)-re(at)}function _e(at,ct){return at.y0-ct.y0}function Ee(at,ct){return ct.y0-at.y0}function Ce(at,ct){return at.y1-ct.y1}function ge(at,ct){return ct.y1-at.y1}function re(at){return at.target.column-at.source.column}function Se(at){return at.target.x0-at.source.x1}function ke(at,ct){var ar=V(at),Vt=Se(ct)/Math.tan(ar),rr=lt(at)=="up"?at.y1+Vt:at.y1-Vt;return rr}function be(at,ct){var ar=V(at),Vt=Se(ct)/Math.tan(ar),rr=lt(at)=="up"?at.y1-Vt:at.y1+Vt;return rr}function Be(at,ct,ar,Vt){at.links.forEach(function(rr){if(!rr.circular&&rr.target.column-rr.source.column>1){var tt=rr.source.column+1,je=rr.target.column-1,Ue=1,Ae=je-tt+1;for(Ue=1;tt<=je;tt++,Ue++)at.nodes.forEach(function(rt){if(rt.column==tt){var St=Ue/(Ae+1),Tt=Math.pow(1-St,3),dt=3*St*Math.pow(1-St,2),Et=3*Math.pow(St,2)*(1-St),pt=Math.pow(St,3),jt=Tt*rr.y0+dt*rr.y0+Et*rr.y1+pt*rr.y1,or=jt-rr.width/2,mr=jt+rr.width/2,Ar;or>rt.y0&&orrt.y0&&mrrt.y1&&me(ei,Ar,ct,ar)})):orrt.y1&&(Ar=mr-rt.y0+10,rt=me(rt,Ar,ct,ar),at.nodes.forEach(function(ei){C(ei,Vt)==C(rt,Vt)||ei.column!=rt.column||ei.y0rt.y1&&me(ei,Ar,ct,ar)}))}})}})}function Le(at,ct){return at.y0>ct.y0&&at.y0ct.y0&&at.y1ct.y1}function me(at,ct,ar,Vt){return at.y0+ct>=ar&&at.y1+ct<=Vt&&(at.y0=at.y0+ct,at.y1=at.y1+ct,at.targetLinks.forEach(function(rr){rr.y1=rr.y1+ct}),at.sourceLinks.forEach(function(rr){rr.y0=rr.y0+ct})),at}function Pe(at,ct,ar,Vt){at.nodes.forEach(function(rr){Vt&&rr.y+(rr.y1-rr.y0)>ct&&(rr.y=rr.y-(rr.y+(rr.y1-rr.y0)-ct));var tt=at.links.filter(function(Ae){return C(Ae.source,ar)==C(rr,ar)}),je=tt.length;je>1&&tt.sort(function(Ae,rt){if(!Ae.circular&&!rt.circular){if(Ae.target.column==rt.target.column)return Ae.y1-rt.y1;if(He(Ae,rt)){if(Ae.target.column>rt.target.column){var St=be(rt,Ae);return Ae.y1-St}if(rt.target.column>Ae.target.column){var Tt=be(Ae,rt);return Tt-rt.y1}}else return Ae.y1-rt.y1}if(Ae.circular&&!rt.circular)return Ae.circularLinkType=="top"?-1:1;if(rt.circular&&!Ae.circular)return rt.circularLinkType=="top"?1:-1;if(Ae.circular&&rt.circular)return Ae.circularLinkType===rt.circularLinkType&&Ae.circularLinkType=="top"?Ae.target.column===rt.target.column?Ae.target.y1-rt.target.y1:rt.target.column-Ae.target.column:Ae.circularLinkType===rt.circularLinkType&&Ae.circularLinkType=="bottom"?Ae.target.column===rt.target.column?rt.target.y1-Ae.target.y1:Ae.target.column-rt.target.column:Ae.circularLinkType=="top"?-1:1});var Ue=rr.y0;tt.forEach(function(Ae){Ae.y0=Ue+Ae.width/2,Ue=Ue+Ae.width}),tt.forEach(function(Ae,rt){if(Ae.circularLinkType=="bottom"){var St=rt+1,Tt=0;for(St;St1&&rr.sort(function(Ue,Ae){if(!Ue.circular&&!Ae.circular){if(Ue.source.column==Ae.source.column)return Ue.y0-Ae.y0;if(He(Ue,Ae)){if(Ae.source.column0?"up":"down"}function mt(at,ct){return C(at.source,ct)==C(at.target,ct)}function Ht(at,ct,ar){var Vt=at.nodes,rr=at.links,tt=!1,je=!1;if(rr.forEach(function(dt){dt.circularLinkType=="top"?tt=!0:dt.circularLinkType=="bottom"&&(je=!0)}),tt==!1||je==!1){var Ue=t.min(Vt,function(dt){return dt.y0}),Ae=t.max(Vt,function(dt){return dt.y1}),rt=Ae-Ue,St=ar-ct,Tt=St/rt;Vt.forEach(function(dt){var Et=(dt.y1-dt.y0)*Tt;dt.y0=(dt.y0-Ue)*Tt,dt.y1=dt.y0+Et}),rr.forEach(function(dt){dt.y0=(dt.y0-Ue)*Tt,dt.y1=(dt.y1-Ue)*Tt,dt.width=dt.width*Tt})}}e.sankeyCircular=E,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,"__esModule",{value:!0})})});var e$=ye((T2r,nXe)=>{"use strict";nXe.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"}}});var mXe=ye((A2r,gXe)=>{"use strict";var aXe=ZWe(),iYt=(j2(),gb(H2)).interpolateNumber,O5=qa(),oC=QWe(),nYt=iXe(),Nu=e$(),B5=fd(),yw=ka(),aYt=So(),w1=Pr(),i$=w1.strTranslate,oYt=w1.strRotate,n$=ny(),sC=n$.keyFun,R7=n$.repeat,fXe=n$.unwrap,oXe=Zl(),sYt=Oa(),hXe=Dh(),lYt=hXe.CAP_SHIFT,uYt=hXe.LINE_SPACING,cYt=3;function fYt(e,t,r){var n=fXe(t),i=n.trace,a=i.domain,o=i.orientation==="h",s=i.node.pad,l=i.node.thickness,u={justify:oC.sankeyJustify,left:oC.sankeyLeft,right:oC.sankeyRight,center:oC.sankeyCenter}[i.node.align],c=e.width*(a.x[1]-a.x[0]),f=e.height*(a.y[1]-a.y[0]),h=n._nodes,d=n._links,v=n.circular,m;v?m=nYt.sankeyCircular().circularLinkGap(0):m=oC.sankey(),m.iterations(Nu.sankeyIterations).size(o?[c,f]:[f,c]).nodeWidth(l).nodePadding(s).nodeId(function(V){return V.pointNumber}).nodeAlign(u).nodes(h).links(d);var b=m();m.nodePadding()=N||(j=N-Z.y0,j>1e-6&&(Z.y0+=j,Z.y1+=j)),N=Z.y1+s})}function P(V){var G=V.map(function(_e,Ee){return{x0:_e.x0,index:Ee}}).sort(function(_e,Ee){return _e.x0-Ee.x0}),Z=[],j=-1,N,H=-1/0,ie;for(p=0;pH+l&&(j+=1,N=ae.x0),H=ae.x0,Z[j]||(Z[j]=[]),Z[j].push(ae),ie=N-ae.x0,ae.x0+=ie,ae.x1+=ie}return Z}if(i.node.x.length&&i.node.y.length){for(p=0;p0?" L "+i.targetX+" "+i.targetY:"")+"Z"):(r="M "+(i.targetX-t)+" "+(i.targetY-n)+" L "+(i.rightInnerExtent-t)+" "+(i.targetY-n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightSmallArcRadius+n)+" 0 0 0 "+(i.rightFullExtent-n-t)+" "+(i.targetY+i.rightSmallArcRadius)+" L "+(i.rightFullExtent-n-t)+" "+i.verticalRightInnerExtent,a&&o?r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightInnerExtent-n-t)+" "+(i.verticalFullExtent+n)+" L "+(i.rightFullExtent+n-t-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent+n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent:a?r+=" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightFullExtent-t-n-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" L "+(i.leftFullExtent+n+(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent:r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightInnerExtent-t)+" "+(i.verticalFullExtent+n)+" L "+i.leftInnerExtent+" "+(i.verticalFullExtent+n)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent,r+=" L "+(i.leftFullExtent+n)+" "+(i.sourceY+i.leftSmallArcRadius)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 0 "+i.leftInnerExtent+" "+(i.sourceY-n)+" L "+i.sourceX+" "+(i.sourceY-n)+" L "+i.sourceX+" "+(i.sourceY+n)+" L "+i.leftInnerExtent+" "+(i.sourceY+n)+" A "+(i.leftLargeArcRadius-n)+" "+(i.leftSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n)+" "+(i.sourceY+i.leftSmallArcRadius)+" L "+(i.leftFullExtent-n)+" "+i.verticalLeftInnerExtent,a&&o?r+=" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" L "+(i.rightFullExtent+n-t+(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent:a?r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+(i.verticalFullExtent+n)+" L "+(i.rightFullExtent-t-n)+" "+(i.verticalFullExtent+n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent:r+=" A "+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 1 "+i.leftInnerExtent+" "+(i.verticalFullExtent-n)+" L "+(i.rightInnerExtent-t)+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent,r+=" L "+(i.rightFullExtent+n-t)+" "+(i.targetY+i.rightSmallArcRadius)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightInnerExtent-t)+" "+(i.targetY+n)+" L "+(i.targetX-t)+" "+(i.targetY+n)+(t>0?" L "+i.targetX+" "+i.targetY:"")+"Z"),r}function a$(){var e=.5;function t(r){var n=r.linkArrowLength;if(r.link.circular)return dYt(r.link,n);var i=Math.abs((r.link.target.x0-r.link.source.x1)/2);n>i&&(n=i);var a=r.link.source.x1,o=r.link.target.x0-n,s=iYt(a,o),l=s(e),u=s(1-e),c=r.link.y0-r.link.width/2,f=r.link.y0+r.link.width/2,h=r.link.y1-r.link.width/2,d=r.link.y1+r.link.width/2,v="M"+a+","+c,m="C"+l+","+c+" "+u+","+h+" "+o+","+h,b="C"+u+","+d+" "+l+","+f+" "+a+","+f,p=n>0?"L"+(o+n)+","+(h+r.link.width/2):"";return p+="L"+o+","+d,v+m+p+b+"Z"}return t}function vYt(e,t){var r=B5(t.color),n=Nu.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var a=t.dx,o=Math.max(.5,t.dy),s="node_"+t.pointNumber;return t.group&&(s=w1.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:s,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:t.originalLayer===1,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:yw.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,s].join("_"),interactionState:e.interactionState,figure:e}}function r$(e){e.attr("transform",function(t){return i$(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function pYt(e){e.call(r$)}function dXe(e,t){e.call(pYt),t.attr("d",a$())}function sXe(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function t$(e){return e.link.width>1||e.linkLineWidth>0}function lXe(e){var t=i$(e.translateX,e.translateY);return t+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function uXe(e,t,r){e.on(".basic",null).on("mouseover.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.hover(this,n,t),n.interactionState.hovered=[this,n])}).on("mousemove.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.follow(this,n),n.interactionState.hovered=[this,n])}).on("mouseout.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.unhover(this,n,t),n.interactionState.hovered=!1)}).on("click.basic",function(n){n.interactionState.hovered&&(r.unhover(this,n,t),n.interactionState.hovered=!1),!n.interactionState.dragInProgress&&!n.partOfGroup&&r.select(this,n,t)})}function gYt(e,t,r,n){var i=O5.behavior.drag().origin(function(a){return{x:a.node.x0+a.visibleWidth/2,y:a.node.y0+a.visibleHeight/2}}).on("dragstart",function(a){if(a.arrangement!=="fixed"&&(w1.ensureSingle(n._fullLayout._infolayer,"g","dragcover",function(s){n._fullLayout._dragCover=s}),w1.raiseToTop(this),a.interactionState.dragInProgress=a.node,cXe(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),a.arrangement==="snap")){var o=a.traceId+"|"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):mYt(e,o,a,n),yYt(e,t,a,o,n)}}).on("drag",function(a){if(a.arrangement!=="fixed"){var o=O5.event.x,s=O5.event.y;a.arrangement==="snap"?(a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2,a.node.y0=s-a.visibleHeight/2,a.node.y1=s+a.visibleHeight/2):(a.arrangement==="freeform"&&(a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2),s=Math.max(0,Math.min(a.size-a.visibleHeight/2,s)),a.node.y0=s-a.visibleHeight/2,a.node.y1=s+a.visibleHeight/2),cXe(a.node),a.arrangement!=="snap"&&(a.sankey.update(a.graph),dXe(e.filter(pXe(a)),t))}}).on("dragend",function(a){if(a.arrangement!=="fixed"){a.interactionState.dragInProgress=!1;for(var o=0;o0)window.requestAnimationFrame(a);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,vXe(r,i)}})}function _Yt(e,t,r,n){return function(){for(var a=0,o=0;o0&&n.forceLayouts[t].alpha(0)}}function vXe(e,t){for(var r=[],n=[],i=0;i{"use strict";var Zv=qa(),s$=Pr(),D7=s$.numberFormat,TYt=mXe(),N5=ef(),AYt=ka(),Fx=e$().cn,lC=s$._;function yXe(e){return e!==""}function U5(e,t){return e.filter(function(r){return r.key===t.traceId})}function _Xe(e,t){Zv.select(e).select("path").style("fill-opacity",t),Zv.select(e).select("rect").style("fill-opacity",t)}function xXe(e){Zv.select(e).select("text.name").style("fill","black")}function bXe(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function wXe(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function TXe(e,t,r){t&&r&&U5(r,t).selectAll("."+Fx.sankeyLink).filter(bXe(t)).call(AXe.bind(0,t,r,!1))}function o$(e,t,r){t&&r&&U5(r,t).selectAll("."+Fx.sankeyLink).filter(bXe(t)).call(SXe.bind(0,t,r,!1))}function AXe(e,t,r,n){n.style("fill",function(i){if(!i.link.concentrationscale)return i.tinyColorHoverHue}).style("fill-opacity",function(i){if(!i.link.concentrationscale)return i.tinyColorHoverAlpha}),n.each(function(i){var a=i.link.label;a!==""&&U5(t,e).selectAll("."+Fx.sankeyLink).filter(function(o){return o.link.label===a}).style("fill",function(o){if(!o.link.concentrationscale)return o.tinyColorHoverHue}).style("fill-opacity",function(o){if(!o.link.concentrationscale)return o.tinyColorHoverAlpha})}),r&&U5(t,e).selectAll("."+Fx.sankeyNode).filter(wXe(e)).call(TXe)}function SXe(e,t,r,n){n.style("fill",function(i){return i.tinyColorHue}).style("fill-opacity",function(i){return i.tinyColorAlpha}),n.each(function(i){var a=i.link.label;a!==""&&U5(t,e).selectAll("."+Fx.sankeyLink).filter(function(o){return o.link.label===a}).style("fill",function(o){return o.tinyColorHue}).style("fill-opacity",function(o){return o.tinyColorAlpha})}),r&&U5(t,e).selectAll(Fx.sankeyNode).filter(wXe(e)).call(o$)}function kf(e,t){var r=e.hoverlabel||{},n=s$.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}MXe.exports=function(t,r){for(var n=t._fullLayout,i=n._paper,a=n._size,o=0;o"),color:kf(C,"bgcolor")||AYt.addOpacity(z.color,1),borderColor:kf(C,"bordercolor"),fontFamily:kf(C,"font.family"),fontSize:kf(C,"font.size"),fontColor:kf(C,"font.color"),fontWeight:kf(C,"font.weight"),fontStyle:kf(C,"font.style"),fontVariant:kf(C,"font.variant"),fontTextcase:kf(C,"font.textcase"),fontLineposition:kf(C,"font.lineposition"),fontShadow:kf(C,"font.shadow"),nameLength:kf(C,"namelength"),textAlign:kf(C,"align"),idealAlign:Zv.event.x"),color:kf(C,"bgcolor")||x.tinyColorHue,borderColor:kf(C,"bordercolor"),fontFamily:kf(C,"font.family"),fontSize:kf(C,"font.size"),fontColor:kf(C,"font.color"),fontWeight:kf(C,"font.weight"),fontStyle:kf(C,"font.style"),fontVariant:kf(C,"font.variant"),fontTextcase:kf(C,"font.textcase"),fontLineposition:kf(C,"font.lineposition"),fontShadow:kf(C,"font.shadow"),nameLength:kf(C,"namelength"),textAlign:kf(C,"align"),idealAlign:"left",hovertemplate:C.hovertemplate,hovertemplateLabels:V,eventData:[x.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});_Xe(j,.85),xXe(j)}}},T=function(L,x,C){t._fullLayout.hovermode!==!1&&(Zv.select(L).call(o$,x,C),x.node.trace.node.hoverinfo!=="skip"&&(x.node.fullData=x.node.trace,t.emit("plotly_unhover",{event:Zv.event,points:[x.node]})),N5.loneUnhover(n._hoverlayer.node()))};TYt(t,i,r,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},{linkEvents:{hover:u,follow:m,unhover:b,select:l},nodeEvents:{hover:k,follow:M,unhover:T,select:p}})}});var EXe=ye(_w=>{"use strict";var SYt=mc().overrideAll,MYt=Id().getModuleCalcData,EYt=l$(),kYt=W1(),CYt=Eg(),LYt=yv(),PYt=qf().prepSelect,u$=Pr(),IYt=Oa(),F7="sankey";_w.name=F7;_w.baseLayoutAttrOverrides=SYt({hoverlabel:kYt.hoverlabel},"plot","nested");_w.plot=function(e){var t=MYt(e.calcdata,F7)[0];EYt(e,t),_w.updateFx(e)};_w.clean=function(e,t,r,n){var i=n._has&&n._has(F7),a=t._has&&t._has(F7);i&&!a&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())};_w.updateFx=function(e){for(var t=0;t{"use strict";kXe.exports=function(t,r){for(var n=t.cd,i=[],a=n[0].trace,o=a._sankey.graph.nodes,s=0;s{"use strict";LXe.exports={attributes:JJ(),supplyDefaults:DWe(),calc:BWe(),plot:l$(),moduleType:"trace",name:"sankey",basePlotModule:EXe(),selectPoints:CXe(),categories:["noOpacity"],meta:{}}});var RXe=ye((C2r,IXe)=>{"use strict";IXe.exports=PXe()});var FXe=ye(V5=>{"use strict";var DXe=Mc();V5.name="indicator";V5.plot=function(e,t,r,n){DXe.plotBasePlot(V5.name,e,t,r,n)};V5.clean=function(e,t,r,n){DXe.cleanBasePlot(V5.name,e,t,r,n)}});var f$=ye((P2r,UXe)=>{"use strict";var zx=Ao().extendFlat,qXe=Ao().extendDeep,DYt=mc().overrideAll,OXe=ec(),BXe=Ih(),FYt=Cc().attributes,Nf=Rd(),zYt=vl().templatedArray,z7=QT(),zXe=vf().descriptionOnlyNumbers,c$=OXe({editType:"plot",colorEditType:"plot"}),uC={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:BXe.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"},NXe={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},qYt=zYt("step",qXe({},uC,{range:NXe}));UXe.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:FYt({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:zx({},c$,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:zXe("value")},font:zx({},c$,{}),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:zXe("value")},increasing:{symbol:{valType:"string",dflt:z7.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:z7.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:z7.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:z7.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:zx({},c$,{}),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:qXe({},uC,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:BXe.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:DYt({range:NXe,visible:zx({},Nf.visible,{dflt:!0}),tickmode:Nf.minor.tickmode,nticks:Nf.nticks,tick0:Nf.tick0,dtick:Nf.dtick,tickvals:Nf.tickvals,ticktext:Nf.ticktext,ticks:zx({},Nf.ticks,{dflt:"outside"}),ticklen:Nf.ticklen,tickwidth:Nf.tickwidth,tickcolor:Nf.tickcolor,ticklabelstep:Nf.ticklabelstep,showticklabels:Nf.showticklabels,labelalias:Nf.labelalias,tickfont:OXe({}),tickangle:Nf.tickangle,tickformat:Nf.tickformat,tickformatstops:Nf.tickformatstops,tickprefix:Nf.tickprefix,showtickprefix:Nf.showtickprefix,ticksuffix:Nf.ticksuffix,showticksuffix:Nf.showticksuffix,separatethousands:Nf.separatethousands,exponentformat:Nf.exponentformat,minexponent:Nf.minexponent,showexponent:Nf.showexponent,editType:"plot"},"plot"),steps:qYt,threshold:{line:{color:zx({},uC.line.color,{}),width:zx({},uC.line.width,{dflt:1}),editType:"plot"},thickness:zx({},uC.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var h$=ye((I2r,VXe)=>{"use strict";VXe.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var jXe=ye((R2r,HXe)=>{"use strict";var ly=Pr(),O7=f$(),OYt=Cc().defaults,GXe=vl(),BYt=Kd(),q7=h$(),NYt=Pb(),UYt=q3(),VYt=s_(),GYt=l_();function HYt(e,t,r,n){function i(x,C){return ly.coerce(e,t,O7,x,C)}OYt(t,n,i),i("mode"),t._hasNumber=t.mode.indexOf("number")!==-1,t._hasDelta=t.mode.indexOf("delta")!==-1,t._hasGauge=t.mode.indexOf("gauge")!==-1;var a=i("value");t._range=[0,typeof a=="number"?1.5*a:1];var o=new Array(2),s;if(t._hasNumber){i("number.valueformat");var l=ly.extendFlat({},n.font);l.size=void 0,ly.coerceFont(i,"number.font",l),t.number.font.size===void 0&&(t.number.font.size=q7.defaultNumberFontSize,o[0]=!0),i("number.prefix"),i("number.suffix"),s=t.number.font.size}var u;if(t._hasDelta){var c=ly.extendFlat({},n.font);c.size=void 0,ly.coerceFont(i,"delta.font",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||q7.defaultNumberFontSize),o[1]=!0),i("delta.reference",t.value),i("delta.relative"),i("delta.valueformat",t.delta.relative?"2%":""),i("delta.increasing.symbol"),i("delta.increasing.color"),i("delta.decreasing.symbol"),i("delta.decreasing.color"),i("delta.position"),i("delta.prefix"),i("delta.suffix"),u=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var f=ly.extendFlat({},n.font);f.size=.25*(s||u||q7.defaultNumberFontSize),ly.coerceFont(i,"title.font",f),i("title.text");var h,d,v,m;function b(x,C){return ly.coerce(h,d,O7.gauge,x,C)}function p(x,C){return ly.coerce(v,m,O7.gauge.axis,x,C)}if(t._hasGauge){h=e.gauge,h||(h={}),d=GXe.newContainer(t,"gauge"),b("shape");var k=t._isBullet=t.gauge.shape==="bullet";k||i("title.align","center");var M=t._isAngular=t.gauge.shape==="angular";M||i("align","center"),b("bgcolor",n.paper_bgcolor),b("borderwidth"),b("bordercolor"),b("bar.color"),b("bar.line.color"),b("bar.line.width");var T=q7.valueThickness*(t.gauge.shape==="bullet"?.5:1);b("bar.thickness",T),BYt(h,d,{name:"steps",handleItemDefaults:jYt}),b("threshold.value"),b("threshold.thickness"),b("threshold.line.width"),b("threshold.line.color"),v={},h&&(v=h.axis||{}),m=GXe.newContainer(d,"axis"),p("visible"),t._range=p("range",t._range);var L={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};NYt(v,m,p,"linear"),GYt(v,m,p,"linear",L),VYt(v,m,p,"linear",L),UYt(v,m,p,L)}else i("title.align","center"),i("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function jYt(e,t){function r(n,i){return ly.coerce(e,t,O7.gauge.steps,n,i)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}HXe.exports={supplyDefaults:HYt}});var XXe=ye((D2r,WXe)=>{"use strict";function WYt(e,t){var r=[],n=t.value;typeof t._lastValue!="number"&&(t._lastValue=t.value);var i=t._lastValue,a=i;return t._hasDelta&&typeof t.delta.reference=="number"&&(a=t.delta.reference),r[0]={y:n,lastY:i,delta:n-a,relativeDelta:(n-a)/a},r}WXe.exports={calc:WYt}});var QXe=ye((F2r,$Xe)=>{"use strict";var Aw=qa(),XYt=(j2(),gb(H2)).interpolate,ZXe=(j2(),gb(H2)).interpolateNumber,qx=Pr(),ZYt=qx.strScale,fC=qx.strTranslate,YYt=qx.rad2deg,KYt=Dh().MID_SHIFT,Tw=So(),xw=h$(),N7=Zl(),lv=ho(),JYt=h4(),$Yt=vI(),QYt=Rd(),G5=ka(),d$={left:"start",center:"middle",right:"end"},bw={left:0,center:.5,right:1},YXe=/[yzafpnµmkMGTPEZY]/;function hC(e){return e&&e.duration>0}$Xe.exports=function(t,r,n,i){var a=t._fullLayout,o;hC(n)&&i&&(o=i()),qx.makeTraceGroups(a._indicatorlayer,r,"trace").each(function(s){var l=s[0],u=l.trace,c=Aw.select(this),f=u._hasGauge,h=u._isAngular,d=u._isBullet,v=u.domain,m={w:a._size.w*(v.x[1]-v.x[0]),h:a._size.h*(v.y[1]-v.y[0]),l:a._size.l+a._size.w*v.x[0],r:a._size.r+a._size.w*(1-v.x[1]),t:a._size.t+a._size.h*(1-v.y[1]),b:a._size.b+a._size.h*v.y[0]},b=m.l+m.w/2,p=m.t+m.h/2,k=Math.min(m.w/2,m.h),M=xw.innerRadius*k,T,L,x,C=u.align||"center";if(L=p,!f)T=m.l+bw[C]*m.w,x=function(j){return KXe(j,m.w,m.h)};else if(h&&(T=b,L=p+k/2,x=function(j){return nKt(j,.9*M)}),d){var S=xw.bulletPadding,g=1-xw.bulletNumberDomainSize+S;T=m.l+(g+(1-g)*bw[C])*m.w,x=function(j){return KXe(j,(xw.bulletNumberDomainSize-S)*m.w,m.h)}}rKt(t,c,s,{numbersX:T,numbersY:L,numbersScaler:x,transitionOpts:n,onComplete:o});var P,E;f&&(P={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},E={range:u.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var z=c.selectAll("g.angular").data(h?s:[]);z.exit().remove();var q=c.selectAll("g.angularaxis").data(h?s:[]);q.exit().remove(),h&&tKt(t,c,s,{radius:k,innerRadius:M,gauge:z,layer:q,size:m,gaugeBg:P,gaugeOutline:E,transitionOpts:n,onComplete:o});var V=c.selectAll("g.bullet").data(d?s:[]);V.exit().remove();var G=c.selectAll("g.bulletaxis").data(d?s:[]);G.exit().remove(),d&&eKt(t,c,s,{gauge:V,layer:G,size:m,gaugeBg:P,gaugeOutline:E,transitionOpts:n,onComplete:o});var Z=c.selectAll("text.title").data(s);Z.exit().remove(),Z.enter().append("text").classed("title",!0),Z.attr("text-anchor",function(){return d?d$.right:d$[u.title.align]}).text(u.title.text).call(Tw.font,u.title.font).call(N7.convertToTspans,t),Z.attr("transform",function(){var j=m.l+m.w*bw[u.title.align],N,H=xw.titlePadding,ie=Tw.bBox(Z.node());if(f){if(h)if(u.gauge.axis.visible){var ae=Tw.bBox(q.node());N=ae.top-H-ie.bottom}else N=m.t+m.h/2-k/2-ie.bottom-H;d&&(N=L-(ie.top+ie.bottom)/2,j=m.l-xw.bulletPadding*m.w)}else N=u._numbersTop-H-ie.bottom;return fC(j,N)})})};function eKt(e,t,r,n){var i=r[0].trace,a=n.gauge,o=n.layer,s=n.gaugeBg,l=n.gaugeOutline,u=n.size,c=i.domain,f=n.transitionOpts,h=n.onComplete,d,v,m,b,p;a.enter().append("g").classed("bullet",!0),a.attr("transform",fC(u.l,u.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var k=u.h,M=i.gauge.bar.thickness*k,T=c.x[0],L=c.x[0]+(c.x[1]-c.x[0])*(i._hasNumber||i._hasDelta?1-xw.bulletNumberDomainSize:1);d=cC(e,i.gauge.axis),d._id="xbulletaxis",d.domain=[T,L],d.setScale(),v=lv.calcTicks(d),m=lv.makeTransTickFn(d),b=lv.getTickSigns(d)[2],p=u.t+u.h,d.visible&&(lv.drawTicks(e,d,{vals:d.ticks==="inside"?lv.clipEnds(d,v):v,layer:o,path:lv.makeTickPath(d,p,b),transFn:m}),lv.drawLabels(e,d,{vals:v,layer:o,transFn:m,labelFns:lv.makeLabelFns(d,p)}));function x(q){q.attr("width",function(V){return Math.max(0,d.c2p(V.range[1])-d.c2p(V.range[0]))}).attr("x",function(V){return d.c2p(V.range[0])}).attr("y",function(V){return .5*(1-V.thickness)*k}).attr("height",function(V){return V.thickness*k})}var C=[s].concat(i.gauge.steps),S=a.selectAll("g.bg-bullet").data(C);S.enter().append("g").classed("bg-bullet",!0).append("rect"),S.select("rect").call(x).call(ww),S.exit().remove();var g=a.selectAll("g.value-bullet").data([i.gauge.bar]);g.enter().append("g").classed("value-bullet",!0).append("rect"),g.select("rect").attr("height",M).attr("y",(k-M)/2).call(ww),hC(f)?g.select("rect").transition().duration(f.duration).ease(f.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).attr("width",Math.max(0,d.c2p(Math.min(i.gauge.axis.range[1],r[0].y)))):g.select("rect").attr("width",typeof r[0].y=="number"?Math.max(0,d.c2p(Math.min(i.gauge.axis.range[1],r[0].y))):0),g.exit().remove();var P=r.filter(function(){return i.gauge.threshold.value||i.gauge.threshold.value===0}),E=a.selectAll("g.threshold-bullet").data(P);E.enter().append("g").classed("threshold-bullet",!0).append("line"),E.select("line").attr("x1",d.c2p(i.gauge.threshold.value)).attr("x2",d.c2p(i.gauge.threshold.value)).attr("y1",(1-i.gauge.threshold.thickness)/2*k).attr("y2",(1-(1-i.gauge.threshold.thickness)/2)*k).call(G5.stroke,i.gauge.threshold.line.color).style("stroke-width",i.gauge.threshold.line.width),E.exit().remove();var z=a.selectAll("g.gauge-outline").data([l]);z.enter().append("g").classed("gauge-outline",!0).append("rect"),z.select("rect").call(x).call(ww),z.exit().remove()}function tKt(e,t,r,n){var i=r[0].trace,a=n.size,o=n.radius,s=n.innerRadius,l=n.gaugeBg,u=n.gaugeOutline,c=[a.l+a.w/2,a.t+a.h/2+o/2],f=n.gauge,h=n.layer,d=n.transitionOpts,v=n.onComplete,m=Math.PI/2;function b(_e){var Ee=i.gauge.axis.range[0],Ce=i.gauge.axis.range[1],ge=(_e-Ee)/(Ce-Ee)*Math.PI-m;return ge<-m?-m:ge>m?m:ge}function p(_e){return Aw.svg.arc().innerRadius((s+o)/2-_e/2*(o-s)).outerRadius((s+o)/2+_e/2*(o-s)).startAngle(-m)}function k(_e){_e.attr("d",function(Ee){return p(Ee.thickness).startAngle(b(Ee.range[0])).endAngle(b(Ee.range[1]))()})}var M,T,L,x;f.enter().append("g").classed("angular",!0),f.attr("transform",fC(c[0],c[1])),h.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),h.selectAll("g.xangularaxistick,path,text").remove(),M=cC(e,i.gauge.axis),M.type="linear",M.range=i.gauge.axis.range,M._id="xangularaxis",M.ticklabeloverflow="allow",M.setScale();var C=function(_e){return(M.range[0]-_e.x)/(M.range[1]-M.range[0])*Math.PI+Math.PI},S={},g=lv.makeLabelFns(M,0),P=g.labelStandoff;S.xFn=function(_e){var Ee=C(_e);return Math.cos(Ee)*P},S.yFn=function(_e){var Ee=C(_e),Ce=Math.sin(Ee)>0?.2:1;return-Math.sin(Ee)*(P+_e.fontSize*Ce)+Math.abs(Math.cos(Ee))*(_e.fontSize*KYt)},S.anchorFn=function(_e){var Ee=C(_e),Ce=Math.cos(Ee);return Math.abs(Ce)<.1?"middle":Ce>0?"start":"end"},S.heightFn=function(_e,Ee,Ce){var ge=C(_e);return-.5*(1+Math.sin(ge))*Ce};var E=function(_e){return fC(c[0]+o*Math.cos(_e),c[1]-o*Math.sin(_e))};L=function(_e){return E(C(_e))};var z=function(_e){var Ee=C(_e);return E(Ee)+"rotate("+-YYt(Ee)+")"};if(T=lv.calcTicks(M),x=lv.getTickSigns(M)[2],M.visible){x=M.ticks==="inside"?-1:1;var q=(M.linewidth||1)/2;lv.drawTicks(e,M,{vals:T,layer:h,path:"M"+x*q+",0h"+x*M.ticklen,transFn:z}),lv.drawLabels(e,M,{vals:T,layer:h,transFn:L,labelFns:S})}var V=[l].concat(i.gauge.steps),G=f.selectAll("g.bg-arc").data(V);G.enter().append("g").classed("bg-arc",!0).append("path"),G.select("path").call(k).call(ww),G.exit().remove();var Z=p(i.gauge.bar.thickness),j=f.selectAll("g.value-arc").data([i.gauge.bar]);j.enter().append("g").classed("value-arc",!0).append("path");var N=j.select("path");hC(d)?(N.transition().duration(d.duration).ease(d.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()}).attrTween("d",iKt(Z,b(r[0].lastY),b(r[0].y))),i._lastValue=r[0].y):N.attr("d",typeof r[0].y=="number"?Z.endAngle(b(r[0].y)):"M0,0Z"),N.call(ww),j.exit().remove(),V=[];var H=i.gauge.threshold.value;(H||H===0)&&V.push({range:[H,H],color:i.gauge.threshold.color,line:{color:i.gauge.threshold.line.color,width:i.gauge.threshold.line.width},thickness:i.gauge.threshold.thickness});var ie=f.selectAll("g.threshold-arc").data(V);ie.enter().append("g").classed("threshold-arc",!0).append("path"),ie.select("path").call(k).call(ww),ie.exit().remove();var ae=f.selectAll("g.gauge-outline").data([u]);ae.enter().append("g").classed("gauge-outline",!0).append("path"),ae.select("path").call(k).call(ww),ae.exit().remove()}function rKt(e,t,r,n){var i=r[0].trace,a=n.numbersX,o=n.numbersY,s=i.align||"center",l=d$[s],u=n.transitionOpts,c=n.onComplete,f=qx.ensureSingle(t,"g","numbers"),h,d,v,m=[];i._hasNumber&&m.push("number"),i._hasDelta&&(m.push("delta"),i.delta.position==="left"&&m.reverse());var b=f.selectAll("text").data(m);b.enter().append("text"),b.attr("text-anchor",function(){return l}).attr("class",function(E){return E}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),b.exit().remove();function p(E,z,q,V){if(E.match("s")&&q>=0!=V>=0&&!z(q).slice(-1).match(YXe)&&!z(V).slice(-1).match(YXe)){var G=E.slice().replace("s","f").replace(/\d+/,function(j){return parseInt(j)-1}),Z=cC(e,{tickformat:G});return function(j){return Math.abs(j)<1?lv.tickText(Z,j).text:z(j)}}else return z}function k(){var E=cC(e,{tickformat:i.number.valueformat},i._range);E.setScale(),lv.prepTicks(E);var z=function(j){return lv.tickText(E,j).text},q=i.number.suffix,V=i.number.prefix,G=f.select("text.number");function Z(){var j=typeof r[0].y=="number"?V+z(r[0].y)+q:"-";G.text(j).call(Tw.font,i.number.font).call(N7.convertToTspans,e)}return hC(u)?G.transition().duration(u.duration).ease(u.easing).each("end",function(){Z(),c&&c()}).each("interrupt",function(){Z(),c&&c()}).attrTween("text",function(){var j=Aw.select(this),N=ZXe(r[0].lastY,r[0].y);i._lastValue=r[0].y;var H=p(i.number.valueformat,z,r[0].lastY,r[0].y);return function(ie){j.text(V+H(N(ie))+q)}}):Z(),h=JXe(V+z(r[0].y)+q,i.number.font,l,e),G}function M(){var E=cC(e,{tickformat:i.delta.valueformat},i._range);E.setScale(),lv.prepTicks(E);var z=function(ie){return lv.tickText(E,ie).text},q=i.delta.suffix,V=i.delta.prefix,G=function(ie){var ae=i.delta.relative?ie.relativeDelta:ie.delta;return ae},Z=function(ie,ae){return ie===0||typeof ie!="number"||isNaN(ie)?"-":(ie>0?i.delta.increasing.symbol:i.delta.decreasing.symbol)+V+ae(ie)+q},j=function(ie){return ie.delta>=0?i.delta.increasing.color:i.delta.decreasing.color};i._deltaLastValue===void 0&&(i._deltaLastValue=G(r[0]));var N=f.select("text.delta");N.call(Tw.font,i.delta.font).call(G5.fill,j({delta:i._deltaLastValue}));function H(){N.text(Z(G(r[0]),z)).call(G5.fill,j(r[0])).call(N7.convertToTspans,e)}return hC(u)?N.transition().duration(u.duration).ease(u.easing).tween("text",function(){var ie=Aw.select(this),ae=G(r[0]),_e=i._deltaLastValue,Ee=p(i.delta.valueformat,z,_e,ae),Ce=ZXe(_e,ae);return i._deltaLastValue=ae,function(ge){ie.text(Z(Ce(ge),Ee)),ie.call(G5.fill,j({delta:Ce(ge)}))}}).each("end",function(){H(),c&&c()}).each("interrupt",function(){H(),c&&c()}):H(),d=JXe(Z(G(r[0]),z),i.delta.font,l,e),N}var T=i.mode+i.align,L;if(i._hasDelta&&(L=M(),T+=i.delta.position+i.delta.font.size+i.delta.font.family+i.delta.valueformat,T+=i.delta.increasing.symbol+i.delta.decreasing.symbol,v=d),i._hasNumber&&(k(),T+=i.number.font.size+i.number.font.family+i.number.valueformat+i.number.suffix+i.number.prefix,v=h),i._hasDelta&&i._hasNumber){var x=[(h.left+h.right)/2,(h.top+h.bottom)/2],C=[(d.left+d.right)/2,(d.top+d.bottom)/2],S,g,P=.75*i.delta.font.size;i.delta.position==="left"&&(S=B7(i,"deltaPos",0,-1*(h.width*bw[i.align]+d.width*(1-bw[i.align])+P),T,Math.min),g=x[1]-C[1],v={width:h.width+d.width+P,height:Math.max(h.height,d.height),left:d.left+S,right:h.right,top:Math.min(h.top,d.top+g),bottom:Math.max(h.bottom,d.bottom+g)}),i.delta.position==="right"&&(S=B7(i,"deltaPos",0,h.width*(1-bw[i.align])+d.width*bw[i.align]+P,T,Math.max),g=x[1]-C[1],v={width:h.width+d.width+P,height:Math.max(h.height,d.height),left:h.left,right:d.right+S,top:Math.min(h.top,d.top+g),bottom:Math.max(h.bottom,d.bottom+g)}),i.delta.position==="bottom"&&(S=null,g=d.height,v={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height,bottom:h.bottom+d.height}),i.delta.position==="top"&&(S=null,g=h.top,v={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height-d.height,bottom:h.bottom}),L.attr({dx:S,dy:g})}(i._hasNumber||i._hasDelta)&&f.attr("transform",function(){var E=n.numbersScaler(v);T+=E[2];var z=B7(i,"numbersScale",1,E[0],T,Math.min),q;i._scaleNumbers||(z=1),i._isAngular?q=o-z*v.bottom:q=o-z*(v.top+v.bottom)/2,i._numbersTop=z*v.top+q;var V=v[s];s==="center"&&(V=(v.left+v.right)/2);var G=a-z*V;return G=B7(i,"numbersTranslate",0,G,T,Math.max),fC(G,q)+ZYt(z)})}function ww(e){e.each(function(t){G5.stroke(Aw.select(this),t.line.color)}).each(function(t){G5.fill(Aw.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function iKt(e,t,r){return function(){var n=XYt(t,r);return function(i){return e.endAngle(n(i))()}}}function cC(e,t,r){var n=e._fullLayout,i=qx.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),a={type:"linear",_id:"x"+t._id},o={letter:"x",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function s(l,u){return qx.coerce(i,a,QYt,l,u)}return JYt(i,a,s,o,n),$Yt(i,a,s,o),a}function KXe(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+"x"+r]}function nKt(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function JXe(e,t,r,n){var i=document.createElementNS("http://www.w3.org/2000/svg","text"),a=Aw.select(i);return a.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(N7.convertToTspans,n).call(Tw.font,t),Tw.bBox(a.node())}function B7(e,t,r,n,i,a){var o="_cache"+t;e[o]&&e[o].key===i||(e[o]={key:i,value:r});var s=qx.aggNums(a,null,[e[o].value,n],2);return e[o].value=s,s}});var tZe=ye((z2r,eZe)=>{"use strict";eZe.exports={moduleType:"trace",name:"indicator",basePlotModule:FXe(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:f$(),supplyDefaults:jXe().supplyDefaults,calc:XXe().calc,plot:QXe(),meta:{}}});var iZe=ye((q2r,rZe)=>{"use strict";rZe.exports=tZe()});var v$=ye((B2r,sZe)=>{"use strict";var nZe=Qb(),U7=Ao().extendFlat,aKt=mc().overrideAll,aZe=ec(),oKt=Cc().attributes,oZe=vf().descriptionOnlyNumbers,O2r=sZe.exports=aKt({domain:oKt({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:oZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:U7({},nZe.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:U7({},aZe({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:oZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:U7({},nZe.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:U7({},aZe({arrayOk:!0}))}},"calc","from-root")});var uZe=ye((N2r,lZe)=>{"use strict";var p$=Pr(),sKt=v$(),lKt=Cc().defaults;function uKt(e,t){for(var r=e.columnorder||[],n=e.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(l,u){return l-u}),o=i.map(function(l){return a.indexOf(l)}),s=o.length;s{"use strict";var cKt=ny().wrap;cZe.exports=function(){return cKt({})}});var g$=ye((V2r,hZe)=>{"use strict";hZe.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"
",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"}}});var bZe=ye((G2r,xZe)=>{"use strict";var dZe=g$(),y$=Ao().extendFlat,fKt=Eo(),hKt=Yd().isTypedArray,V7=Yd().isArrayOrTypedArray;xZe.exports=function(t,r){var n=m$(r.cells.values),i=function(g){return g.slice(r.header.values.length,g.length)},a=m$(r.header.values);a.length&&!a[0].length&&(a[0]=[""],a=m$(a));var o=a.concat(i(n).map(function(){return _Ze((a[0]||[""]).length)})),s=r.domain,l=Math.floor(t._fullLayout._size.w*(s.x[1]-s.x[0])),u=Math.floor(t._fullLayout._size.h*(s.y[1]-s.y[0])),c=r.header.values.length?o[0].map(function(){return r.header.height}):[dZe.emptyHeaderHeight],f=n.length?n[0].map(function(){return r.cells.height}):[],h=c.reduce(vZe,0),d=u-h,v=d+dZe.uplift,m=mZe(f,v),b=mZe(c,h),p=gZe(b,[]),k=gZe(m,p),M={},T=r._fullInput.columnorder;V7(T)&&(T=Array.from(T)),T=T.concat(i(n.map(function(g,P){return P})));var L=o.map(function(g,P){var E=V7(r.columnwidth)?r.columnwidth[Math.min(P,r.columnwidth.length-1)]:r.columnwidth;return fKt(E)?Number(E):1}),x=L.reduce(vZe,0);L=L.map(function(g){return g/x*l});var C=Math.max(_$(r.header.line.width),_$(r.cells.line.width)),S={key:r.uid+t._context.staticPlot,translateX:s.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-s.y[1]),size:t._fullLayout._size,width:l,maxLineWidth:C,height:u,columnOrder:T,groupHeight:u,rowBlocks:k,headerRowBlocks:p,scrollY:0,cells:y$({},r.cells,{values:n}),headerCells:y$({},r.header,{values:o}),gdColumns:o.map(function(g){return g[0]}),gdColumnsOriginalOrder:o.map(function(g){return g[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(g,P){var E=M[g];M[g]=(E||0)+1;var z=g+"__"+M[g];return{key:z,label:g,specIndex:P,xIndex:T[P],xScale:pZe,x:void 0,calcdata:void 0,columnWidth:L[P]}})};return S.columns.forEach(function(g){g.calcdata=S,g.x=pZe(g)}),S};function _$(e){if(V7(e)){for(var t=0,r=0;r=t||u===e.length-1)&&(r[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o=yZe(),i+=a,s=u+1,a=0);return r}function yZe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var wZe=ye(x$=>{"use strict";var G7=Ao().extendFlat;x$.splitToPanels=function(e){var t=[0,0],r=G7({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:G7({},e.calcdata,{cells:e.calcdata.headerCells})}),n=G7({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),i=G7({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks});return[n,i,r]};x$.splitToCells=function(e){var t=dKt(e);return(e.values||[]).slice(t[0],t[1]).map(function(r,n){var i=typeof r=="string"&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:n+i,key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}})};function dKt(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}});var L$=ye((j2r,RZe)=>{"use strict";var Ya=g$(),rf=qa(),b$=Pr(),vKt=b$.numberFormat,Uu=ny(),w$=So(),pKt=Zl(),gKt=Pr().raiseToTop,lg=Pr().strTranslate,mKt=Pr().cancelTransition,yKt=bZe(),CZe=wZe(),TZe=ka();RZe.exports=function(t,r){var n=!t._context.staticPlot,i=t._fullLayout._paper.selectAll("."+Ya.cn.table).data(r.map(function(k){var M=Uu.unwrap(k),T=M.trace;return yKt(t,T)}),Uu.keyFun);i.exit().remove(),i.enter().append("g").classed(Ya.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),i.attr("width",function(k){return k.width+k.size.l+k.size.r}).attr("height",function(k){return k.height+k.size.t+k.size.b}).attr("transform",function(k){return lg(k.translateX,k.translateY)});var a=i.selectAll("."+Ya.cn.tableControlView).data(Uu.repeat,Uu.keyFun),o=a.enter().append("g").classed(Ya.cn.tableControlView,!0).style("box-sizing","content-box");if(n){var s="onwheel"in document?"wheel":"mousewheel";o.on("mousemove",function(k){a.filter(function(M){return k===M}).call(dC,t)}).on(s,function(k){if(!k.scrollbarState.wheeling){k.scrollbarState.wheeling=!0;var M=k.scrollY+rf.event.deltaY,T=j7(t,a,null,M)(k);T||(rf.event.stopPropagation(),rf.event.preventDefault()),k.scrollbarState.wheeling=!1}}).call(dC,t,!0)}a.attr("transform",function(k){return lg(k.size.l,k.size.t)});var l=a.selectAll("."+Ya.cn.scrollBackground).data(Uu.repeat,Uu.keyFun);l.enter().append("rect").classed(Ya.cn.scrollBackground,!0).attr("fill","none"),l.attr("width",function(k){return k.width}).attr("height",function(k){return k.height}),a.each(function(k){w$.setClipUrl(rf.select(this),AZe(t,k),t)});var u=a.selectAll("."+Ya.cn.yColumn).data(function(k){return k.columns},Uu.keyFun);u.enter().append("g").classed(Ya.cn.yColumn,!0),u.exit().remove(),u.attr("transform",function(k){return lg(k.x,0)}),n&&u.call(rf.behavior.drag().origin(function(k){var M=rf.select(this);return EZe(M,k,-Ya.uplift),gKt(this),k.calcdata.columnDragInProgress=!0,dC(a.filter(function(T){return k.calcdata.key===T.key}),t),k}).on("drag",function(k){var M=rf.select(this),T=function(C){return(k===C?rf.event.x:C.x)+C.columnWidth/2};k.x=Math.max(-Ya.overdrag,Math.min(k.calcdata.width+Ya.overdrag-k.columnWidth,rf.event.x));var L=LZe(u).filter(function(C){return C.calcdata.key===k.calcdata.key}),x=L.sort(function(C,S){return T(C)-T(S)});x.forEach(function(C,S){C.xIndex=S,C.x=k===C?C.x:C.xScale(C)}),u.filter(function(C){return k!==C}).transition().ease(Ya.transitionEase).duration(Ya.transitionDuration).attr("transform",function(C){return lg(C.x,0)}),M.call(mKt).attr("transform",lg(k.x,-Ya.uplift))}).on("dragend",function(k){var M=rf.select(this),T=k.calcdata;k.x=k.xScale(k),k.calcdata.columnDragInProgress=!1,EZe(M,k,0),kKt(t,T,T.columns.map(function(L){return L.xIndex}))})),u.each(function(k){w$.setClipUrl(rf.select(this),SZe(t,k),t)});var c=u.selectAll("."+Ya.cn.columnBlock).data(CZe.splitToPanels,Uu.keyFun);c.enter().append("g").classed(Ya.cn.columnBlock,!0).attr("id",function(k){return k.key}),c.style("cursor",function(k){return k.dragHandle?"ew-resize":k.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var f=c.filter(CKt),h=c.filter(E$);n&&h.call(rf.behavior.drag().origin(function(k){return rf.event.stopPropagation(),k}).on("drag",j7(t,a,-1)).on("dragend",function(){})),T$(t,a,f,c),T$(t,a,h,c);var d=a.selectAll("."+Ya.cn.scrollAreaClip).data(Uu.repeat,Uu.keyFun);d.enter().append("clipPath").classed(Ya.cn.scrollAreaClip,!0).attr("id",function(k){return AZe(t,k)});var v=d.selectAll("."+Ya.cn.scrollAreaClipRect).data(Uu.repeat,Uu.keyFun);v.enter().append("rect").classed(Ya.cn.scrollAreaClipRect,!0).attr("x",-Ya.overdrag).attr("y",-Ya.uplift).attr("fill","none"),v.attr("width",function(k){return k.width+2*Ya.overdrag}).attr("height",function(k){return k.height+Ya.uplift});var m=u.selectAll("."+Ya.cn.columnBoundary).data(Uu.repeat,Uu.keyFun);m.enter().append("g").classed(Ya.cn.columnBoundary,!0);var b=u.selectAll("."+Ya.cn.columnBoundaryClippath).data(Uu.repeat,Uu.keyFun);b.enter().append("clipPath").classed(Ya.cn.columnBoundaryClippath,!0),b.attr("id",function(k){return SZe(t,k)});var p=b.selectAll("."+Ya.cn.columnBoundaryRect).data(Uu.repeat,Uu.keyFun);p.enter().append("rect").classed(Ya.cn.columnBoundaryRect,!0).attr("fill","none"),p.attr("width",function(k){return k.columnWidth+2*H7(k)}).attr("height",function(k){return k.calcdata.height+2*H7(k)+Ya.uplift}).attr("x",function(k){return-H7(k)}).attr("y",function(k){return-H7(k)}),k$(null,h,a)};function H7(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function AZe(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function SZe(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function LZe(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function dC(e,t,r){function n(u){var c=u.rowBlocks;return S$(c,c.length-1)+(c.length?W7(c[c.length-1],1/0):1)}var i=e.selectAll("."+Ya.cn.scrollbarKit).data(Uu.repeat,Uu.keyFun);i.enter().append("g").classed(Ya.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),i.each(function(u){var c=u.scrollbarState;c.totalHeight=n(u),c.scrollableAreaHeight=u.groupHeight-A$(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Ya.goldenRatio*Ya.scrollbarWidth),c.barWiggleRoom=c.currentlyVisibleHeight-c.barLength,c.wiggleRoom=Math.max(0,c.totalHeight-c.scrollableAreaHeight),c.topY=c.barWiggleRoom===0?0:u.scrollY/c.wiggleRoom*c.barWiggleRoom,c.bottomY=c.topY+c.barLength,c.dragMultiplier=c.wiggleRoom/c.barWiggleRoom}).attr("transform",function(u){var c=u.width+Ya.scrollbarWidth/2+Ya.scrollbarOffset;return lg(c,A$(u))});var a=i.selectAll("."+Ya.cn.scrollbar).data(Uu.repeat,Uu.keyFun);a.enter().append("g").classed(Ya.cn.scrollbar,!0);var o=a.selectAll("."+Ya.cn.scrollbarSlider).data(Uu.repeat,Uu.keyFun);o.enter().append("g").classed(Ya.cn.scrollbarSlider,!0),o.attr("transform",function(u){return lg(0,u.scrollbarState.topY||0)});var s=o.selectAll("."+Ya.cn.scrollbarGlyph).data(Uu.repeat,Uu.keyFun);s.enter().append("line").classed(Ya.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Ya.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Ya.scrollbarWidth/2),s.attr("y2",function(u){return u.scrollbarState.barLength-Ya.scrollbarWidth/2}).attr("stroke-opacity",function(u){return u.columnDragInProgress||!u.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Ya.scrollbarHideDelay).duration(Ya.scrollbarHideDuration).attr("stroke-opacity",0);var l=a.selectAll("."+Ya.cn.scrollbarCaptureZone).data(Uu.repeat,Uu.keyFun);l.enter().append("line").classed(Ya.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Ya.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(u){var c=rf.event.y,f=this.getBoundingClientRect(),h=u.scrollbarState,d=c-f.top,v=rf.scale.linear().domain([0,h.scrollableAreaHeight]).range([0,h.totalHeight]).clamp(!0);h.topY<=d&&d<=h.bottomY||j7(t,e,null,v(d-h.barLength/2))(u)}).call(rf.behavior.drag().origin(function(u){return rf.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on("drag",j7(t,e)).on("dragend",function(){})),l.attr("y2",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function T$(e,t,r,n){var i=_Kt(r),a=xKt(i);AKt(a);var o=bKt(a);MKt(o);var s=TKt(a),l=wKt(s);SKt(l),PZe(l,t,n,e),C$(a)}function _Kt(e){var t=e.selectAll("."+Ya.cn.columnCells).data(Uu.repeat,Uu.keyFun);return t.enter().append("g").classed(Ya.cn.columnCells,!0),t.exit().remove(),t}function xKt(e){var t=e.selectAll("."+Ya.cn.columnCell).data(CZe.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ya.cn.columnCell,!0),t.exit().remove(),t}function bKt(e){var t=e.selectAll("."+Ya.cn.cellRect).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Ya.cn.cellRect,!0),t}function wKt(e){var t=e.selectAll("."+Ya.cn.cellText).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Ya.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){rf.event.stopPropagation()}),t}function TKt(e){var t=e.selectAll("."+Ya.cn.cellTextHolder).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ya.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function AKt(e){e.each(function(t,r){var n=t.calcdata.cells.font,i=t.column.specIndex,a={size:Yv(n.size,i,r),color:Yv(n.color,i,r),family:Yv(n.family,i,r),weight:Yv(n.weight,i,r),style:Yv(n.style,i,r),variant:Yv(n.variant,i,r),textcase:Yv(n.textcase,i,r),lineposition:Yv(n.lineposition,i,r),shadow:Yv(n.shadow,i,r)};t.rowNumber=t.key,t.align=Yv(t.calcdata.cells.align,i,r),t.cellBorderWidth=Yv(t.calcdata.cells.line.width,i,r),t.font=a})}function SKt(e){e.each(function(t){w$.font(rf.select(this),t.font)})}function MKt(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=rf.select(this);TZe.stroke(r,Yv(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),TZe.fill(r,Yv(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function PZe(e,t,r,n){e.text(function(i){var a=i.column.specIndex,o=i.rowNumber,s=i.value,l=typeof s=="string",u=l&&s.match(/
/i),c=!l||u;i.mayHaveMarkup=l&&s.match(/[<&>]/);var f=EKt(s);i.latex=f;var h=f?"":Yv(i.calcdata.cells.prefix,a,o)||"",d=f?"":Yv(i.calcdata.cells.suffix,a,o)||"",v=f?null:Yv(i.calcdata.cells.format,a,o)||null,m=h+(v?vKt(v)(i.value):i.value)+d,b;i.wrappingNeeded=!i.wrapped&&!c&&!f&&(b=MZe(m)),i.cellHeightMayIncrease=u||f||i.mayHaveMarkup||(b===void 0?MZe(m):b),i.needsConvertToTspans=i.mayHaveMarkup||i.wrappingNeeded||i.latex;var p;if(i.wrappingNeeded){var k=Ya.wrapSplitCharacter===" "?m.replace(/i&&n.push(a),i+=l}return n}function k$(e,t,r){var n=LZe(t)[0];if(n!==void 0){var i=n.rowBlocks,a=n.calcdata,o=S$(i,i.length),s=n.calcdata.groupHeight-A$(n),l=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),u=LKt(i,l,s);u.length===1&&(u[0]===i.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),t.each(function(c,f){c.page=u[f],c.scrollY=l}),t.attr("transform",function(c){var f=S$(c.rowBlocks,c.page)-c.scrollY;return lg(0,f)}),e&&(kZe(e,r,t,u,n.prevPages,n,0),kZe(e,r,t,u,n.prevPages,n,1),dC(r,e))}}function j7(e,t,r,n){return function(a){var o=a.calcdata?a.calcdata:a,s=t.filter(function(f){return o.key===f.key}),l=r||o.scrollbarState.dragMultiplier,u=o.scrollY;o.scrollY=n===void 0?o.scrollY+l*rf.event.dy:n;var c=s.selectAll("."+Ya.cn.yColumn).selectAll("."+Ya.cn.columnBlock).filter(E$);return k$(e,c,s),o.scrollY===u}}function kZe(e,t,r,n,i,a,o){var s=n[o]!==i[o];s&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var l=r.filter(function(u,c){return c===o&&n[c]!==i[c]});T$(e,t,l,r),i[o]=n[o]}))}function PKt(e,t,r,n){return function(){var a=rf.select(t.parentNode);a.each(function(o){var s=o.fragments;a.selectAll("tspan.line").each(function(m,b){s[b].width=this.getComputedTextLength()});var l=s[s.length-1].width,u=s.slice(0,-1),c=[],f,h,d=0,v=o.column.columnWidth-2*Ya.cellPad;for(o.value="";u.length;)f=u.shift(),h=f.width+l,d+h>v&&(o.value+=c.join(Ya.wrapSpacer)+Ya.lineBreaker,c=[],d=0),c.push(f.text),d+=h;d&&(o.value+=c.join(Ya.wrapSpacer)),o.wrapped=!0}),a.selectAll("tspan.line").remove(),PZe(a.select("."+Ya.cn.cellText),r,e,n),rf.select(t.parentNode.parentNode).call(C$)}}function IKt(e,t,r,n,i){return function(){if(!i.settledY){var o=rf.select(t.parentNode),s=M$(i),l=i.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=i.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Ya.cellPad:u,f=Math.max(c,u),h=f-s.rows[l].rowHeight;h&&(s.rows[l].rowHeight=f,e.selectAll("."+Ya.cn.columnCell).call(C$),k$(null,e.filter(E$),0),dC(r,n,!0)),o.attr("transform",function(){var d=this,v=d.parentNode,m=v.getBoundingClientRect(),b=rf.select(d.parentNode).select("."+Ya.cn.cellRect).node().getBoundingClientRect(),p=d.transform.baseVal.consolidate(),k=b.top-m.top+(p?p.matrix.f:Ya.cellPad);return lg(IZe(i,rf.select(d.parentNode).select("."+Ya.cn.cellTextHolder).node().getBoundingClientRect().width),k)}),i.settledY=!0}}}function IZe(e,t){switch(e.align){case"left":return Ya.cellPad;case"right":return e.column.columnWidth-(t||0)-Ya.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Ya.cellPad}}function C$(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+W7(s,1/0)},0),n=M$(t),i=W7(n,t.key),a=i+r;return lg(0,a)}).selectAll("."+Ya.cn.cellRect).attr("height",function(t){return DKt(M$(t),t.key).rowHeight})}function S$(e,t){for(var r=0,n=t-1;n>=0;n--)r+=RKt(e[n]);return r}function W7(e,t){for(var r=0,n=0;n{"use strict";var FKt=Id().getModuleCalcData,zKt=L$(),X7="table";Z7.name=X7;Z7.plot=function(e){var t=FKt(e.calcdata,X7)[0];t.length&&zKt(e,t)};Z7.clean=function(e,t,r,n){var i=n._has&&n._has(X7),a=t._has&&t._has(X7);i&&!a&&n._paperdiv.selectAll(".table").remove()}});var zZe=ye((X2r,FZe)=>{"use strict";FZe.exports={attributes:v$(),supplyDefaults:uZe(),calc:fZe(),plot:L$(),moduleType:"trace",name:"table",basePlotModule:DZe(),categories:["noOpacity"],meta:{}}});var OZe=ye((Z2r,qZe)=>{"use strict";qZe.exports=zZe()});var GZe=ye((Y2r,VZe)=>{"use strict";var BZe=ec(),NZe=Ih(),P$=Rd(),qKt=vf().descriptionWithDates,OKt=mc().overrideAll,UZe=Pd().dash,I$=Ao().extendFlat;VZe.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:BZe({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:P$.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:I$({},P$.labelalias,{editType:"calc"}),tickfont:BZe({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:qKt("tick label")},tickformatstops:OKt(P$.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:NZe.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:I$({},UZe,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:I$({},UZe,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:NZe.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}});var K7=ye((K2r,WZe)=>{"use strict";var BKt=ec(),HZe=GZe(),jZe=Ih(),Y7=BKt({editType:"calc"}),NKt=pf().zorder;Y7.family.dflt='"Open Sans", verdana, arial, sans-serif';Y7.size.dflt=12;Y7.color.dflt=jZe.defaultLine;WZe.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:HZe,baxis:HZe,font:Y7,color:{valType:"color",dflt:jZe.defaultLine,editType:"plot"},zorder:NKt}});var YZe=ye((J2r,ZZe)=>{"use strict";var XZe=Pr().isArray1D;ZZe.exports=function(t,r,n){var i=n("x"),a=i&&i.length,o=n("y"),s=o&&o.length;if(!a&&!s)return!1;if(r._cheater=!i,(!a||XZe(i))&&(!s||XZe(o))){var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),r.a&&r.a.length&&(l=Math.min(l,r.a.length)),r.b&&r.b.length&&(l=Math.min(l,r.b.length)),r._length=l}else r._length=null;return!0}});var $Ze=ye(($2r,JZe)=>{"use strict";var UKt=K7(),KZe=ka().addOpacity,VKt=Oa(),vC=Pr(),GKt=Pb(),HKt=s_(),jKt=l_(),WKt=fI(),XKt=xm(),ZKt=H3();JZe.exports=function(t,r,n){var i=n.letter,a=n.font||{},o=UKt[i+"axis"];function s(g,P){return vC.coerce(t,r,o,g,P)}function l(g,P){return vC.coerce2(t,r,o,g,P)}n.name&&(r._name=n.name,r._id=n.name),s("autotypenumbers",n.autotypenumbersDflt);var u=s("type");if(u==="-"&&(n.data&&YKt(r,n.data),r.type==="-"?r.type="linear":u=t.type=r.type),s("smoothing"),s("cheatertype"),s("showticklabels"),s("labelprefix",i+" = "),s("labelsuffix"),s("showtickprefix"),s("showticksuffix"),s("separatethousands"),s("tickformat"),s("exponentformat"),s("minexponent"),s("showexponent"),s("categoryorder"),s("tickmode"),s("tickvals"),s("ticktext"),s("tick0"),s("dtick"),r.tickmode==="array"&&(s("arraytick0"),s("arraydtick")),s("labelpadding"),r._hovertitle=i,u==="date"){var c=VKt.getComponentMethod("calendars","handleDefaults");c(t,r,"calendar",n.calendar)}XKt(r,n.fullLayout),r.c2p=vC.identity;var f=s("color",n.dfltColor),h=f===t.color?f:a.color,d=s("title.text");d&&(vC.coerceFont(s,"title.font",a,{overrideDflt:{size:vC.bigFont(a.size),color:h}}),s("title.offset")),s("tickangle");var v=s("autorange",!r.isValidRange(t.range));v&&s("rangemode"),s("range"),r.cleanRange(),s("fixedrange"),GKt(t,r,s,u),jKt(t,r,s,u,n),HKt(t,r,s,u,n),WKt(t,r,s,{data:n.data,dataAttr:i});var m=l("gridcolor",KZe(f,.3)),b=l("gridwidth"),p=l("griddash"),k=s("showgrid");k||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var M=l("startlinecolor",f),T=l("startlinewidth",b),L=s("startline",r.showgrid||!!M||!!T);L||(delete r.startlinecolor,delete r.startlinewidth);var x=l("endlinecolor",f),C=l("endlinewidth",b),S=s("endline",r.showgrid||!!x||!!C);return S||(delete r.endlinecolor,delete r.endlinewidth),k?(s("minorgridcount"),s("minorgridwidth",b),s("minorgriddash",p),s("minorgridcolor",KZe(m,.06)),r.minorgridcount||(delete r.minorgridwidth,delete r.minorgriddash,delete r.minorgridcolor)):(delete r.gridcolor,delete r.gridwidth,delete r.griddash),r.showticklabels==="none"&&(delete r.tickfont,delete r.tickangle,delete r.showexponent,delete r.exponentformat,delete r.minexponent,delete r.tickformat,delete r.showticksuffix,delete r.showtickprefix),r.showticksuffix||delete r.ticksuffix,r.showtickprefix||delete r.tickprefix,s("tickmode"),r};function YKt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i=n+"calendar",a=e[i];e.type=ZKt(t,a,{autotypenumbers:e.autotypenumbers})}}});var eYe=ye((Q2r,QZe)=>{"use strict";var KKt=$Ze(),JKt=vl();QZe.exports=function(t,r,n,i,a){var o=i("a");o||(i("da"),i("a0"));var s=i("b");s||(i("db"),i("b0")),$Kt(t,r,n,a)};function $Kt(e,t,r,n){var i=["aaxis","baxis"];i.forEach(function(a){var o=a.charAt(0),s=e[a]||{},l=JKt.newContainer(t,a),u={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:a,data:e[o],calendar:t.calendar,dfltColor:n,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};KKt(s,l,u),l._categories=l._categories||[],!e[a]&&s.type!=="-"&&(e[a]={type:s.type})})}});var iYe=ye((ewr,rYe)=>{"use strict";var tYe=Pr(),QKt=YZe(),eJt=eYe(),tJt=K7(),rJt=Ih();rYe.exports=function(t,r,n,i){function a(l,u){return tYe.coerce(t,r,tJt,l,u)}r._clipPathId="clip"+r.uid+"carpet";var o=a("color",rJt.defaultLine);if(tYe.coerceFont(a,"font",i.font),a("carpet"),eJt(t,r,i,a,o),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var s=QKt(t,r,a);s||(r.visible=!1),r._cheater&&a("cheaterslope"),a("zorder")}});var R$=ye((twr,nYe)=>{"use strict";var iJt=Pr().isArrayOrTypedArray;nYe.exports=function(t,r,n){var i;for(iJt(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],i=0;i{"use strict";aYe.exports=function(t,r,n){if(t.length===0)return"";var i,a=[],o=n?3:1;for(i=0;i{"use strict";oYe.exports=function(t,r,n,i,a,o){var s=a[0]*t.dpdx(r),l=a[1]*t.dpdy(n),u=1,c=1;if(o){var f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),d=(a[0]*o[0]+a[1]*o[1])/f/h;c=Math.max(0,d)}var v=Math.atan2(l,s)*180/Math.PI;return v<-90?(v+=180,u=-u):v>90&&(v-=180,u=-u),{angle:v,flip:u,p:t.c2p(i,r,n),offsetMultplier:c}}});var pYe=ye((nwr,vYe)=>{"use strict";var e9=qa(),J7=So(),$7=R$(),cYe=D$(),pC=sYe(),F$=Zl(),Up=Pr(),fYe=Up.strRotate,Q7=Up.strTranslate,hYe=Dh();vYe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=r.xaxis,s=r.yaxis,l=t._fullLayout,u=l._clips;Up.makeTraceGroups(i,n,"trace").each(function(c){var f=e9.select(this),h=c[0],d=h.trace,v=d.aaxis,m=d.baxis,b=Up.ensureSingle(f,"g","minorlayer"),p=Up.ensureSingle(f,"g","majorlayer"),k=Up.ensureSingle(f,"g","boundarylayer"),M=Up.ensureSingle(f,"g","labellayer");f.style("opacity",d.opacity),H5(o,s,p,v,"a",v._gridlines,!0,a),H5(o,s,p,m,"b",m._gridlines,!0,a),H5(o,s,b,v,"a",v._minorgridlines,!0,a),H5(o,s,b,m,"b",m._minorgridlines,!0,a),H5(o,s,k,v,"a-boundary",v._boundarylines,a),H5(o,s,k,m,"b-boundary",m._boundarylines,a);var T=lYe(t,o,s,d,h,M,v._labels,"a-label"),L=lYe(t,o,s,d,h,M,m._labels,"b-label");aJt(t,M,d,h,o,s,T,L),nJt(d,h,u,o,s)})};function nJt(e,t,r,n,i){var a,o,s,l,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var c=Up.ensureSingle(u,"path","carpetboundary"),f=t.clipsegments,h=[];for(l=0;l0?"start":"end","data-notex":1}).call(J7.font,f.font).text(f.text).call(F$.convertToTspans,e),p=J7.bBox(this);b.attr("transform",Q7(d.p[0],d.p[1])+fYe(d.angle)+Q7(f.axis.labelpadding*m,p.height*.3)),u=Math.max(u,p.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function aJt(e,t,r,n,i,a,o,s){var l,u,c,f,h=Up.aggNums(Math.min,null,r.a),d=Up.aggNums(Math.max,null,r.a),v=Up.aggNums(Math.min,null,r.b),m=Up.aggNums(Math.max,null,r.b);l=.5*(h+d),u=v,c=r.ab2xy(l,u,!0),f=r.dxyda_rough(l,u),o.angle===void 0&&Up.extendFlat(o,pC(r,i,a,c,r.dxydb_rough(l,u))),uYe(e,t,r,n,c,f,r.aaxis,i,a,o,"a-title"),l=h,u=.5*(v+m),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&Up.extendFlat(s,pC(r,i,a,c,r.dxyda_rough(l,u))),uYe(e,t,r,n,c,f,r.baxis,i,a,s,"b-title")}var dYe=hYe.LINE_SPACING,oJt=(1-hYe.MID_SHIFT)/dYe+1;function uYe(e,t,r,n,i,a,o,s,l,u,c){var f=[];o.title.text&&f.push(o.title.text);var h=t.selectAll("text."+c).data(f),d=u.maxExtent;h.enter().append("text").classed(c,!0),h.each(function(){var v=pC(r,s,l,i,a);["start","both"].indexOf(o.showticklabels)===-1&&(d=0);var m=o.title.font.size;d+=m+o.title.offset;var b=u.angle+(u.flip<0?180:0),p=(b-v.angle+450)%360,k=p>90&&p<270,M=e9.select(this);M.text(o.title.text).call(F$.convertToTspans,e),k&&(d=(-F$.lineCount(M)+oJt)*dYe*m-d),M.attr("transform",Q7(v.p[0],v.p[1])+fYe(v.angle)+Q7(0,d)).attr("text-anchor","middle").call(J7.font,o.title.font)}),h.exit().remove()}});var mYe=ye((awr,gYe)=>{"use strict";var t9=Pr().isArrayOrTypedArray;gYe.exports=function(e,t,r){var n,i,a,o,s,l,u=[],c=t9(e)?e.length:e,f=t9(t)?t.length:t,h=t9(e)?e:null,d=t9(t)?t:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(c-1)),d&&(o=(d.length-1)/(d[d.length-1]-d[0])/(f-1));var v,m=1/0,b=-1/0;for(i=0;i{"use strict";var yYe=Pr().isArrayOrTypedArray;xYe.exports=function(e){return _Ye(e,0)};function _Ye(e,t){if(!yYe(e)||t>=10)return null;for(var r=1/0,n=-1/0,i=e.length,a=0;a{"use strict";var sJt=ho(),Ox=Ao().extendFlat;wYe.exports=function(t,r,n){var i,a,o,s,l,u,c,f,h,d,v,m,b,p,k=t["_"+r],M=t[r+"axis"],T=M._gridlines=[],L=M._minorgridlines=[],x=M._boundarylines=[],C=t["_"+n],S=t[n+"axis"];M.tickmode==="array"&&(M.tickvals=k.slice());var g=t._xctrl,P=t._yctrl,E=g[0].length,z=g.length,q=t._a.length,V=t._b.length;sJt.prepTicks(M),M.tickmode==="array"&&delete M.tickvals;var G=M.smoothing?3:1;function Z(N){var H,ie,ae,_e,Ee,Ce,ge,re,Se,ke,be,Be,Le=[],me=[],Pe={};if(r==="b")for(ie=t.b2j(N),ae=Math.floor(Math.max(0,Math.min(V-2,ie))),_e=ie-ae,Pe.length=V,Pe.crossLength=q,Pe.xy=function(ce){return t.evalxy([],ce,ie)},Pe.dxy=function(ce,He){return t.dxydi([],ce,ae,He,_e)},H=0;H0&&(Se=t.dxydi([],H-1,ae,0,_e),Le.push(Ee[0]+Se[0]/3),me.push(Ee[1]+Se[1]/3),ke=t.dxydi([],H-1,ae,1,_e),Le.push(re[0]-ke[0]/3),me.push(re[1]-ke[1]/3)),Le.push(re[0]),me.push(re[1]),Ee=re;else for(H=t.a2i(N),Ce=Math.floor(Math.max(0,Math.min(q-2,H))),ge=H-Ce,Pe.length=q,Pe.crossLength=V,Pe.xy=function(ce){return t.evalxy([],H,ce)},Pe.dxy=function(ce,He){return t.dxydj([],Ce,ce,ge,He)},ie=0;ie0&&(be=t.dxydj([],Ce,ie-1,ge,0),Le.push(Ee[0]+be[0]/3),me.push(Ee[1]+be[1]/3),Be=t.dxydj([],Ce,ie-1,ge,1),Le.push(re[0]-Be[0]/3),me.push(re[1]-Be[1]/3)),Le.push(re[0]),me.push(re[1]),Ee=re;return Pe.axisLetter=r,Pe.axis=M,Pe.crossAxis=S,Pe.value=N,Pe.constvar=n,Pe.index=f,Pe.x=Le,Pe.y=me,Pe.smoothing=S.smoothing,Pe}function j(N){var H,ie,ae,_e,Ee,Ce=[],ge=[],re={};if(re.length=k.length,re.crossLength=C.length,r==="b")for(ae=Math.max(0,Math.min(V-2,N)),Ee=Math.min(1,Math.max(0,N-ae)),re.xy=function(Se){return t.evalxy([],Se,N)},re.dxy=function(Se,ke){return t.dxydi([],Se,ae,ke,Ee)},H=0;Hk.length-1)&&T.push(Ox(j(a),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(f=u;fk.length-1)&&!(v<0||v>k.length-1))for(m=k[o],b=k[v],i=0;ik[k.length-1])&&L.push(Ox(Z(d),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash})));M.startline&&x.push(Ox(j(0),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&x.push(Ox(j(k.length-1),{color:M.endlinecolor,width:M.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((k[k.length-1]-M.tick0)/M.dtick*(1+s)),Math.ceil((k[0]-M.tick0)/M.dtick/(1+s))].sort(function(N,H){return N-H}),u=l[0],c=l[1],f=u;f<=c;f++)h=M.tick0+M.dtick*f,T.push(Ox(Z(h),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(f=u-1;fk[k.length-1])&&L.push(Ox(Z(d),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash}));M.startline&&x.push(Ox(Z(k[0]),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&x.push(Ox(Z(k[k.length-1]),{color:M.endlinecolor,width:M.endlinewidth}))}}});var EYe=ye((lwr,MYe)=>{"use strict";var AYe=ho(),SYe=Ao().extendFlat;MYe.exports=function(t,r){var n,i,a,o,s,l=r._labels=[],u=r._gridlines;for(n=0;n{"use strict";kYe.exports=function(t,r,n,i){var a,o,s,l=[],u=!!n.smoothing,c=!!i.smoothing,f=t[0].length-1,h=t.length-1;for(a=0,o=[],s=[];a<=f;a++)o[a]=t[0][a],s[a]=r[0][a];for(l.push({x:o,y:s,bicubic:u}),a=0,o=[],s=[];a<=h;a++)o[a]=t[a][f],s[a]=r[a][f];for(l.push({x:o,y:s,bicubic:c}),a=f,o=[],s=[];a>=0;a--)o[f-a]=t[h][a],s[f-a]=r[h][a];for(l.push({x:o,y:s,bicubic:u}),a=h,o=[],s=[];a>=0;a--)o[h-a]=t[a][0],s[h-a]=r[a][0];return l.push({x:o,y:s,bicubic:c}),l}});var PYe=ye((cwr,LYe)=>{"use strict";var lJt=Pr();LYe.exports=function(t,r,n){var i,a,o,s=[],l=[],u=t[0].length,c=t.length;function f(ae,_e){var Ee=0,Ce,ge=0;return ae>0&&(Ce=t[_e][ae-1])!==void 0&&(ge++,Ee+=Ce),ae0&&(Ce=t[_e-1][ae])!==void 0&&(ge++,Ee+=Ce),_e0&&a0&&iS);return lJt.log("Smoother converged to",g,"after",E,"iterations"),t}});var RYe=ye((fwr,IYe)=>{"use strict";IYe.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var zYe=ye((hwr,FYe)=>{"use strict";var DYe=.5;FYe.exports=function(t,r,n,i){var a=t[0]-r[0],o=t[1]-r[1],s=n[0]-r[0],l=n[1]-r[1],u=Math.pow(a*a+o*o,DYe/2),c=Math.pow(s*s+l*l,DYe/2),f=(c*c*a-u*u*s)*i,h=(c*c*o-u*u*l)*i,d=c*(u+c)*3,v=u*(u+c)*3;return[[r[0]+(d&&f/d),r[1]+(d&&h/d)],[r[0]-(v&&f/v),r[1]-(v&&h/v)]]}});var OYe=ye((dwr,qYe)=>{"use strict";var z$=zYe(),r9=Pr().ensureArray;function j5(e,t,r){var n=-.5*r[0]+1.5*t[0],i=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*i+e[1])/3]}qYe.exports=function(t,r,n,i,a,o){var s,l,u,c,f,h,d,v,m,b,p=n[0].length,k=n.length,M=a?3*p-2:p,T=o?3*k-2:k;for(t=r9(t,T),r=r9(r,T),u=0;u{"use strict";BYe.exports=function(e,t,r,n,i){var a=t-2,o=r-2;return n&&i?function(s,l,u){s||(s=[]);var c,f,h,d,v,m,b=Math.max(0,Math.min(Math.floor(l),a)),p=Math.max(0,Math.min(Math.floor(u),o)),k=Math.max(0,Math.min(1,l-b)),M=Math.max(0,Math.min(1,u-p));b*=3,p*=3;var T=k*k,L=T*k,x=1-k,C=x*x,S=C*x,g=M*M,P=g*M,E=1-M,z=E*E,q=z*E;for(m=0;m{"use strict";UYe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3,a*=3;var v=o*o,m=1-o,b=m*m,p=m*o*2,k=-3*b,M=3*(b-p),T=3*(p-v),L=3*v,x=s*s,C=x*s,S=1-s,g=S*S,P=g*S;for(d=0;d{"use strict";GYe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3,a*=3;var v=o*o,m=v*o,b=1-o,p=b*b,k=p*b,M=s*s,T=1-s,L=T*T,x=T*s*2,C=-3*L,S=3*(L-x),g=3*(x-M),P=3*M;for(d=0;d{"use strict";var jYe=RYe(),WYe=V6().findBin,uJt=OYe(),cJt=NYe(),fJt=VYe(),hJt=HYe();XYe.exports=function(t){var r=t._a,n=t._b,i=r.length,a=n.length,o=t.aaxis,s=t.baxis,l=r[0],u=r[i-1],c=n[0],f=n[a-1],h=r[r.length-1]-r[0],d=n[n.length-1]-n[0],v=h*jYe.RELATIVE_CULL_TOLERANCE,m=d*jYe.RELATIVE_CULL_TOLERANCE;l-=v,u+=v,c-=m,f+=m,t.isVisible=function(b,p){return b>l&&bc&&pu||pf},t.setScale=function(){var b=t._x,p=t._y,k=uJt(t._xctrl,t._yctrl,b,p,o.smoothing,s.smoothing);t._xctrl=k[0],t._yctrl=k[1],t.evalxy=cJt([t._xctrl,t._yctrl],i,a,o.smoothing,s.smoothing),t.dxydi=fJt([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=hJt([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(b){var p=Math.max(0,Math.floor(b[0]),i-2),k=b[0]-p;return(1-k)*r[p]+k*r[p+1]},t.j2b=function(b){var p=Math.max(0,Math.floor(b[1]),i-2),k=b[1]-p;return(1-k)*n[p]+k*n[p+1]},t.ij2ab=function(b){return[t.i2a(b[0]),t.j2b(b[1])]},t.a2i=function(b){var p=Math.max(0,Math.min(WYe(b,r),i-2)),k=r[p],M=r[p+1];return Math.max(0,Math.min(i-1,p+(b-k)/(M-k)))},t.b2j=function(b){var p=Math.max(0,Math.min(WYe(b,n),a-2)),k=n[p],M=n[p+1];return Math.max(0,Math.min(a-1,p+(b-k)/(M-k)))},t.ab2ij=function(b){return[t.a2i(b[0]),t.b2j(b[1])]},t.i2c=function(b,p){return t.evalxy([],b,p)},t.ab2xy=function(b,p,k){if(!k&&(br[i-1]|pn[a-1]))return[!1,!1];var M=t.a2i(b),T=t.b2j(p),L=t.evalxy([],M,T);if(k){var x=0,C=0,S=[],g,P,E,z;br[i-1]?(g=i-2,P=1,x=(b-r[i-1])/(r[i-1]-r[i-2])):(g=Math.max(0,Math.min(i-2,Math.floor(M))),P=M-g),pn[a-1]?(E=a-2,z=1,C=(p-n[a-1])/(n[a-1]-n[a-2])):(E=Math.max(0,Math.min(a-2,Math.floor(T))),z=T-E),x&&(t.dxydi(S,g,E,P,z),L[0]+=S[0]*x,L[1]+=S[1]*x),C&&(t.dxydj(S,g,E,P,z),L[0]+=S[0]*C,L[1]+=S[1]*C)}return L},t.c2p=function(b,p,k){return[p.c2p(b[0]),k.c2p(b[1])]},t.p2x=function(b,p,k){return[p.p2c(b[0]),k.p2c(b[1])]},t.dadi=function(b){var p=Math.max(0,Math.min(r.length-2,b));return r[p+1]-r[p]},t.dbdj=function(b){var p=Math.max(0,Math.min(n.length-2,b));return n[p+1]-n[p]},t.dxyda=function(b,p,k,M){var T=t.dxydi(null,b,p,k,M),L=t.dadi(b,k);return[T[0]/L,T[1]/L]},t.dxydb=function(b,p,k,M){var T=t.dxydj(null,b,p,k,M),L=t.dbdj(p,M);return[T[0]/L,T[1]/L]},t.dxyda_rough=function(b,p,k){var M=h*(k||.1),T=t.ab2xy(b+M,p,!0),L=t.ab2xy(b-M,p,!0);return[(T[0]-L[0])*.5/M,(T[1]-L[1])*.5/M]},t.dxydb_rough=function(b,p,k){var M=d*(k||.1),T=t.ab2xy(b,p+M,!0),L=t.ab2xy(b,p-M,!0);return[(T[0]-L[0])*.5/M,(T[1]-L[1])*.5/M]},t.dpdx=function(b){return b._m},t.dpdy=function(b){return b._m}}});var rKe=ye((ywr,tKe)=>{"use strict";var i9=ho(),YYe=Pr().isArray1D,dJt=mYe(),KYe=bYe(),JYe=TYe(),$Ye=EYe(),vJt=CYe(),QYe=c8(),eKe=PYe(),pJt=l8(),gJt=ZYe();tKe.exports=function(t,r){var n=i9.getFromId(t,r.xaxis),i=i9.getFromId(t,r.yaxis),a=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&YYe(s)&&u.push("x"),l&&YYe(l)&&u.push("y"),u.length&&pJt(r,a,o,"a","b",u);var c=r._a=r._a||r.a,f=r._b=r._b||r.b;s=r._x||r.x,l=r._y||r.y;var h={};if(r._cheater){var d=a.cheatertype==="index"?c.length:c,v=o.cheatertype==="index"?f.length:f;s=dJt(d,v,r.cheaterslope)}r._x=s=QYe(s),r._y=l=QYe(l),eKe(s,c,f),eKe(l,c,f),gJt(r),r.setScale();var m=KYe(s),b=KYe(l),p=.5*(m[1]-m[0]),k=.5*(m[1]+m[0]),M=.5*(b[1]-b[0]),T=.5*(b[1]+b[0]),L=1.3;return m=[k-p*L,k+p*L],b=[T-M*L,T+M*L],r._extremes[n._id]=i9.findExtremes(n,m,{padded:!0}),r._extremes[i._id]=i9.findExtremes(i,b,{padded:!0}),JYe(r,"a","b"),JYe(r,"b","a"),$Ye(r,a),$Ye(r,o),h.clipsegments=vJt(r._xctrl,r._yctrl,a,o),h.x=s,h.y=l,h.a=c,h.b=f,[h]}});var nKe=ye((_wr,iKe)=>{"use strict";iKe.exports={attributes:K7(),supplyDefaults:iYe(),plot:pYe(),calc:rKe(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:mh(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var oKe=ye((xwr,aKe)=>{"use strict";aKe.exports=nKe()});var q$=ye((bwr,cKe)=>{"use strict";var mJt=Pg(),c0=pf(),yJt=Gl(),{hovertemplateAttrs:_Jt,texttemplateAttrs:xJt,templatefallbackAttrs:sKe}=Ll(),lKe=Tu(),Bx=Ao().extendFlat,ug=c0.marker,W5=c0.line,uKe=ug.line;cKe.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:Bx({},c0.mode,{dflt:"markers"}),text:Bx({},c0.text,{}),texttemplate:xJt({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:sKe({editType:"plot"}),hovertext:Bx({},c0.hovertext,{}),line:{color:W5.color,width:W5.width,dash:W5.dash,backoff:W5.backoff,shape:Bx({},W5.shape,{values:["linear","spline"]}),smoothing:W5.smoothing,editType:"calc"},connectgaps:c0.connectgaps,fill:Bx({},c0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:mJt(),marker:Bx({symbol:ug.symbol,opacity:ug.opacity,maxdisplayed:ug.maxdisplayed,angle:ug.angle,angleref:ug.angleref,standoff:ug.standoff,size:ug.size,sizeref:ug.sizeref,sizemin:ug.sizemin,sizemode:ug.sizemode,line:Bx({width:uKe.width,dash:uKe.dash,editType:"calc"},lKe("marker.line")),gradient:ug.gradient,editType:"calc"},lKe("marker")),textfont:c0.textfont,textposition:c0.textposition,selected:c0.selected,unselected:c0.unselected,hoverinfo:Bx({},yJt.hoverinfo,{flags:["a","b","text","name"]}),hoveron:c0.hoveron,hovertemplate:_Jt(),hovertemplatefallback:sKe(),zorder:c0.zorder}});var vKe=ye((wwr,dKe)=>{"use strict";var fKe=Pr(),bJt=Pm(),X5=Ru(),wJt=$p(),TJt=D0(),hKe=uT(),AJt=F0(),SJt=Fg(),MJt=q$();dKe.exports=function(t,r,n,i){function a(h,d){return fKe.coerce(t,r,MJt,h,d)}a("carpet"),r.xaxis="x",r.yaxis="y";var o=a("a"),s=a("b"),l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext");var u=l{"use strict";pKe.exports=function(t,r){var n={},i=r._carpet,a=i.ab2ij([t.a,t.b]),o=Math.floor(a[0]),s=a[0]-o,l=Math.floor(a[1]),u=a[1]-l,c=i.evalxy([],o,l,s,u);return n.yLabel=c[1].toFixed(3),n}});var n9=ye((Awr,mKe)=>{"use strict";mKe.exports=function(e,t){for(var r=e._fullData.length,n,i=0;i{"use strict";var yKe=Eo(),EJt=z0(),kJt=Dm(),CJt=q0(),LJt=O0().calcMarkerSize,PJt=n9();_Ke.exports=function(t,r){var n=r._carpetTrace=PJt(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){var i;r.xaxis=n.xaxis,r.yaxis=n.yaxis;var a=r._length,o=new Array(a),s,l,u=!1;for(i=0;i{"use strict";var IJt=pT(),bKe=ho(),RJt=So();wKe.exports=function(t,r,n,i){var a,o,s,l=n[0][0].carpet,u=bKe.getFromId(t,l.xaxis||"x"),c=bKe.getFromId(t,l.yaxis||"y"),f={xaxis:u,yaxis:c,plot:r.plot};for(a=0;a{"use strict";var DJt=_T(),FJt=Pr().fillText;AKe.exports=function(t,r,n,i){var a=DJt(t,r,n,i);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var h=o.trace,d=h._carpet,v=h._module.formatLabels(f,h);o.yLabel=v.yLabel,delete o.text;var m=[];function b(M,T){var L;M.labelprefix&&M.labelprefix.length>0?L=M.labelprefix.replace(/ = $/,""):L=M._hovertitle,m.push(L+": "+T.toFixed(3)+M.labelsuffix)}if(!h.hovertemplate){var p=f.hi||h.hoverinfo,k=p.split("+");k.indexOf("all")!==-1&&(k=["a","b","text"]),k.indexOf("a")!==-1&&b(d.aaxis,f.a),k.indexOf("b")!==-1&&b(d.baxis,f.b),m.push("y: "+o.yLabel),k.indexOf("text")!==-1&&FJt(f,h,m),o.extraText=m.join("
")}return a}});var EKe=ye((kwr,MKe)=>{"use strict";MKe.exports=function(t,r,n,i,a){var o=i[a];return t.a=o.a,t.b=o.b,t.y=o.y,t}});var CKe=ye((Cwr,kKe)=>{"use strict";kKe.exports={attributes:q$(),supplyDefaults:vKe(),colorbar:Qd(),formatLabels:gKe(),calc:xKe(),plot:TKe(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:SKe(),selectPoints:xT(),eventData:EKe(),moduleType:"trace",name:"scattercarpet",basePlotModule:mh(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var PKe=ye((Lwr,LKe)=>{"use strict";LKe.exports=CKe()});var O$=ye((Pwr,IKe)=>{"use strict";var cg=qT(),T1=O4(),zJt=Tu(),qJt=Ao().extendFlat,uy=T1.contours;IKe.exports=qJt({carpet:{valType:"string",editType:"calc"},z:cg.z,a:cg.x,a0:cg.x0,da:cg.dx,b:cg.y,b0:cg.y0,db:cg.dy,text:cg.text,hovertext:cg.hovertext,transpose:cg.transpose,atype:cg.xtype,btype:cg.ytype,fillcolor:T1.fillcolor,autocontour:T1.autocontour,ncontours:T1.ncontours,contours:{type:uy.type,start:uy.start,end:uy.end,size:uy.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:uy.showlines,showlabels:uy.showlabels,labelfont:uy.labelfont,labelformat:uy.labelformat,operation:uy.operation,value:uy.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:T1.line.color,width:T1.line.width,dash:T1.line.dash,smoothing:T1.line.smoothing,editType:"plot"},zorder:T1.zorder},zJt("",{cLetter:"z",autoColorDflt:!1}))});var B$=ye((Iwr,FKe)=>{"use strict";var RKe=Pr(),OJt=a8(),DKe=O$(),BJt=FG(),NJt=C8(),UJt=L8();FKe.exports=function(t,r,n,i){function a(u,c){return RKe.coerce(t,r,DKe,u,c)}function o(u){return RKe.coerce2(t,r,DKe,u)}if(a("carpet"),t.a&&t.b){var s=OJt(t,r,a,i,"a","b");if(!s){r.visible=!1;return}a("text");var l=a("contours.type")==="constraint";l?BJt(t,r,a,i,n,{hasHover:!1}):(NJt(t,r,a,o),UJt(t,r,a,i,{hasHover:!1}))}else r._defaultColor=n,r._length=null;a("zorder")}});var BKe=ye((Rwr,OKe)=>{"use strict";var VJt=gv(),zKe=Pr(),GJt=l8(),HJt=c8(),jJt=f8(),WJt=h8(),qKe=nG(),XJt=B$(),ZJt=n9(),YJt=TG();OKe.exports=function(t,r){var n=r._carpetTrace=ZJt(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){if(!r.a||!r.b){var i=t.data[n.index],a=t.data[r.index];a.a||(a.a=i.a),a.b||(a.b=i.b),XJt(a,r,r._defaultColor,t._fullLayout)}var o=KJt(t,r);return YJt(r,r._z),o}};function KJt(e,t){var r=t._carpetTrace,n=r.aaxis,i=r.baxis,a,o,s,l,u,c,f;n._minDtick=0,i._minDtick=0,zKe.isArray1D(t.z)&&GJt(t,n,i,"a","b",["z"]),a=t._a=t._a||t.a,l=t._b=t._b||t.b,a=a?n.makeCalcdata(t,"_a"):[],l=l?i.makeCalcdata(t,"_b"):[],o=t.a0||0,s=t.da||1,u=t.b0||0,c=t.db||1,f=t._z=HJt(t._z||t.z,t.transpose),t._emptypoints=WJt(f),jJt(f,t._emptypoints);var h=zKe.maxRowLength(f),d=t.xtype==="scaled"?"":a,v=qKe(t,d,o,s,h,n),m=t.ytype==="scaled"?"":l,b=qKe(t,m,u,c,f.length,i),p={a:v,b,z:f};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&VJt(e,t,{vals:f,containerStr:"",cLetter:"z"}),[p]}});var UKe=ye((Dwr,NKe)=>{"use strict";var JJt=Pr().isArrayOrTypedArray;NKe.exports=function(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v,m,b,p=JJt(r)?"a":"b",k=p==="a"?e.aaxis:e.baxis,M=k.smoothing,T=p==="a"?e.a2i:e.b2j,L=p==="a"?r:n,x=p==="a"?n:r,C=p==="a"?t.a.length:t.b.length,S=p==="a"?t.b.length:t.a.length,g=Math.floor(p==="a"?e.b2j(x):e.a2i(x)),P=p==="a"?function(_e){return e.evalxy([],_e,g)}:function(_e){return e.evalxy([],g,_e)};M&&(o=Math.max(0,Math.min(S-2,g)),s=g-o,a=p==="a"?function(_e,Ee){return e.dxydi([],_e,o,Ee,s)}:function(_e,Ee){return e.dxydj([],o,_e,s,Ee)});var E=T(L[0]),z=T(L[1]),q=E0?Math.floor:Math.ceil,Z=q>0?Math.ceil:Math.floor,j=q>0?Math.min:Math.max,N=q>0?Math.max:Math.min,H=G(E+V),ie=Z(z-V);c=P(E);var ae=[[c]];for(i=H;i*q{"use strict";var o9=qa(),s9=R$(),WKe=D$(),gC=So(),A1=Pr(),$Jt=SG(),QJt=MG(),Sw=R8(),a9=N4(),e$t=LG(),t$t=CG(),r$t=PG(),i$t=n9(),VKe=UKe();XKe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;A1.makeTraceGroups(i,n,"contour").each(function(s){var l=o9.select(this),u=s[0],c=u.trace,f=c._carpetTrace=i$t(t,c),h=t.calcdata[f.index][0];if(!f.visible||f.visible==="legendonly")return;var d=u.a,v=u.b,m=c.contours,b=t$t(m,r,u),p=m.type==="constraint",k=m._operation,M=p?k==="="?"lines":"fill":m.coloring;function T(G){var Z=f.ab2xy(G[0],G[1],!0);return[a.c2p(Z[0]),o.c2p(Z[1])]}var L=[[d[0],v[v.length-1]],[d[d.length-1],v[v.length-1]],[d[d.length-1],v[0]],[d[0],v[0]]];$Jt(b);var x=(d[d.length-1]-d[0])*1e-8,C=(v[v.length-1]-v[0])*1e-8;QJt(b,x,C);var S=b;m.type==="constraint"&&(S=e$t(b,k)),n$t(b,T);var g,P,E,z,q=[];for(z=h.clipsegments.length-1;z>=0;z--)g=h.clipsegments[z],P=s9([],g.x,a.c2p),E=s9([],g.y,o.c2p),P.reverse(),E.reverse(),q.push(WKe(P,E,g.bicubic));var V="M"+q.join("L")+"Z";s$t(l,h.clipsegments,a,o,p,M),l$t(c,l,a,o,S,L,T,f,h,M,V),a$t(l,b,t,u,m,r,f),gC.setClipUrl(l,f._clipPathId,t)})};function n$t(e,t){var r,n,i,a,o,s,l,u,c;for(r=0;rb&&(n.max=b),n.len=n.max-n.min}function GKe(e,t,r){var n=e.getPointAtLength(t),i=e.getPointAtLength(r),a=i.x-n.x,o=i.y-n.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function HKe(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function jKe(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function s$t(e,t,r,n,i,a){var o,s,l,u,c=A1.ensureSingle(e,"g","contourbg"),f=c.selectAll("path").data(a==="fill"&&!i?[0]:[]);f.enter().append("path"),f.exit().remove();var h=[];for(u=0;u=0&&(d=P,m=b):Math.abs(h[1]-d[1])=0&&(d=P,m=b):A1.log("endpt to newendpt is not vert. or horz.",h,d,P)}if(m>=0)break;u+=S(h,d),h=d}if(m===t.edgepaths.length){A1.log("unclosed perimeter path");break}l=m,f=c.indexOf(l)===-1,f&&(l=c[0],u+=S(h,d)+"Z",h=null)}for(l=0;l{"use strict";YKe.exports={attributes:O$(),supplyDefaults:B$(),colorbar:z8(),calc:BKe(),plot:ZKe(),style:F8(),moduleType:"trace",name:"contourcarpet",basePlotModule:mh(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var $Ke=ye((qwr,JKe)=>{"use strict";JKe.exports=KKe()});var u9=ye((Owr,iJe)=>{"use strict";var l9=Pr().extendFlat,mC=pf(),QKe=vf().axisHoverFormat,{hovertemplateAttrs:c$t,templatefallbackAttrs:f$t}=Ll(),tJe=Pd().dash,h$t=g3(),rJe=QT(),d$t=rJe.INCREASING.COLOR,v$t=rJe.DECREASING.COLOR,N$=mC.line;function eJe(e){return{line:{color:l9({},N$.color,{dflt:e}),width:N$.width,dash:tJe,editType:"style"},editType:"style"}}iJe.exports={xperiod:mC.xperiod,xperiod0:mC.xperiod0,xperiodalignment:mC.xperiodalignment,xhoverformat:QKe("x"),yhoverformat:QKe("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:l9({},N$.width,{}),dash:l9({},tJe,{}),editType:"style"},increasing:eJe(d$t),decreasing:eJe(v$t),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:c$t({},{keys:["open","high","low","close"]}),hovertemplatefallback:f$t(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:l9({},h$t.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:mC.zorder}});var U$=ye((Bwr,nJe)=>{"use strict";var p$t=Oa(),g$t=Pr();nJe.exports=function(t,r,n,i){var a=n("x"),o=n("open"),s=n("high"),l=n("low"),u=n("close");n("hoverlabel.split");var c=p$t.getComponentMethod("calendars","handleTraceDefaults");if(c(t,r,["x"],i),!!(o&&s&&l&&u)){var f=Math.min(o.length,s.length,l.length,u.length);return a&&(f=Math.min(f,g$t.minRowLength(a))),r._length=f,f}}});var sJe=ye((Nwr,oJe)=>{"use strict";var m$t=Pr(),y$t=U$(),_$t=Dg(),x$t=u9();oJe.exports=function(t,r,n,i){function a(s,l){return m$t.coerce(t,r,x$t,s,l)}var o=y$t(t,r,a,i);if(!o){r.visible=!1;return}_$t(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),a("line.dash"),aJe(t,r,a,"increasing"),aJe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("tickwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function aJe(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}});var V$=ye((Uwr,uJe)=>{"use strict";var Z5=Pr(),c9=Z5._,f9=ho(),b$t=zg(),yC=fs().BADNUM;function w$t(e,t){var r=f9.getFromId(e,t.xaxis),n=f9.getFromId(e,t.yaxis),i=A$t(e,r,t),a=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var l=lJe(e,t,o,s,n,T$t);return t._extremes[r._id]=f9.findExtremes(r,s,{vpad:a/2}),l.length?(Z5.extendFlat(l[0].t,{wHover:a/2,tickLen:i}),l):[{t:{empty:!0}}]}function T$t(e,t,r,n){return{o:e,h:t,l:r,c:n}}function lJe(e,t,r,n,i,a){for(var o=i.makeCalcdata(t,"open"),s=i.makeCalcdata(t,"high"),l=i.makeCalcdata(t,"low"),u=i.makeCalcdata(t,"close"),c=Z5.isArrayOrTypedArray(t.text),f=Z5.isArrayOrTypedArray(t.hovertext),h=!0,d=null,v=!!t.xperiodalignment,m=[],b=0;bd):h=L>k,d=L;var x=a(k,M,T,L);x.pos=p,x.yc=(k+L)/2,x.i=b,x.dir=h?"increasing":"decreasing",x.x=x.pos,x.y=[T,M],v&&(x.orig_p=r[b]),c&&(x.tx=t.text[b]),f&&(x.htx=t.hovertext[b]),m.push(x)}else m.push({pos:p,empty:!0})}return t._extremes[i._id]=f9.findExtremes(i,Z5.concat(l,s),{padded:!0}),m.length&&(m[0].t={labels:{open:c9(e,"open:")+" ",high:c9(e,"high:")+" ",low:c9(e,"low:")+" ",close:c9(e,"close:")+" "}}),m}function A$t(e,t,r){var n=r._minDiff;if(!n){var i=e._fullData,a=[];n=1/0;var o;for(o=0;o{"use strict";var S$t=qa(),cJe=Pr();fJe.exports=function(t,r,n,i){var a=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;cJe.makeTraceGroups(i,n,"trace ohlc").each(function(l){var u=S$t.select(this),c=l[0],f=c.t,h=c.trace;if(h.visible!==!0||f.empty){u.remove();return}var d=f.tickLen,v=u.selectAll("path").data(cJe.identity);v.enter().append("path"),v.exit().remove(),v.attr("d",function(m){if(m.empty)return"M0,0Z";var b=o.c2p(m.pos-d,!0),p=o.c2p(m.pos+d,!0),k=s?(b+p)/2:o.c2p(m.pos,!0),M=a.c2p(m.o,!0),T=a.c2p(m.h,!0),L=a.c2p(m.l,!0),x=a.c2p(m.c,!0);return"M"+b+","+M+"H"+k+"M"+k+","+T+"V"+L+"M"+p+","+x+"H"+k})})}});var vJe=ye((Gwr,dJe)=>{"use strict";var G$=qa(),M$t=So(),E$t=ka();dJe.exports=function(t,r,n){var i=n||G$.select(t).selectAll("g.ohlclayer").selectAll("g.trace");i.style("opacity",function(a){return a[0].trace.opacity}),i.each(function(a){var o=a[0].trace;G$.select(this).selectAll("path").each(function(s){if(!s.empty){var l=o[s.dir].line;G$.select(this).style("fill","none").call(E$t.stroke,l.color).call(M$t.dashLine,l.dash,l.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var j$=ye((Hwr,_Je)=>{"use strict";var H$=ho(),k$t=Pr(),h9=ef(),C$t=ka(),L$t=Pr().fillText,pJe=QT(),P$t={increasing:pJe.INCREASING.SYMBOL,decreasing:pJe.DECREASING.SYMBOL};function I$t(e,t,r,n){var i=e.cd,a=i[0].trace;return a.hoverlabel.split?mJe(e,t,r,n):yJe(e,t,r,n)}function gJe(e,t,r,n){var i=e.cd,a=e.xa,o=i[0].trace,s=i[0].t,l=o.type,u=l==="ohlc"?"l":"min",c=l==="ohlc"?"h":"max",f,h,d=s.bPos||0,v=function(P){return P.pos+d-t},m=s.bdPos||s.tickLen,b=s.wHover,p=Math.min(1,m/Math.abs(a.r2c(a.range[1])-a.r2c(a.range[0])));f=e.maxHoverDistance-p,h=e.maxSpikeDistance-p;function k(P){var E=v(P);return h9.inbox(E-b,E+b,f)}function M(P){var E=P[u],z=P[c];return E===z||h9.inbox(E-r,z-r,f)}function T(P){return(k(P)+M(P))/2}var L=h9.getDistanceFunction(n,k,M,T);if(h9.getClosest(i,L,e),e.index===!1)return null;var x=i[e.index];if(x.empty)return null;var C=x.dir,S=o[C],g=S.line.color;return C$t.opacity(g)&&S.line.width?e.color=g:e.color=S.fillcolor,e.x0=a.c2p(x.pos+d-m,!0),e.x1=a.c2p(x.pos+d+m,!0),e.xLabelVal=x.orig_p!==void 0?x.orig_p:x.pos,e.spikeDistance=T(x)*h/f,e.xSpike=a.c2p(x.pos,!0),e}function mJe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=[],u=gJe(e,t,r,n);if(!u)return[];var c=i[u.index],f=c.hi||o.hoverinfo||"";if(f==="none"||f==="skip")return[];for(var h=["high","open","close","low"],d={},v=0;v"+s.labels[m]+H$.hoverLabelText(a,b,o.yhoverformat)):(k=k$t.extendFlat({},u),k.y0=k.y1=p,k.yLabelVal=b,k.yLabel=s.labels[m]+H$.hoverLabelText(a,b,o.yhoverformat),k.name="",l.push(k),d[b]=k)}return l}function yJe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=gJe(e,t,r,n);if(!l)return[];var u=l.index,c=i[u],f=l.index=c.i,h=c.dir;function d(T){return s.labels[T]+H$.hoverLabelText(a,o[T][f],o.yhoverformat)}var v=c.hi||o.hoverinfo||"",m=v.split("+"),b=v==="all",p=b||m.indexOf("y")!==-1,k=b||m.indexOf("text")!==-1,M=p?[d("open"),d("high"),d("low"),d("close")+" "+P$t[h]]:[];return k&&L$t(c,o,M),l.extraText=M.join("
"),l.y0=l.y1=a.c2p(c.yc,!0),[l]}_Je.exports={hoverPoints:I$t,hoverSplit:mJe,hoverOnPoints:yJe}});var W$=ye((jwr,xJe)=>{"use strict";xJe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l=n[0].t.bPos||0;if(r===!1)for(s=0;s{"use strict";bJe.exports={moduleType:"trace",name:"ohlc",basePlotModule:mh(),categories:["cartesian","svg","showLegend"],meta:{},attributes:u9(),supplyDefaults:sJe(),calc:V$().calc,plot:hJe(),style:vJe(),hoverPoints:j$().hoverPoints,selectPoints:W$()}});var AJe=ye((Xwr,TJe)=>{"use strict";TJe.exports=wJe()});var Z$=ye((Zwr,EJe)=>{"use strict";var X$=Pr().extendFlat,SJe=vf().axisHoverFormat,vp=u9(),Y5=C4();function MJe(e){return{line:{color:X$({},Y5.line.color,{dflt:e}),width:Y5.line.width,editType:"style"},fillcolor:Y5.fillcolor,editType:"style"}}EJe.exports={xperiod:vp.xperiod,xperiod0:vp.xperiod0,xperiodalignment:vp.xperiodalignment,xhoverformat:SJe("x"),yhoverformat:SJe("y"),x:vp.x,open:vp.open,high:vp.high,low:vp.low,close:vp.close,line:{width:X$({},Y5.line.width,{}),editType:"style"},increasing:MJe(vp.increasing.line.color.dflt),decreasing:MJe(vp.decreasing.line.color.dflt),text:vp.text,hovertext:vp.hovertext,hovertemplate:vp.hovertemplate,hovertemplatefallback:vp.hovertemplatefallback,whiskerwidth:X$({},Y5.whiskerwidth,{dflt:0}),hoverlabel:vp.hoverlabel,zorder:Y5.zorder}});var LJe=ye((Ywr,CJe)=>{"use strict";var R$t=Pr(),D$t=ka(),F$t=U$(),z$t=Dg(),q$t=Z$();CJe.exports=function(t,r,n,i){function a(s,l){return R$t.coerce(t,r,q$t,s,l)}var o=F$t(t,r,a,i);if(!o){r.visible=!1;return}z$t(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),kJe(t,r,a,"increasing"),kJe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("whiskerwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function kJe(e,t,r,n){var i=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",D$t.addOpacity(i,.5))}});var DJe=ye((Kwr,RJe)=>{"use strict";var PJe=Pr(),IJe=ho(),O$t=zg(),B$t=V$().calcCommon;RJe.exports=function(e,t){var r=e._fullLayout,n=IJe.getFromId(e,t.xaxis),i=IJe.getFromId(e,t.yaxis),a=n.makeCalcdata(t,"x"),o=O$t(t,n,"x",a).vals,s=B$t(e,t,a,o,i,N$t);return s.length?(PJe.extendFlat(s[0].t,{num:r._numBoxes,dPos:PJe.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function N$t(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var zJe=ye((Jwr,FJe)=>{"use strict";FJe.exports={moduleType:"trace",name:"candlestick",basePlotModule:mh(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:Z$(),layoutAttributes:L4(),supplyLayoutDefaults:QI().supplyLayoutDefaults,crossTraceCalc:t8().crossTraceCalc,supplyDefaults:LJe(),calc:DJe(),plot:r8().plot,layerName:"boxlayer",style:i8().style,hoverPoints:j$().hoverPoints,selectPoints:W$()}});var OJe=ye(($wr,qJe)=>{"use strict";qJe.exports=zJe()});var K$=ye((Qwr,BJe)=>{"use strict";var v9=Pr(),U$t=xm(),d9=v9.deg2rad,Y$=v9.rad2deg;BJe.exports=function(t,r,n){switch(U$t(t,n),t._id){case"x":case"radialaxis":V$t(t,r);break;case"angularaxis":j$t(t,r);break}};function V$t(e,t){var r=t._subplot;e.setGeometry=function(){var n=e._rl[0],i=e._rl[1],a=r.innerRadius,o=(r.radius-a)/(i-n),s=a/o,l=n>i?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var c=e.c2l(u)-n;return(l(c)?c:0)+s},e.g2c=function(u){return e.l2c(u+n-s)},e.g2p=function(u){return u*o},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function G$t(e,t){return t==="degrees"?d9(e):e}function H$t(e,t){return t==="degrees"?Y$(e):e}function j$t(e,t){var r=e.type;if(r==="linear"){var n=e.d2c,i=e.c2d;e.d2c=function(a,o){return G$t(n(a),o)},e.c2d=function(a,o){return i(H$t(a,o))}}e.makeCalcdata=function(a,o){var s=a[o],l=a._length,u,c,f=function(b){return e.d2c(b,a.thetaunit)};if(s)for(u=new Array(l),c=0;c{"use strict";NJe.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}});var m9=ye((t3r,jJe)=>{"use strict";var Mw=Pr(),UJe=zM().tester,J$=Mw.findIndexOfMin,GJe=Mw.isAngleInsideSector,W$t=Mw.angleDelta,VJe=Mw.angleDist;function X$t(e,t,r,n,i){if(!GJe(t,n))return!1;var a,o;r[0]0?o:1/0},n=J$(t,r),i=Mw.mod(n+1,t.length);return[t[n],t[i]]}function g9(e){return Math.abs(e)>1e-10?e:0}function $$(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),a=0;a{"use strict";function WJe(e){return e<0?-1:e>0?1:0}function J5(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function $5(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function XJe(e,t){return t*e.radius}function tQt(e,t,r,n){var i=$5(e,J5([r,t])),a=i[0],o=i[1],s=$5(e,J5([n,t])),l=s[0],u=s[1];if(t===0)return["M"+a+","+o,"L"+l+","+u].join(" ");var c=XJe(e,1/Math.abs(t));return["M"+a+","+o,"A"+c+","+c+" 0 0,"+(t<0?1:0)+" "+l+","+u].join(" ")}function rQt(e,t,r,n){var i=XJe(e,1/(t+1)),a=$5(e,J5([t,r])),o=a[0],s=a[1],l=$5(e,J5([t,n])),u=l[0],c=l[1];if(WJe(r)!==WJe(n)){var f=$5(e,J5([t,0])),h=f[0],d=f[1];return["M"+o+","+s,"A"+i+","+i+" 0 0,"+(0{"use strict";var Ew=qa(),iQt=fd(),Cw=Oa(),Xc=Pr(),cy=Xc.strRotate,xd=Xc.strTranslate,eQ=ka(),_C=So(),nQt=Mc(),pp=ho(),aQt=xm(),oQt=K$(),sQt=Mg().doAutoRange,S1=XN(),x9=yv(),YJe=ef(),lQt=qb(),uQt=qf().prepSelect,cQt=qf().selectOnClick,tQ=qf().clearOutline,KJe=Eg(),JJe=wM(),$Je=LM().redrawReglTraces,fQt=Dh().MID_SHIFT,Nx=p9(),M1=m9(),b9=Q$(),y9=b9.smith,hQt=b9.reactanceArc,dQt=b9.resistanceArc,_9=b9.smithTransform,vQt=Xc._,QJe=Xc.mod,Ux=Xc.deg2rad,kw=Xc.rad2deg;function e$e(e,t,r){this.isSmith=r||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=e._fullLayout,i="clip"+n._uid+t;this.clipIds.forTraces=i+"-for-traces",this.clipPaths.forTraces=n._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=n["_"+(r?"smith":"polar")+"layer"].append("g").attr("class",t),this.getHole=function(a){return this.isSmith?0:a.hole},this.getSector=function(a){return this.isSmith?[0,360]:a.sector},this.getRadial=function(a){return this.isSmith?a.realaxis:a.radialaxis},this.getAngular=function(a){return this.isSmith?a.imaginaryaxis:a.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var Nd=e$e.prototype;i$e.exports=function(t,r,n){return new e$e(t,r,n)};Nd.plot=function(e,t){for(var r=this,n=t[r.id],i=!1,a=0;ab?(p=u,k=u*b,L=(c-k)/i.h/2,M=[s[0],s[1]],T=[l[0]+L,l[1]-L]):(p=c/b,k=c,L=(u-p)/i.w/2,M=[s[0]+L,s[1]-L],T=[l[0],l[1]]),r.xLength2=p,r.yLength2=k,r.xDomain2=M,r.yDomain2=T;var x=r.xOffset2=i.l+i.w*M[0],C=r.yOffset2=i.t+i.h*(1-T[1]),S=r.radius=p/d,g=r.innerRadius=r.getHole(t)*S,P=r.cx=x-S*h[0],E=r.cy=C+S*h[3],z=r.cxx=P-x,q=r.cyy=E-C,V=a.side,G;V==="counterclockwise"?(G=V,V="top"):V==="clockwise"&&(G=V,V="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:V,_trueSide:G,domain:[g/i.w,S/i.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:M}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:T});var Z=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",Z).attr("transform",xd(z,q)),n.frontplot.attr("transform",xd(x,C)).call(_C.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",Z).attr("transform",xd(P,E)).call(eQ.fill,t.bgcolor)};Nd.mockAxis=function(e,t,r,n){var i=Xc.extendFlat({},r,n);return oQt(i,t,e),i};Nd.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,a=r._id,o=Xc.extendFlat({type:"linear"},r);aQt(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var l=n.sectorBBox,u=s[a],c=n.radialAxis._rl,f=(c[1]-c[0])/(1-n.getHole(t));o.range=[l[u[0]]*f,l[u[1]]*f]},o.isPtWithinRange=a==="x"&&!i?function(l){return n.isPtInside(l)}:function(){return!0},o.setRange(),o.setScale(),o};Nd.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(t);sQt(n,i);var o=i.range;if(a.range=o.slice(),a._input.range=o.slice(),i._rl=[i.r2l(o[0],null,"gregorian"),i.r2l(o[1],null,"gregorian")],i.minallowed!==void 0){var s=i.r2l(i.minallowed);i._rl[0]>i._rl[1]?i._rl[1]=Math.max(i._rl[1],s):i._rl[0]=Math.max(i._rl[0],s)}if(i.maxallowed!==void 0){var l=i.r2l(i.maxallowed);i._rl[0]90&&c<=270&&(f.tickangle=180);var v=d?function(S){var g=_9(r,y9([S.x,0]));return xd(g[0]-s,g[1]-l)}:function(S){return xd(f.l2p(S.x)+o,0)},m=d?function(S){return dQt(r,S.x,-1/0,1/0)}:function(S){return r.pathArc(f.r2p(S.x)+o)},b=t$e(u);if(r.radialTickLayout!==b&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=b),h){f.setScale();var p=0,k=d?(f.tickvals||[]).filter(function(S){return S>=0}).map(function(S){return pp.tickText(f,S,!0,!1)}):pp.calcTicks(f),M=d?k:pp.clipEnds(f,k),T=pp.getTickSigns(f)[2];d&&((f.ticks==="top"&&f.side==="bottom"||f.ticks==="bottom"&&f.side==="top")&&(T=-T),f.ticks==="top"&&f.side==="top"&&(p=-f.ticklen),f.ticks==="bottom"&&f.side==="bottom"&&(p=f.ticklen)),pp.drawTicks(n,f,{vals:k,layer:i["radial-axis"],path:pp.makeTickPath(f,0,T),transFn:v,crisp:!1}),pp.drawGrid(n,f,{vals:M,layer:i["radial-grid"],path:m,transFn:Xc.noop,crisp:!1}),pp.drawLabels(n,f,{vals:k,layer:i["radial-axis"],transFn:v,labelFns:pp.makeLabelFns(f,p)})}var L=r.radialAxisAngle=r.vangles?kw(r$e(Ux(u.angle),r.vangles)):u.angle,x=xd(s,l),C=x+cy(-L);xC(i["radial-axis"],h&&(u.showticklabels||u.ticks),{transform:C}),xC(i["radial-grid"],h&&u.showgrid,{transform:d?"":x}),xC(i["radial-line"].select("line"),h&&u.showline,{x1:d?-a:o,y1:0,x2:a,y2:0,transform:C}).attr("stroke-width",u.linewidth).call(eQ.stroke,u.linecolor)};Nd.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,l=n.getRadial(t),u=n.id+"title",c=0;if(l.title){var f=_C.bBox(n.layers["radial-axis"].node()).height,h=l.title.font.size,d=l.side;c=d==="top"?h:d==="counterclockwise"?-(f+h*.4):f+h*.8}var v=r!==void 0?r:n.radialAxisAngle,m=Ux(v),b=Math.cos(m),p=Math.sin(m),k=o+a/2*b+c*p,M=s-a/2*p+c*b;n.layers["radial-axis-title"]=lQt.draw(i,u,{propContainer:l,propName:n.id+".radialaxis.title.text",placeholder:vQt(i,"Click to enter radial axis title"),attributes:{x:k,y:M,"text-anchor":"middle"},transform:{rotate:-v}})}};Nd.updateAngularAxis=function(e,t){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getAngular(t),c=r.angularAxis,f=r.isSmith;f||(r.fillViewInitialKey("angularaxis.rotation",u.rotation),c.setGeometry(),c.setScale());var h=f?function(g){var P=_9(r,y9([0,g.x]));return Math.atan2(P[0]-s,P[1]-l)-Math.PI/2}:function(g){return c.t2g(g.x)};c.type==="linear"&&c.thetaunit==="radians"&&(c.tick0=kw(c.tick0),c.dtick=kw(c.dtick));var d=function(g){return xd(s+a*Math.cos(g),l-a*Math.sin(g))},v=f?function(g){var P=_9(r,y9([0,g.x]));return xd(P[0],P[1])}:function(g){return d(h(g))},m=f?function(g){var P=_9(r,y9([0,g.x])),E=Math.atan2(P[0]-s,P[1]-l)-Math.PI/2;return xd(P[0],P[1])+cy(-kw(E))}:function(g){var P=h(g);return d(P)+cy(-kw(P))},b=f?function(g){return hQt(r,g.x,0,1/0)}:function(g){var P=h(g),E=Math.cos(P),z=Math.sin(P);return"M"+[s+o*E,l-o*z]+"L"+[s+a*E,l-a*z]},p=pp.makeLabelFns(c,0),k=p.labelStandoff,M={};M.xFn=function(g){var P=h(g);return Math.cos(P)*k},M.yFn=function(g){var P=h(g),E=Math.sin(P)>0?.2:1;return-Math.sin(P)*(k+g.fontSize*E)+Math.abs(Math.cos(P))*(g.fontSize*fQt)},M.anchorFn=function(g){var P=h(g),E=Math.cos(P);return Math.abs(E)<.1?"middle":E>0?"start":"end"},M.heightFn=function(g,P,E){var z=h(g);return-.5*(1+Math.sin(z))*E};var T=t$e(u);r.angularTickLayout!==T&&(i["angular-axis"].selectAll("."+c._id+"tick").remove(),r.angularTickLayout=T);var L=f?[1/0].concat(c.tickvals||[]).map(function(g){return pp.tickText(c,g,!0,!1)}):pp.calcTicks(c);f&&(L[0].text="\u221E",L[0].fontSize*=1.75);var x;if(t.gridshape==="linear"?(x=L.map(h),Xc.angleDelta(x[0],x[1])<0&&(x=x.slice().reverse())):x=null,r.vangles=x,c.type==="category"&&(L=L.filter(function(g){return Xc.isAngleInsideSector(h(g),r.sectorInRad)})),c.visible){var C=c.ticks==="inside"?-1:1,S=(c.linewidth||1)/2;pp.drawTicks(n,c,{vals:L,layer:i["angular-axis"],path:"M"+C*S+",0h"+C*c.ticklen,transFn:m,crisp:!1}),pp.drawGrid(n,c,{vals:L,layer:i["angular-grid"],path:b,transFn:Xc.noop,crisp:!1}),pp.drawLabels(n,c,{vals:L,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:v,labelFns:M})}xC(i["angular-line"].select("path"),u.showline,{d:r.pathSubplot(),transform:xd(s,l)}).attr("stroke-width",u.linewidth).call(eQ.stroke,u.linecolor)};Nd.updateFx=function(e,t){if(!this.gd._context.staticPlot){var r=!this.isSmith;r&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e)}};Nd.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,i=t.layers,a=e._zoomlayer,o=Nx.MINZOOM,s=Nx.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,h=t.cxx,d=t.cyy,v=t.sectorInRad,m=t.vangles,b=t.radialAxis,p=M1.clampTiny,k=M1.findXYatLength,M=M1.findEnclosingVertexAngles,T=Nx.cornerHalfWidth,L=Nx.cornerLen/2,x,C,S=S1.makeDragger(i,"path","maindrag",e.dragmode===!1?"none":"crosshair");Ew.select(S).attr("d",t.pathSubplot()).attr("transform",xd(c,f)),S.onmousemove=function(ce){YJe.hover(n,ce,t.id),n._fullLayout._lasthover=S,n._fullLayout._hoversubplot=t.id},S.onmouseout=function(ce){n._dragging||x9.unhover(n,ce)};var g={element:S,gd:n,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},P,E,z,q,V,G,Z,j,N;function H(ce,He){return Math.sqrt(ce*ce+He*He)}function ie(ce,He){return H(ce-h,He-d)}function ae(ce,He){return Math.atan2(d-He,ce-h)}function _e(ce,He){return[ce*Math.cos(He),ce*Math.sin(-He)]}function Ee(ce,He){if(ce===0)return t.pathSector(2*T);var lt=L/ce,mt=He-lt,Ht=He+lt,at=Math.max(0,Math.min(ce,l)),ct=at-T,ar=at+T;return"M"+_e(ct,mt)+"A"+[ct,ct]+" 0,0,0 "+_e(ct,Ht)+"L"+_e(ar,Ht)+"A"+[ar,ar]+" 0,0,1 "+_e(ar,mt)+"Z"}function Ce(ce,He,lt){if(ce===0)return t.pathSector(2*T);var mt=_e(ce,He),Ht=_e(ce,lt),at=p((mt[0]+Ht[0])/2),ct=p((mt[1]+Ht[1])/2),ar,Vt;if(at&&ct){var rr=ct/at,tt=-1/rr,je=k(T,rr,at,ct);ar=k(L,tt,je[0][0],je[0][1]),Vt=k(L,tt,je[1][0],je[1][1])}else{var Ue,Ae;ct?(Ue=L,Ae=T):(Ue=T,Ae=L),ar=[[at-Ue,ct-Ae],[at+Ue,ct-Ae]],Vt=[[at-Ue,ct+Ae],[at+Ue,ct+Ae]]}return"M"+ar.join("L")+"L"+Vt.reverse().join("L")+"Z"}function ge(){z=null,q=null,V=t.pathSubplot(),G=!1;var ce=n._fullLayout[t.id];Z=iQt(ce.bgcolor).getLuminance(),j=S1.makeZoombox(a,Z,c,f,V),j.attr("fill-rule","evenodd"),N=S1.makeCorners(a,c,f),tQ(n)}function re(ce,He){return He=Math.max(Math.min(He,l),u),ceo?(ce-1&&ce===1&&cQt(He,n,[t.xaxis],[t.yaxis],t.id,g),lt.indexOf("event")>-1&&YJe.click(n,He,t.id)}g.prepFn=function(ce,He,lt){var mt=n._fullLayout.dragmode,Ht=S.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var at=n._fullLayout._invTransform;x=n._fullLayout._invScaleX,C=n._fullLayout._invScaleY;var ct=Xc.apply3DTransform(at)(He-Ht.left,lt-Ht.top);if(P=ct[0],E=ct[1],m){var ar=M1.findPolygonOffset(l,v[0],v[1],m);P+=h+ar[0],E+=d+ar[1]}switch(mt){case"zoom":g.clickFn=Pe,r||(m?g.moveFn=Be:g.moveFn=ke,g.doneFn=Le,ge(ce,He,lt));break;case"select":case"lasso":uQt(ce,He,lt,g,mt);break}},x9.init(g)};Nd.updateRadialDrag=function(e,t,r){var n=this,i=n.gd,a=n.layers,o=n.radius,s=n.innerRadius,l=n.cx,u=n.cy,c=n.radialAxis,f=Nx.radialDragBoxSize,h=f/2;if(!c.visible)return;var d=Ux(n.radialAxisAngle),v=c._rl,m=v[0],b=v[1],p=v[r],k=.75*(v[1]-v[0])/(1-n.getHole(t))/o,M,T,L;r?(M=l+(o+h)*Math.cos(d),T=u-(o+h)*Math.sin(d),L="radialdrag"):(M=l+(s-h)*Math.cos(d),T=u-(s-h)*Math.sin(d),L="radialdrag-inner");var x=S1.makeRectDragger(a,L,"crosshair",-h,-h,f,f),C={element:x,gd:i};e.dragmode===!1&&(C.dragmode=!1),xC(Ew.select(x),c.visible&&s0!=(r?P>m:P=90||i>90&&a>=450?d=1:s<=0&&u<=0?d=0:d=Math.max(s,u),i<=180&&a>=180||i>180&&a>=540?c=-1:o>=0&&l>=0?c=0:c=Math.min(o,l),i<=270&&a>=270||i>270&&a>=630?f=-1:s>=0&&u>=0?f=0:f=Math.min(s,u),a>=360?h=1:o<=0&&l<=0?h=0:h=Math.max(o,l),[c,f,h,d]}function r$e(e,t){var r=function(i){return Xc.angleDist(e,i)},n=Xc.findIndexOfMin(t,r);return t[n]}function xC(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var iQ=ye((n3r,u$e)=>{"use strict";var gQt=Ih(),os=Rd(),mQt=Cc().attributes,f0=Pr().extendFlat,n$e=mc().overrideAll,a$e=n$e({color:os.color,showline:f0({},os.showline,{dflt:!0}),linecolor:os.linecolor,linewidth:os.linewidth,showgrid:f0({},os.showgrid,{dflt:!0}),gridcolor:os.gridcolor,gridwidth:os.gridwidth,griddash:os.griddash},"plot","from-root"),o$e=n$e({tickmode:os.minor.tickmode,nticks:os.nticks,tick0:os.tick0,dtick:os.dtick,tickvals:os.tickvals,ticktext:os.ticktext,ticks:os.ticks,ticklen:os.ticklen,tickwidth:os.tickwidth,tickcolor:os.tickcolor,ticklabelstep:os.ticklabelstep,showticklabels:os.showticklabels,labelalias:os.labelalias,minorloglabels:os.minorloglabels,showtickprefix:os.showtickprefix,tickprefix:os.tickprefix,showticksuffix:os.showticksuffix,ticksuffix:os.ticksuffix,showexponent:os.showexponent,exponentformat:os.exponentformat,minexponent:os.minexponent,separatethousands:os.separatethousands,tickfont:os.tickfont,tickangle:os.tickangle,tickformat:os.tickformat,tickformatstops:os.tickformatstops,layer:os.layer},"plot","from-root"),s$e={visible:f0({},os.visible,{dflt:!0}),type:f0({},os.type,{values:["-","linear","log","date","category"]}),autotypenumbers:os.autotypenumbers,autorangeoptions:{minallowed:os.autorangeoptions.minallowed,maxallowed:os.autorangeoptions.maxallowed,clipmin:os.autorangeoptions.clipmin,clipmax:os.autorangeoptions.clipmax,include:os.autorangeoptions.include,editType:"plot"},autorange:f0({},os.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:f0({},os.minallowed,{editType:"plot"}),maxallowed:f0({},os.maxallowed,{editType:"plot"}),range:f0({},os.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:os.categoryorder,categoryarray:os.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:os.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:f0({},os.title.text,{editType:"plot",dflt:""}),font:f0({},os.title.font,{editType:"plot"}),editType:"plot"},hoverformat:os.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};f0(s$e,a$e,o$e);var l$e={visible:f0({},os.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:os.autotypenumbers,categoryorder:os.categoryorder,categoryarray:os.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:os.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};f0(l$e,a$e,o$e);u$e.exports={domain:mQt({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:gQt.background},radialaxis:s$e,angularaxis:l$e,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var d$e=ye((a3r,h$e)=>{"use strict";var w9=Pr(),yQt=ka(),_Qt=vl(),xQt=q_(),bQt=Id().getSubplotData,wQt=Pb(),TQt=q3(),AQt=s_(),SQt=l_(),MQt=fI(),EQt=c4(),kQt=SB(),CQt=H3(),f$e=iQ(),LQt=K$(),T9=p9(),c$e=T9.axisNames;function PQt(e,t,r,n){var i=r("bgcolor");n.bgColor=yQt.combine(i,n.paper_bgcolor);var a=r("sector");r("hole");var o=bQt(n.fullData,T9.name,n.id),s=n.layoutOut,l;function u(j,N){return r(l+"."+j,N)}for(var c=0;c{"use strict";var RQt=Id().getSubplotCalcData,DQt=Pr().counterRegex,FQt=rQ(),p$e=p9(),g$e=p$e.attr,Lw=p$e.name,v$e=DQt(Lw),m$e={};m$e[g$e]={valType:"subplotid",dflt:Lw,editType:"calc"};function zQt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Lw],i=0;i{"use strict";var{hovertemplateAttrs:OQt,texttemplateAttrs:BQt,templatefallbackAttrs:_$e}=Ll(),S9=Ao().extendFlat,NQt=Pg(),h0=pf(),UQt=Gl(),Q5=h0.line;x$e.exports={mode:h0.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:h0.text,texttemplate:BQt({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:_$e({editType:"plot"}),hovertext:h0.hovertext,line:{color:Q5.color,width:Q5.width,dash:Q5.dash,backoff:Q5.backoff,shape:S9({},Q5.shape,{values:["linear","spline"]}),smoothing:Q5.smoothing,editType:"calc"},connectgaps:h0.connectgaps,marker:h0.marker,cliponaxis:S9({},h0.cliponaxis,{dflt:!1}),textposition:h0.textposition,textfont:h0.textfont,fill:S9({},h0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:NQt(),hoverinfo:S9({},UQt.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:h0.hoveron,hovertemplate:OQt(),hovertemplatefallback:_$e(),selected:h0.selected,unselected:h0.unselected}});var E9=ye((l3r,T$e)=>{"use strict";var M9=Pr(),eS=Ru(),VQt=$p(),GQt=D0(),b$e=uT(),HQt=F0(),jQt=Fg(),WQt=Pm().PTS_LINESONLY,XQt=bC();function ZQt(e,t,r,n){function i(s,l){return M9.coerce(e,t,XQt,s,l)}var a=w$e(e,t,n,i);if(!a){t.visible=!1;return}i("thetaunit"),i("mode",a{"use strict";var YQt=Pr(),A$e=ho();S$e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o,s;a?(o=a.radialAxis,s=a.angularAxis):(a=n[r.subplot],o=a.radialaxis,s=a.angularaxis);var l=o.c2l(t.r);i.rLabel=A$e.tickText(o,l,!0).text;var u=s.thetaunit==="degrees"?YQt.rad2deg(t.theta):t.theta;return i.thetaLabel=A$e.tickText(s,u,!0).text,i}});var k$e=ye((c3r,E$e)=>{"use strict";var M$e=Eo(),KQt=fs().BADNUM,JQt=ho(),$Qt=z0(),QQt=Dm(),eer=q0(),ter=O0().calcMarkerSize;E$e.exports=function(t,r){for(var n=t._fullLayout,i=r.subplot,a=n[i].radialaxis,o=n[i].angularaxis,s=a.makeCalcdata(r,"r"),l=o.makeCalcdata(r,"theta"),u=r._length,c=new Array(u),f=0;f{"use strict";var rer=pT(),C$e=fs().BADNUM;L$e.exports=function(t,r,n){for(var i=r.layers.frontplot.select("g.scatterlayer"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=r.radialAxis,u=r.angularAxis,c=0;c{"use strict";var ier=_T();function ner(e,t,r,n){var i=ier(e,t,r,n);if(!(!i||i[0].index===!1)){var a=i[0];if(a.index===void 0)return i;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,I$e(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function I$e(e,t,r,n){var i=r.radialAxis,a=r.angularAxis;i._hovertitle="r",a._hovertitle="\u03B8";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.rLabel=s.rLabel,n.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["r","theta","text"]),f.indexOf("r")!==-1&&c(i,n.rLabel),f.indexOf("theta")!==-1&&c(a,n.thetaLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}R$e.exports={hoverPoints:ner,makeHoverPointText:I$e}});var F$e=ye((d3r,D$e)=>{"use strict";D$e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:A9(),categories:["polar","symbols","showLegend","scatter-like"],attributes:bC(),supplyDefaults:E9().supplyDefaults,colorbar:Qd(),formatLabels:k9(),calc:k$e(),plot:P$e(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:C9().hoverPoints,selectPoints:xT(),meta:{}}});var q$e=ye((v3r,z$e)=>{"use strict";z$e.exports=F$e()});var nQ=ye((m3r,B$e)=>{"use strict";var O$e=bC(),{cliponaxis:p3r,hoveron:g3r}=O$e,aer=mee(O$e,["cliponaxis","hoveron"]),{connectgaps:oer,line:{color:ser,dash:ler,width:uer},fill:cer,fillcolor:fer,marker:her,textfont:der,textposition:ver}=mk();B$e.exports=j1(_g({},aer),{connectgaps:oer,fill:cer,fillcolor:fer,line:{color:ser,dash:ler,editType:"calc",width:uer},marker:her,textfont:der,textposition:ver})});var V$e=ye((_3r,U$e)=>{"use strict";var N$e=Pr(),aQ=Ru(),per=E9().handleRThetaDefaults,ger=$p(),mer=D0(),yer=F0(),_er=Fg(),xer=Pm().PTS_LINESONLY,ber=nQ();U$e.exports=function(t,r,n,i){function a(s,l){return N$e.coerce(t,r,ber,s,l)}var o=per(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("mode",o{"use strict";var wer=k9();G$e.exports=function(t,r,n){var i=t.i;return"r"in t||(t.r=r._r[i]),"theta"in t||(t.theta=r._theta[i]),wer(t,r,n)}});var W$e=ye((b3r,j$e)=>{"use strict";var Ter=z0(),Aer=O0().calcMarkerSize,Ser=lw(),Mer=ho(),Eer=gx().TOO_MANY_POINTS;j$e.exports=function(t,r){var n=t._fullLayout,i=r.subplot,a=n[i].radialaxis,o=n[i].angularaxis,s=r._r=a.makeCalcdata(r,"r"),l=r._theta=o.makeCalcdata(r,"theta"),u=r._length,c={};u{"use strict";var ker=XF(),Cer=C9().makeHoverPointText;function Ler(e,t,r,n){var i=e.cd,a=i[0].t,o=a.r,s=a.theta,l=ker.hoverPoints(e,t,r,n);if(!(!l||l[0].index===!1)){var u=l[0];if(u.index===void 0)return l;var c=e.subplot,f=u.cd[u.index],h=u.trace;if(f.r=o[u.index],f.theta=s[u.index],!!c.isPtInside(f))return u.xLabelVal=void 0,u.yLabelVal=void 0,Cer(f,h,c,u),l}}X$e.exports={hoverPoints:Ler}});var K$e=ye((T3r,Y$e)=>{"use strict";Y$e.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:A9(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:nQ(),supplyDefaults:V$e(),colorbar:Qd(),formatLabels:H$e(),calc:W$e(),hoverPoints:Z$e().hoverPoints,selectPoints:mY(),meta:{}}});var J$e=ye((A3r,oQ)=>{"use strict";var Per=KF(),Ier=Eo(),Rer=bK(),Der=vY(),L9=lw(),P9=Pr(),Fer=gx().TOO_MANY_POINTS,zer={};oQ.exports=function(t,r,n){if(n.length){var i=r.radialAxis,a=r.angularAxis,o=Der(t,r);return n.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var l=s[0],u=l.trace,c=l.t,f=u._length,h=c.r,d=c.theta,v=c.opts,m,b=h.slice(),p=d.slice();for(m=0;m=Fer&&(v.marker.cluster=c.tree),v.marker&&(v.markerSel.positions=v.markerUnsel.positions=v.marker.positions=k),v.line&&k.length>1&&P9.extendFlat(v.line,L9.linePositions(t,u,k)),v.text&&(P9.extendFlat(v.text,{positions:k},L9.textPosition(t,u,v.text,v.marker)),P9.extendFlat(v.textSel,{positions:k},L9.textPosition(t,u,v.text,v.markerSel)),P9.extendFlat(v.textUnsel,{positions:k},L9.textPosition(t,u,v.text,v.markerUnsel))),v.fill&&!o.fill2d&&(o.fill2d=!0),v.marker&&!o.scatter2d&&(o.scatter2d=!0),v.line&&!o.line2d&&(o.line2d=!0),v.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(v.line),o.fillOptions.push(v.fill),o.markerOptions.push(v.marker),o.markerSelectedOptions.push(v.markerSel),o.markerUnselectedOptions.push(v.markerUnsel),o.textOptions.push(v.text),o.textSelectedOptions.push(v.textSel),o.textUnselectedOptions.push(v.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),c.x=M,c.y=T,c.rawx=M,c.rawy=T,c.r=h,c.theta=d,c.positions=k,c._scene=o,c.index=o.count,o.count++}}),Rer(t,r,n)}};oQ.exports.reglPrecompiled=zer});var eQe=ye((S3r,Q$e)=>{"use strict";var $$e=K$e();$$e.plot=J$e();Q$e.exports=$$e});var rQe=ye((M3r,tQe)=>{"use strict";tQe.exports=eQe()});var sQ=ye((E3r,iQe)=>{"use strict";var{hovertemplateAttrs:qer,templatefallbackAttrs:Oer}=Ll(),tS=Ao().extendFlat,Vx=bC(),Gx=qm();iQe.exports={r:Vx.r,theta:Vx.theta,r0:Vx.r0,dr:Vx.dr,theta0:Vx.theta0,dtheta:Vx.dtheta,thetaunit:Vx.thetaunit,base:tS({},Gx.base,{}),offset:tS({},Gx.offset,{}),width:tS({},Gx.width,{}),text:tS({},Gx.text,{}),hovertext:tS({},Gx.hovertext,{}),marker:Ber(),hoverinfo:Vx.hoverinfo,hovertemplate:qer(),hovertemplatefallback:Oer(),selected:Gx.selected,unselected:Gx.unselected};function Ber(){var e=tS({},Gx.marker);return delete e.cornerradius,e}});var lQ=ye((k3r,nQe)=>{"use strict";nQe.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var sQe=ye((C3r,oQe)=>{"use strict";var aQe=Pr(),Ner=E9().handleRThetaDefaults,Uer=XI(),Ver=sQ();oQe.exports=function(t,r,n,i){function a(s,l){return aQe.coerce(t,r,Ver,s,l)}var o=Ner(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),Uer(t,r,a,n,i),aQe.coerceSelectionMarkerOpacity(r,a)}});var uQe=ye((L3r,lQe)=>{"use strict";var Ger=Pr(),Her=lQ();lQe.exports=function(e,t,r){var n={},i;function a(l,u){return Ger.coerce(e[i]||{},t[i],Her,l,u)}for(var o=0;o{"use strict";var cQe=pv().hasColorscale,fQe=gv(),jer=Pr().isArrayOrTypedArray,Wer=S4(),Xer=i2().setGroupPositions,Zer=q0(),Yer=Oa().traceIs,Ker=Pr().extendFlat;function Jer(e,t){for(var r=e._fullLayout,n=t.subplot,i=r[n].radialaxis,a=r[n].angularaxis,o=i.makeCalcdata(t,"r"),s=a.makeCalcdata(t,"theta"),l=t._length,u=new Array(l),c=o,f=s,h=0;h{"use strict";var dQe=qa(),I9=Eo(),rS=Pr(),Qer=So(),cQ=m9();vQe.exports=function(t,r,n){var i=t._context.staticPlot,a=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=etr(r),c=r.layers.frontplot.select("g.barlayer");rS.makeTraceGroups(c,n,"trace bars").each(function(){var f=dQe.select(this),h=rS.ensureSingle(f,"g","points"),d=h.selectAll("g.point").data(rS.identity);d.enter().append("g").style("vector-effect",i?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),d.exit().remove(),d.each(function(v){var m=dQe.select(this),b=v.rp0=s.c2p(v.s0),p=v.rp1=s.c2p(v.s1),k=v.thetag0=l.c2g(v.p0),M=v.thetag1=l.c2g(v.p1),T;if(!I9(b)||!I9(p)||!I9(k)||!I9(M)||b===p||k===M)T="M0,0Z";else{var L=s.c2g(v.s1),x=(k+M)/2;v.ct=[a.c2p(L*Math.cos(x)),o.c2p(L*Math.sin(x))],T=u(b,p,k,M)}rS.ensureSingle(m,"path").attr("d",T)}),Qer.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function etr(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,i,a,o){var s,l;rS.angleDelta(a,o)>0?(s=a,l=o):(s=o,l=a);var u=cQ.findEnclosingVertexAngles(s,e.vangles)[0],c=cQ.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return cQ.pathPolygonAnnulus(n,i,s,l,f,t,r)}:function(n,i,a,o){return rS.pathAnnulus(n,i,a,o,t,r)}}});var mQe=ye((R3r,gQe)=>{"use strict";var ttr=ef(),fQ=Pr(),rtr=RT().getTraceColor,itr=fQ.fillText,ntr=C9().makeHoverPointText,atr=m9().isPtInsidePolygon;gQe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s=o.radialAxis,l=o.angularAxis,u=o.vangles,c=u?atr:fQ.isPtInsideSector,f=t.maxHoverDistance,h=l._period||2*Math.PI,d=Math.abs(s.g2p(Math.sqrt(r*r+n*n))),v=Math.atan2(n,r);s.range[0]>s.range[1]&&(v+=Math.PI);var m=function(M){return c(d,v,[M.rp0,M.rp1],[M.thetag0,M.thetag1],u)?f+Math.min(1,Math.abs(M.thetag1-M.thetag0)/h)-1+(M.rp1-d)/(M.rp1-M.rp0)-1:1/0};if(ttr.getClosest(i,m,t),t.index!==!1){var b=t.index,p=i[b];t.x0=t.x1=p.ct[0],t.y0=t.y1=p.ct[1];var k=fQ.extendFlat({},p,{r:p.s,theta:p.p});return itr(p,a,t),ntr(k,a,o,t),t.hovertemplate=a.hovertemplate,t.color=rtr(a,p),t.xLabelVal=t.yLabelVal=void 0,p.s<0&&(t.idealAlign="left"),[t]}}});var _Qe=ye((D3r,yQe)=>{"use strict";yQe.exports={moduleType:"trace",name:"barpolar",basePlotModule:A9(),categories:["polar","bar","showLegend"],attributes:sQ(),layoutAttributes:lQ(),supplyDefaults:sQe(),supplyLayoutDefaults:uQe(),calc:uQ().calc,crossTraceCalc:uQ().crossTraceCalc,plot:pQe(),colorbar:Qd(),formatLabels:k9(),style:V0().style,styleOnSelect:V0().styleOnSelect,hoverPoints:mQe(),selectPoints:DT(),meta:{}}});var bQe=ye((F3r,xQe)=>{"use strict";xQe.exports=_Qe()});var hQ=ye((z3r,wQe)=>{"use strict";wQe.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var dQ=ye((q3r,MQe)=>{"use strict";var otr=Ih(),Uf=Rd(),str=Cc().attributes,Hx=Pr().extendFlat,TQe=mc().overrideAll,AQe=TQe({color:Uf.color,showline:Hx({},Uf.showline,{dflt:!0}),linecolor:Uf.linecolor,linewidth:Uf.linewidth,showgrid:Hx({},Uf.showgrid,{dflt:!0}),gridcolor:Uf.gridcolor,gridwidth:Uf.gridwidth,griddash:Uf.griddash},"plot","from-root"),SQe=TQe({ticklen:Uf.ticklen,tickwidth:Hx({},Uf.tickwidth,{dflt:2}),tickcolor:Uf.tickcolor,showticklabels:Uf.showticklabels,labelalias:Uf.labelalias,showtickprefix:Uf.showtickprefix,tickprefix:Uf.tickprefix,showticksuffix:Uf.showticksuffix,ticksuffix:Uf.ticksuffix,tickfont:Uf.tickfont,tickformat:Uf.tickformat,hoverformat:Uf.hoverformat,layer:Uf.layer},"plot","from-root"),ltr=Hx({visible:Hx({},Uf.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:Hx({},Uf.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},AQe,SQe),utr=Hx({visible:Hx({},Uf.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:Uf.ticks,editType:"calc"},AQe,SQe);MQe.exports={domain:str({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:otr.background},realaxis:ltr,imaginaryaxis:utr,editType:"calc"}});var CQe=ye((O3r,kQe)=>{"use strict";var iS=Pr(),ctr=ka(),ftr=vl(),htr=q_(),dtr=Id().getSubplotData,vtr=l_(),ptr=s_(),gtr=c4(),mtr=xm(),nS=dQ(),vQ=hQ(),EQe=vQ.axisNames,ytr=xtr(function(e){return iS.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function _tr(e,t,r,n){var i=r("bgcolor");n.bgColor=ctr.combine(i,n.paper_bgcolor);var a=dtr(n.fullData,vQ.name,n.id),o=n.layoutOut,s;function l(L,x){return r(s+"."+L,x)}for(var u=0;u{"use strict";var btr=Id().getSubplotCalcData,wtr=Pr().counterRegex,Ttr=rQ(),PQe=hQ(),IQe=PQe.attr,Pw=PQe.name,LQe=wtr(Pw),RQe={};RQe[IQe]={valType:"subplotid",dflt:Pw,editType:"calc"};function Atr(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Pw],i=0;i{"use strict";var{hovertemplateAttrs:Mtr,texttemplateAttrs:Etr,templatefallbackAttrs:zQe}=Ll(),R9=Ao().extendFlat,ktr=Pg(),d0=pf(),Ctr=Gl(),aS=d0.line;qQe.exports={mode:d0.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:d0.text,texttemplate:Etr({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:zQe({editType:"plot"}),hovertext:d0.hovertext,line:{color:aS.color,width:aS.width,dash:aS.dash,backoff:aS.backoff,shape:R9({},aS.shape,{values:["linear","spline"]}),smoothing:aS.smoothing,editType:"calc"},connectgaps:d0.connectgaps,marker:d0.marker,cliponaxis:R9({},d0.cliponaxis,{dflt:!1}),textposition:d0.textposition,textfont:d0.textfont,fill:R9({},d0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:ktr(),hoverinfo:R9({},Ctr.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:d0.hoveron,hovertemplate:Mtr(),hovertemplatefallback:zQe(),selected:d0.selected,unselected:d0.unselected}});var NQe=ye((U3r,BQe)=>{"use strict";var D9=Pr(),oS=Ru(),Ltr=$p(),Ptr=D0(),OQe=uT(),Itr=F0(),Rtr=Fg(),Dtr=Pm().PTS_LINESONLY,Ftr=pQ();BQe.exports=function(t,r,n,i){function a(l,u){return D9.coerce(t,r,Ftr,l,u)}var o=ztr(t,r,i,a);if(!o){r.visible=!1;return}a("mode",o{"use strict";var UQe=ho();VQe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.realLabel=UQe.tickText(a.radialAxis,t.real,!0).text,i.imagLabel=UQe.tickText(a.angularAxis,t.imag,!0).text,i}});var WQe=ye((G3r,jQe)=>{"use strict";var HQe=Eo(),qtr=fs().BADNUM,Otr=z0(),Btr=Dm(),Ntr=q0(),Utr=O0().calcMarkerSize;jQe.exports=function(t,r){for(var n=t._fullLayout,i=r.subplot,a=n[i].realaxis,o=n[i].imaginaryaxis,s=a.makeCalcdata(r,"real"),l=o.makeCalcdata(r,"imag"),u=r._length,c=new Array(u),f=0;f{"use strict";var Vtr=pT(),XQe=fs().BADNUM,Gtr=Q$(),Htr=Gtr.smith;ZQe.exports=function(t,r,n){for(var i=r.layers.frontplot.select("g.scatterlayer"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=0;l{"use strict";var jtr=_T();function Wtr(e,t,r,n){var i=jtr(e,t,r,n);if(!(!i||i[0].index===!1)){var a=i[0];if(a.index===void 0)return i;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,KQe(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function KQe(e,t,r,n){var i=r.radialAxis,a=r.angularAxis;i._hovertitle="real",a._hovertitle="imag";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.realLabel=s.realLabel,n.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["real","imag","text"]),f.indexOf("real")!==-1&&c(i,n.realLabel),f.indexOf("imag")!==-1&&c(a,n.imagLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}JQe.exports={hoverPoints:Wtr,makeHoverPointText:KQe}});var eet=ye((W3r,QQe)=>{"use strict";QQe.exports={moduleType:"trace",name:"scattersmith",basePlotModule:FQe(),categories:["smith","symbols","showLegend","scatter-like"],attributes:pQ(),supplyDefaults:NQe(),colorbar:Qd(),formatLabels:GQe(),calc:WQe(),plot:YQe(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:$Qe().hoverPoints,selectPoints:xT(),meta:{}}});var ret=ye((X3r,tet)=>{"use strict";tet.exports=eet()});var kv=ye((Z3r,net)=>{var z9=Nh();function iet(){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={}}z9(iet.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,i){return n=(e!=null&&e.year?e.calendar():typeof n=="string"?this.instance(n,i):n)||this.instance(),n.newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(r){return e[r]})}},substituteChineseDigits:function(e,t){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(a===0?"":e[a]+t[i])+n,i++,r=Math.floor(r/10)}return n.indexOf(e[1]+t[1])===0&&(n=n.substr(1)),n||e[0]}}});function gQ(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function F9(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}z9(gQ.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e==null?this:e,t,r)},year:function(e){return arguments.length===0?this._year:this.set(e,"y")},month:function(e){return arguments.length===0?this._month:this.set(e,"m")},day:function(e){return arguments.length===0?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,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(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Gs.local.differentCalendars||Gs.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+F9(Math.abs(this.year()),4)+"-"+F9(this.month(),2)+"-"+F9(this.day(),2)}});function mQ(){this.shortYearCutoff="+10"}z9(mQ.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new gQ(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+F9(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,Gs.local.invalidMonth||Gs.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,Gs.local.invalidMonth||Gs.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.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(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,r==="d"||r==="w"){var n=e.toJD()+t*(r==="w"?this.daysInWeek():1),i=e.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=e.year()+(r==="y"?t:0),o=e.monthOfYear()+(r==="m"?t:0),i=e.day(),s=function(c){for(;of-1+c.minMonth;)a++,o-=f,f=c.monthsInYear(a)};r==="y"?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):r==="m"&&(s(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var l=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,l}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,t,r,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(t[0]===0||e.year()>0!=t[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;t=this._add(e,r*i[0]+a*i[1],i[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate);var n=r==="y"?t:e.year(),i=r==="m"?t:e.month(),a=r==="d"?t:e.day();return(r==="y"||r==="m")&&(a=Math.min(a,this.daysInMonth(n,i))),e.date(n,i,a)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||e!==0;if(n){var i=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Gs=net.exports=new iet;Gs.cdate=gQ;Gs.baseCalendar=mQ;Gs.calendars.gregorian=yQ});var aet=ye(()=>{var _Q=Nh(),Ud=kv();_Q(Ud.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"});Ud.local=Ud.regionalOptions[""];_Q(Ud.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});_Q(Ud.baseCalendar.prototype,{UNIX_EPOCH:Ud.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:Ud.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,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(e,t,r){if(typeof e!="string"&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw Ud.local.invalidFormat||Ud.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,i=r.dayNames||this.local.dayNames,a=r.monthNumbers||this.local.monthNumbers,o=r.monthNamesShort||this.local.monthNamesShort,s=r.monthNames||this.local.monthNames,l=r.calculateWeek||this.local.calculateWeek,u=function(T,L){for(var x=1;M+x1},c=function(T,L,x,C){var S=""+L;if(u(T,C))for(;S.length1},k=function(z,q){var V=p(z,q),G=[2,3,V?4:2,V?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],Z=new RegExp("^-?\\d{1,"+G+"}"),j=t.substring(S).match(Z);if(!j)throw(Ud.local.missingNumberAt||Ud.regionalOptions[""].missingNumberAt).replace(/\{0\}/,S);return S+=j[0].length,parseInt(j[0],10)},M=this,T=function(){if(typeof s=="function"){p("m");var z=s.call(M,t.substring(S));return S+=z.length,z}return k("m")},L=function(z,q,V,G){for(var Z=p(z,G)?V:q,j=0;j-1){h=1,d=v;for(var E=this.daysInMonth(f,h);d>E;E=this.daysInMonth(f,h))h++,d-=E}return c>-1?this.fromJD(c):this.newDate(f,h,d)},determineDate:function(e,t,r,n,i){r&&typeof r!="object"&&(i=n,n=r,r=null),typeof n!="string"&&(i=n,n="");var a=this,o=function(s){try{return a.parseDate(n,s,i)}catch(f){}s=s.toLowerCase();for(var l=(s.match(/^c/)&&r?r.newDate():null)||a.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=u.exec(s);c;)l.add(parseInt(c[1],10),c[2]||"d"),c=u.exec(s);return l};return t=t?t.newDate():null,e=e==null?t:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,"d"):a.newDate(e),e}})});var oet=ye(()=>{var jx=kv(),Xtr=Nh(),xQ=jx.instance();function q9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}q9.prototype=new jx.baseCalendar;Xtr(q9.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if(typeof e=="string"){var r=e.match(Ytr);return r?r[0]:""}var n=this._validateYear(e),i=e.month(),a=""+this.toChineseMonth(n,i);return t&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(n,i)&&(a+="i"),a},monthNames:function(e){if(typeof e=="string"){var t=e.match(Ktr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=this.toChineseMonth(r,n),a=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95F0"+a),a},monthNamesShort:function(e){if(typeof e=="string"){var t=e.match(Jtr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=this.toChineseMonth(r,n),a=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95F0"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),n;if(isNaN(r))t[0]==="\u95F0"&&(n=!0,t=t.substring(1)),t[t.length-1]==="\u6708"&&(t=t.substring(0,t.length-1)),r=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(t);else{var i=t[t.length-1];n=i==="i"||i==="I"}var a=this.toMonthIndex(e,r,n);return a},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(e,t){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var n=this.intercalaryMonth(e),i=r&&t!==n;if(i||t<1||t>12)throw jx.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return n?!r&&t<=n?a=t-1:a=t:a=t-1,a},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),n=r?12:11;if(t<0||t>n)throw jx.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return r?t>13;return r},isIntercalaryMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,t,r){var n=this._validateYear(e,jx.local.invalidyear),i=Xx[n-Xx[0]],a=i>>9&4095,o=i>>5&15,s=i&31,l;l=xQ.newDate(a,o,s),l.add(4-(l.dayOfWeek()||7),"d");var u=this.toJD(e,t,r)-l.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=Wx[e-Wx[0]],n=r>>13,i=n?12:11;if(t>i)throw jx.local.invalidMonth.replace(/\{0\}/,this.local.name);var a=r&1<<12-t?30:29;return a},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,a,r,jx.local.invalidDate);e=this._validateYear(n.year()),t=n.month(),r=n.day();var i=this.isIntercalaryMonth(e,t),a=this.toChineseMonth(e,t),o=Qtr(e,a,r,i);return xQ.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=xQ.fromJD(e),r=$tr(t.year(),t.month(),t.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(e){var t=e.match(Ztr),r=this._validateYear(+t[1]),n=+t[2],i=!!t[3],a=this.toMonthIndex(r,n,i),o=+t[4];return this.newDate(r,a,o)},add:function(e,t,r){var n=e.year(),i=e.month(),a=this.isIntercalaryMonth(n,i),o=this.toChineseMonth(n,i),s=Object.getPrototypeOf(q9.prototype).add.call(this,e,t,r);if(r==="y"){var l=s.year(),u=s.month(),c=this.isIntercalaryMonth(l,o),f=a&&c?this.toMonthIndex(l,o,!0):this.toMonthIndex(l,o,!1);f!==u&&s.month(f)}return s}});var Ztr=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,Ytr=/^\d?\d[iI]?/m,Ktr=/^闰?十?[一二三四五六七八九]?月/m,Jtr=/^闰?十?[一二三四五六七八九]?/m;jx.calendars.chinese=q9;var Wx=[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],Xx=[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 $tr(e,t,r,n){var i,a;if(typeof e=="object")i=e,a=t||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var s=typeof t=="number"&&t>=1&&t<=12;if(!s)throw new Error("Solar month outside range 1 - 12");var l=typeof r=="number"&&r>=1&&r<=31;if(!l)throw new Error("Solar day outside range 1 - 31");i={year:e,month:t,day:r},a=n||{}}var u=Xx[i.year-Xx[0]],c=i.year<<9|i.month<<5|i.day;a.year=c>=u?i.year:i.year-1,u=Xx[a.year-Xx[0]];var f=u>>9&4095,h=u>>5&15,d=u&31,v,m=new Date(f,h-1,d),b=new Date(i.year,i.month-1,i.day);v=Math.round((b-m)/(24*3600*1e3));var p=Wx[a.year-Wx[0]],k;for(k=0;k<13;k++){var M=p&1<<12-k?30:29;if(v>13;return!T||k=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var l=typeof t=="number"&&t>=1&&t<=12;if(!l)throw new Error("Lunar month outside range 1 - 12");var u=typeof r=="number"&&r>=1&&r<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var c;typeof n=="object"?(c=!1,a=n):(c=!!n,a=i||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var h=Wx[o.year-Wx[0]],d=h>>13,v;d&&(o.month>d||o.isIntercalary)?v=o.month:v=o.month-1;for(var m=0;m>9&4095,M=p>>5&15,T=p&31,L=new Date(k,M-1,T+f);return a.year=L.getFullYear(),a.month=1+L.getMonth(),a.day=L.getDate(),a}});var set=ye(()=>{var Iw=kv(),err=Nh();function bQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}bQ.prototype=new Iw.baseCalendar;err(bQ.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(r){var t=this._validate(r,this.minMonth,this.minDay,Iw.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Iw.local.invalidYear||Iw.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Iw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,Iw.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,i=t-(n-1)*30+1;return this.newDate(r,n,i)}});Iw.calendars.coptic=bQ});var uet=ye(()=>{var E1=kv(),trr=Nh();function wQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}wQ.prototype=new E1.baseCalendar;trr(wQ.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(e){return this._validate(e,this.minMonth,this.minDay,E1.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,E1.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,E1.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,E1.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,E1.local.invalidDate);return(n.day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,E1.local.invalidDate);return{century:rrr[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,t,r){var n=this._validate(e,t,r,E1.local.invalidDate);return e=n.year()+(n.year()<0?1:0),t=n.month(),r=n.day(),r+(t>1?16:0)+(t>2?(t-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,n)}});var rrr={20:"Fruitbat",21:"Anchovy"};E1.calendars.discworld=wQ});var cet=ye(()=>{var Rw=kv(),irr=Nh();function TQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}TQ.prototype=new Rw.baseCalendar;irr(TQ.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(r){var t=this._validate(r,this.minMonth,this.minDay,Rw.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Rw.local.invalidYear||Rw.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Rw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,Rw.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,i=t-(n-1)*30+1;return this.newDate(r,n,i)}});Rw.calendars.ethiopian=TQ});var fet=ye(()=>{var Zx=kv(),nrr=Nh();function AQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}AQ.prototype=new Zx.baseCalendar;nrr(AQ.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(e){var t=this._validate(e,this.minMonth,this.minDay,Zx.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,O9(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Zx.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Zx.local.invalidYear);return e=t.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Zx.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&O9(this.daysInYear(e),10)===5?30:t===9&&O9(this.daysInYear(e),10)===3?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,Zx.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(e,t,r){var n=this._validate(e,t,r,Zx.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=e<=0?e+1:e,a=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(t<7){for(var o=7;o<=this.monthsInYear(e);o++)a+=this.daysInMonth(e,o);for(var o=1;o=this.toJD(t===-1?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});function O9(e,t){return e-t*Math.floor(e/t)}Zx.calendars.hebrew=AQ});var het=ye(()=>{var wC=kv(),arr=Nh();function SQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}SQ.prototype=new wC.baseCalendar;arr(SQ.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\u012Bs","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(e){var t=this._validate(e,this.minMonth,this.minDay,wC.local.invalidYear);return(t.year()*11+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,wC.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,wC.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e=e<=0?e+1:e,r+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});wC.calendars.islamic=SQ});var det=ye(()=>{var TC=kv(),orr=Nh();function MQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}MQ.prototype=new TC.baseCalendar;orr(MQ.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(r){var t=this._validate(r,this.minMonth,this.minDay,TC.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%4===0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,TC.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,TC.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=t+1524,n=Math.floor((r-122.1)/365.25),i=Math.floor(365.25*n),a=Math.floor((r-i)/30.6001),o=a-Math.floor(a<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-i-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,l)}});TC.calendars.julian=MQ});var pet=ye(()=>{var fg=kv(),srr=Nh();function kQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}kQ.prototype=new fg.baseCalendar;srr(kQ.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(e){return this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var n=Math.floor(e/20);return r+"."+n+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=t*20+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,fg.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,fg.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,fg.local.invalidDate);return n.day()},weekDay:function(e,t,r){return this._validate(e,t,r,fg.local.invalidDate),!0},extraInfo:function(e,t,r){var n=this._validate(e,t,r,fg.local.invalidDate),i=n.toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var t=EQ(e+8+17*20,365);return[Math.floor(t/20)+1,EQ(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[vet(e+20,20),vet(e+4,13)]},toJD:function(e,t,r){var n=this._validate(e,t,r,fg.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e=e%360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}});function EQ(e,t){return e-t*Math.floor(e/t)}function vet(e,t){return EQ(e-1,t)+1}fg.calendars.mayan=kQ});var met=ye(()=>{var Dw=kv(),lrr=Nh();function CQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}CQ.prototype=new Dw.baseCalendar;var get=Dw.instance("gregorian");lrr(CQ.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(e){var t=this._validate(e,this.minMonth,this.minDay,Dw.local.invalidYear||Dw.regionalOptions[""].invalidYear);return get.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Dw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,Dw.local.invalidMonth),i=n.year();i<0&&i++;for(var a=n.day(),o=1;o=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}});Dw.calendars.nanakshahi=CQ});var yet=ye(()=>{var Fw=kv(),urr=Nh();function LQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}LQ.prototype=new Fw.baseCalendar;urr(LQ.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(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Fw.local.invalidYear);if(e=t.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var r=0,n=this.minMonth;n<=12;n++)r+=this.NEPALI_CALENDAR_DATA[e][n];return r},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Fw.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},toJD:function(e,t,r){var n=this._validate(e,t,r,Fw.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=Fw.instance(),a=0,o=t,s=e;this._createMissingCalendarData(e);var l=e-(o>9||o===9&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(t!==9&&(a=r,o--);o!==9;)o<=0&&(o=12,s--),a+=this.NEPALI_CALENDAR_DATA[s][o],o--;return t===9?(a+=r-this.NEPALI_CALENDAR_DATA[s][0],a<0&&(a+=i.daysInYear(l))):a+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(l,1,1).add(a,"d").toJD()},fromJD:function(e){var t=Fw.instance(),r=t.fromJD(e),n=r.year(),i=r.dayOfYear(),a=n+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)o++,o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var u=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r{var sS=kv(),crr=Nh();function N9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function B9(e){var t=e-475;e<0&&t++;var r=.242197,n=r*t,i=r*(t+1),a=n-Math.floor(n),o=i-Math.floor(i);return a>o}N9.prototype=new sS.baseCalendar;crr(N9.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","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,sS.local.invalidYear);return B9(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-((n.dayOfWeek()+1)%7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,sS.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,sS.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=0;if(e>0)for(var a=1;a0?e-1:e)*365+i+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=475+(e-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,B9(r)?30:29)&&(r++,r===0&&r++);var n=e-this.toJD(r,1,1)+1,i=n<=186?Math.ceil(n/31):Math.ceil((n-6)/30),a=e-this.toJD(r,i,1)+1;return this.newDate(r,i,a)}});sS.calendars.persian=N9;sS.calendars.jalali=N9});var xet=ye(()=>{var zw=kv(),frr=Nh(),U9=zw.instance();function PQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}PQ.prototype=new zw.baseCalendar;frr(PQ.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(r){var t=this._validate(r,this.minMonth,this.minDay,zw.local.invalidYear),r=this._t2gYear(t.year());return U9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,zw.local.invalidYear),i=this._t2gYear(n.year());return U9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,zw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,zw.local.invalidDate),i=this._t2gYear(n.year());return U9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=U9.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}});zw.calendars.taiwan=PQ});var bet=ye(()=>{var qw=kv(),hrr=Nh(),V9=qw.instance();function IQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}IQ.prototype=new qw.baseCalendar;hrr(IQ.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(r){var t=this._validate(r,this.minMonth,this.minDay,qw.local.invalidYear),r=this._t2gYear(t.year());return V9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,qw.local.invalidYear),i=this._t2gYear(n.year());return V9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,qw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,qw.local.invalidDate),i=this._t2gYear(n.year());return V9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=V9.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}});qw.calendars.thai=IQ});var wet=ye(()=>{var Ow=kv(),drr=Nh();function RQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}RQ.prototype=new Ow.baseCalendar;drr(RQ.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\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Ow.local.invalidYear);return this.daysInYear(t.year())===355},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,Ow.local.invalidMonth),n=r.toJD()-24e5+.5,i=0,a=0;an)return Yx[i]-Yx[i-1];i++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,Ow.local.invalidDate),i=12*(n.year()-1)+n.month()-15292,a=n.day()+Yx[i-1]-1;return a+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),o=a+1,s=i-12*a,l=t-Yx[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var n=Ow.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(e=e.year!=null?e.year:e,n=e>=1276&&e<=1500),n},_validate:function(e,t,r,n){var i=Ow.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw n.replace(/\{0\}/,this.local.name);return i}});Ow.calendars.ummalqura=RQ;var Yx=[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]});var Aet=ye((STr,Tet)=>{"use strict";Tet.exports=kv();aet();oet();set();uet();cet();fet();het();det();pet();met();yet();_et();xet();bet();wet()});var Iet=ye((MTr,Pet)=>{"use strict";var Eet=Aet(),AC=Pr(),ket=fs(),vrr=ket.EPOCHJD,prr=ket.ONEDAY,zQ={valType:"enumerated",values:AC.sortObjectKeys(Eet.calendars),editType:"calc",dflt:"gregorian"},Cet=function(e,t,r,n){var i={};return i[r]=zQ,AC.coerce(e,t,i,r,n)},grr=function(e,t,r,n){for(var i=0;i{"use strict";Ret.exports=Iet()});var wrr=ye((kTr,zet)=>{var Fet=fye();Fet.register([d1e(),e_e(),vxe(),Fxe(),Yxe(),jbe(),n2e(),W2e(),bwe(),i3e(),H3e(),rke(),jke(),z6e(),ALe(),tPe(),SPe(),KIe(),p8e(),R8e(),j8e(),aRe(),xRe(),zRe(),dFe(),RFe(),KBe(),KNe(),oVe(),IVe(),VGe(),iHe(),EHe(),Bje(),eWe(),AWe(),RXe(),iZe(),OZe(),oKe(),PKe(),$Ke(),AJe(),OJe(),q$e(),rQe(),bQe(),ret(),Det()]);zet.exports=Fet});return wrr();})(); +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/*! + * pad-left + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT license. + */ +/*! + * repeat-string + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ +/*! Bundled license information: + +native-promise-only/lib/npo.src.js: + (*! Native Promise Only + v0.8.1 (c) Kyle Simpson + MIT License: http://getify.mit-license.org + *) + +polybooljs/index.js: + (* + * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc + * @license MIT + * @preserve Project Home: https://github.com/voidqk/polybooljs + *) + +ieee754/index.js: + (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) + +buffer/index.js: + (*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + *) + +safe-buffer/index.js: + (*! safe-buffer. MIT License. Feross Aboukhadijeh *) + +assert/build/internal/util/comparisons.js: + (*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + *) + +object-assign/index.js: + (* + object-assign + (c) Sindre Sorhus + @license MIT + *) + +maplibre-gl/dist/maplibre-gl.js: + (** + * MapLibre GL JS + * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt + *) +*/ + +window.Plotly = Plotly; +return Plotly; +})); \ No newline at end of file diff --git a/scripts/e2e/run-base-path.mjs b/scripts/e2e/run-base-path.mjs new file mode 100644 index 0000000..a0fac62 --- /dev/null +++ b/scripts/e2e/run-base-path.mjs @@ -0,0 +1,16 @@ +import { spawn } from "node:child_process"; + +const child = spawn( + process.execPath, + ["./scripts/e2e/run-playwright.mjs", "test/e2e/base-path.spec.js"], + { + stdio: "inherit", + env: {...process.env, E2E_BASE_PATH: "/agiladmin"}, + }, +); + +child.on("exit", (code) => process.exit(code ?? 1)); +child.on("error", (error) => { + console.error(error); + process.exit(1); +}); diff --git a/scripts/e2e/run-playwright.mjs b/scripts/e2e/run-playwright.mjs index 8fb76e0..8c11bc2 100644 --- a/scripts/e2e/run-playwright.mjs +++ b/scripts/e2e/run-playwright.mjs @@ -1,19 +1,31 @@ -import { spawn } from "node:child_process"; +import { spawn, spawnSync } from "node:child_process"; import { promises as fs } from "node:fs"; import http from "node:http"; import path from "node:path"; import { setTimeout as sleep } from "node:timers/promises"; +import { fileURLToPath } from "node:url"; const args = process.argv.slice(2); const BACKEND_ORIGIN = "http://127.0.0.1:18080"; const PROXY_ORIGIN = "http://127.0.0.1:18081"; const E2E_BASE_PATH = normalizeBasePath(process.env.E2E_BASE_PATH ?? "/"); const E2E_PROXY = process.env.E2E_PROXY ?? "node"; -const REPO_ROOT = path.resolve(path.dirname(new URL(import.meta.url).pathname), "..", ".."); +const REPO_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", ".."); let server; let proxyServer; let caddyProcess; +function stopProcessTree(child) { + if (!child || child.killed) return; + if (process.platform === "win32") { + spawnSync("taskkill.exe", ["/pid", String(child.pid), "/T", "/F"], { + stdio: "ignore", + }); + return; + } + child.kill("SIGTERM"); +} + function normalizeBasePath(basePath) { const raw = String(basePath ?? "").trim(); if (!raw || raw === "/") return "/"; @@ -133,7 +145,6 @@ async function startCaddyProxy(basePath) { } }); - await waitForLogin(`${PROXY_ORIGIN}${basePath === "/" ? "/login" : `${basePath}/login`}`, 15000); return child; } @@ -144,9 +155,12 @@ function stopCaddyProxy() { } async function main() { + const localTemp = path.join(REPO_ROOT, ".tmp"); + await fs.mkdir(localTemp, { recursive: true }); + const childEnv = {...process.env, TEMP: localTemp, TMP: localTemp}; server = spawn("node", ["./scripts/e2e/start-agiladmin.mjs"], { stdio: "inherit", - env: process.env, + env: childEnv, }); server.on("exit", (code) => { @@ -168,10 +182,11 @@ async function main() { await waitForLogin(loginUrl); const baseURL = proxied ? PROXY_ORIGIN : BACKEND_ORIGIN; - const runner = spawn("npx", ["playwright", "test", ...args], { + const playwrightCli = path.join(REPO_ROOT, "node_modules", "@playwright", "test", "cli.js"); + const runner = spawn(process.execPath, [playwrightCli, "test", ...args], { stdio: "inherit", env: { - ...process.env, + ...childEnv, PLAYWRIGHT_BASE_URL: baseURL, }, }); @@ -180,9 +195,7 @@ async function main() { runner.on("exit", (code) => resolve(code ?? 1)); }); - if (server && !server.killed) { - server.kill("SIGTERM"); - } + stopProcessTree(server); if (proxyServer) { await new Promise((resolve) => proxyServer.close(resolve)); } @@ -192,9 +205,7 @@ async function main() { for (const signal of ["SIGINT", "SIGTERM"]) { process.on(signal, () => { - if (server && !server.killed) { - server.kill("SIGTERM"); - } + stopProcessTree(server); if (proxyServer) { proxyServer.close(); } @@ -205,9 +216,7 @@ for (const signal of ["SIGINT", "SIGTERM"]) { main().catch((err) => { console.error(err); - if (server && !server.killed) { - server.kill("SIGTERM"); - } + stopProcessTree(server); if (proxyServer) { proxyServer.close(); } diff --git a/scripts/e2e/start-agiladmin.mjs b/scripts/e2e/start-agiladmin.mjs index 88d4f45..a5b7964 100644 --- a/scripts/e2e/start-agiladmin.mjs +++ b/scripts/e2e/start-agiladmin.mjs @@ -2,9 +2,9 @@ import { spawn } from "node:child_process"; import { promises as fs } from "node:fs"; import { createWriteStream } from "node:fs"; import path from "node:path"; -import os from "node:os"; +import { fileURLToPath } from "node:url"; -const REPO_ROOT = path.resolve(path.dirname(new URL(import.meta.url).pathname), "..", ".."); +const REPO_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", ".."); const TMP_ROOT_PREFIX = "agiladmin-e2e-"; const STATE_DIR = path.join(REPO_ROOT, ".tmp"); const STATE_PATH = path.join(STATE_DIR, "agiladmin-e2e-state.json"); @@ -12,6 +12,11 @@ const OUTPUT_DIR = path.join(REPO_ROOT, "output", "playwright"); const LOG_PATH = path.join(OUTPUT_DIR, "agiladmin-server.log"); const DEBUG_E2E = process.env.DEBUG_E2E === "1"; const E2E_BASE_PATH = normalizeBasePath(process.env.E2E_BASE_PATH ?? "/"); +const CLOJURE_CMD = + process.env.CLOJURE_CMD ?? + (process.platform === "win32" && process.env.LOCALAPPDATA + ? path.join(process.env.LOCALAPPDATA, "Apps", "clojure", "clj.exe") + : "clojure"); function normalizeBasePath(basePath) { const raw = String(basePath ?? "").trim(); @@ -61,7 +66,7 @@ async function generateOwnedFixture(sourceFixturePath, targetFixturePath, ownerN `(agiladmin.e2e.generate-manager-fixture/-main ${JSON.stringify(sourceFixturePath)} ${JSON.stringify(targetFixturePath)} ${JSON.stringify(ownerName)})`, ].join(" "); await new Promise((resolve, reject) => { - const child = spawn("clojure", ["-M", "-e", expr], { + const child = spawn(CLOJURE_CMD, ["-M", "-e", expr], { cwd: REPO_ROOT, stdio: "inherit", }); @@ -81,12 +86,12 @@ async function generateOwnedFixture(sourceFixturePath, targetFixturePath, ownerN } async function prepareEnv() { - const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), TMP_ROOT_PREFIX)); + await fs.mkdir(STATE_DIR, { recursive: true }); + const tempRoot = await fs.mkdtemp(path.join(STATE_DIR, TMP_ROOT_PREFIX)); const budgetsDir = path.join(tempRoot, "budgets"); const fixturesDir = path.join(tempRoot, "fixtures"); await fs.mkdir(budgetsDir, { recursive: true }); await fs.mkdir(fixturesDir, { recursive: true }); - await fs.mkdir(STATE_DIR, { recursive: true }); await fs.mkdir(OUTPUT_DIR, { recursive: true }); await copyBudgetFixtures(budgetsDir); @@ -137,7 +142,7 @@ async function prepareEnv() { async function start() { const state = await prepareEnv(); const logStream = createWriteStream(LOG_PATH, { flags: "a" }); - const child = spawn("clojure", ["-M:run"], { + const child = spawn(CLOJURE_CMD, ["-M:run"], { cwd: REPO_ROOT, env: { ...process.env, diff --git a/scripts/sync-frontend-assets.mjs b/scripts/sync-frontend-assets.mjs index 4c5e5a7..4f33cb4 100644 --- a/scripts/sync-frontend-assets.mjs +++ b/scripts/sync-frontend-assets.mjs @@ -3,6 +3,11 @@ import { dirname, resolve } from "node:path"; const source = resolve("node_modules/htmx.org/dist/htmx.min.js"); const target = resolve("resources/public/static/js/htmx.min.js"); +const plotlySource = resolve( + "node_modules/plotly.js-dist-min/plotly.min.js" +); +const plotlyTarget = resolve("resources/public/static/js/plotly.min.js"); mkdirSync(dirname(target), { recursive: true }); copyFileSync(source, target); +copyFileSync(plotlySource, plotlyTarget); diff --git a/src/agiladmin/view_person.clj b/src/agiladmin/view_person.clj index 054e546..1e58dc9 100644 --- a/src/agiladmin/view_person.clj +++ b/src/agiladmin/view_person.clj @@ -23,6 +23,7 @@ [agiladmin.tabular :as tab] [agiladmin.utils :as util] [agiladmin.graphics :refer :all] + [agiladmin.visualization :as viz] [agiladmin.webpage :as web] [agiladmin.session :as s] [failjure.core :as f] @@ -30,6 +31,7 @@ [clojure.data.json :as json :refer [read-str]] [agiladmin.config :as conf] [agiladmin.view-timesheet :as view-timesheet] + [clojure.string :as str] [taoensso.timbre :as log :refer [debug]] [hiccup.form :as hf])) @@ -73,6 +75,101 @@ tab/dataset to-table))) +(defn- chart-id + [person year suffix] + (-> (str "person-" person "-" year "-" suffix) + str/lower-case + (str/replace #"[^a-z0-9_-]+" "-"))) + +(defn- month-totals + [hours year] + (vec + (for [month (range 1 13)] + (let [month-key (str year "-" month) + month-hours (tab/filter-by hours {:month month-key})] + {:month month-key + :hours (tab/sum-col month-hours :hours) + :projects (count (distinct (tab/column-values month-hours :project)))})))) + +(defn- longest-active-run + [months] + (loop [months months + current 0 + best 0] + (if-let [month (first months)] + (let [active? (pos? (:hours month)) + next-current (if active? (inc current) 0) + next-best (max best next-current)] + (recur (rest months) next-current next-best)) + best))) + +(defn- person-activity-summary + [hours year] + (let [month-data (month-totals hours year) + active-months (filter #(pos? (:hours %)) month-data) + total-hours (tab/sum-col hours :hours) + average-hours (if (seq active-months) + (/ total-hours (count active-months)) + 0) + peak-month (->> month-data (apply max-key :hours) :month) + peak-hours (->> month-data (apply max-key :hours) :hours)] + (into + [:div {:class "grid gap-3 md:grid-cols-2 xl:grid-cols-5"}] + [[:div {:class "rounded-box border border-base-300 bg-base-100 p-4 shadow-sm"} + [:div {:class "text-sm text-base-content/70"} "Total hours"] + [:div {:class "text-2xl font-semibold"} (util/round total-hours)]] + [:div {:class "rounded-box border border-base-300 bg-base-100 p-4 shadow-sm"} + [:div {:class "text-sm text-base-content/70"} "Active months"] + [:div {:class "text-2xl font-semibold"} (count active-months)]] + [:div {:class "rounded-box border border-base-300 bg-base-100 p-4 shadow-sm"} + [:div {:class "text-sm text-base-content/70"} "Average per active month"] + [:div {:class "text-2xl font-semibold"} (util/round average-hours)]] + [:div {:class "rounded-box border border-base-300 bg-base-100 p-4 shadow-sm"} + [:div {:class "text-sm text-base-content/70"} "Peak month"] + [:div {:class "text-2xl font-semibold"} (str (viz/month->label peak-month) " " (util/round peak-hours))]] + [:div {:class "rounded-box border border-base-300 bg-base-100 p-4 shadow-sm"} + [:div {:class "text-sm text-base-content/70"} "Longest active run"] + [:div {:class "text-2xl font-semibold"} (longest-active-run month-data)]]]))) + +(defn- person-activity-section + [config person year hours] + (let [rows (:rows hours) + month-data (month-totals hours year) + monthly-spec (viz/person-monthly-project-chart-spec hours year) + period-spec (viz/person-period-chart-spec hours year) + heatmap-ready? (= :ready (:status (viz/chart-eligibility hours :heatmap))) + heatmap-spec (when heatmap-ready? + (viz/person-activity-heatmap-spec hours year))] + [:section {:class "space-y-4"} + [:div {:class "space-y-1"} + [:h2 {:class "text-2xl font-semibold"} "Yearly activity"] + [:p {:class "text-sm text-base-content/70"} + "These charts summarize the year before the monthly detail cards."]] + (person-activity-summary hours year) + [:div {:class "grid gap-4 xl:grid-cols-2"} + [:div + (viz/plotly-chart-block + (chart-id person year "monthly") + "Monthly project mix" + monthly-spec + {:description "Stacked hours by project across the selected year." + :fallback "No monthly activity is available for this person."})] + [:div + (viz/plotly-chart-block + (chart-id person year "period") + "Period totals" + period-spec + {:description "Quarter totals show how activity changed through the year." + :fallback "No period totals are available for this person."})] + (when heatmap-spec + [:div {:class "xl:col-span-2"} + (viz/plotly-chart-block + (chart-id person year "heatmap") + "Project heatmap" + heatmap-spec + {:description "Projects on the y-axis, months on the x-axis." + :fallback "A heatmap needs at least two active projects and two active months."})])]])) + (defn- voluntary-hours? "Return true when personnel pages should mention voluntary hours." [config] @@ -145,9 +242,10 @@ [:div {:class "space-y-6"} (person-download-timesheet config ts-file) [:br] - [:div {:class "space-y-6"} + [:div {:class "space-y-6"} [:h1 "Yearly totals"] (person-hours-summary hours) + (person-activity-section config person year hours) [:div {:class "divider"}] [:h1 "Monthly totals"] monthly-sections] @@ -263,13 +361,14 @@ {:cost (reduce + 0 (map :cost rows))})))) monthly-average (-> (tab/average-col monthly-costs :cost) util/round)] - [:div {:class "space-y-6"} + [:div {:class "space-y-6"} [:h1 "Yearly totals"] (-> {:Total_hours (-> (tab/sum-col costs :hours) util/round) :Voluntary_hours (-> (tab/sum-col voluntary-costs :hours) util/round) :Total_billed (-> (tab/sum-col billed-costs :cost) util/round) :Monthly_average monthly-average} vector tab/dataset to-table) + (person-activity-section config person year hours) (person-download-toolbar config person year (into [["Date" "Name" "Project" "Task" "Tags" "Hours" "Cost" "CPH"]] diff --git a/src/agiladmin/view_project.clj b/src/agiladmin/view_project.clj index d5c46fd..d10a1d9 100644 --- a/src/agiladmin/view_project.clj +++ b/src/agiladmin/view_project.clj @@ -21,13 +21,14 @@ (ns agiladmin.view-project (:require [clojure.java.io :as io] - [clojure.string :refer [trim upper-case]] + [clojure.string :as str :refer [trim upper-case]] [clj-time.format :as tf] [clj-time.core :as t] [agiladmin.core :refer :all] [agiladmin.tabular :as tab] [agiladmin.utils :as util] [agiladmin.graphics :refer :all] + [agiladmin.visualization :as viz] [agiladmin.webpage :as web] [agiladmin.config :as conf] [agiladmin.session :as s] @@ -38,6 +39,157 @@ (def project-details-id "project-details") +(defn- chart-id + [prefix projname suffix] + (-> (str prefix "-" projname "-" suffix) + str/lower-case + (str/replace #"[^a-z0-9_-]+" "-"))) + +(defn- project-monthly-chart-spec + [project-hours conf year] + (let [task-count (->> (:rows project-hours) + (map :task) + (remove str/blank?) + distinct + count)] + (if (> task-count 1) + (viz/project-monthly-task-chart-spec project-hours year) + (viz/project-monthly-person-chart-spec project-hours year)))) + +(defn- project-activity-section + [projname project-hours task-details conf] + (let [rows (:rows project-hours) + years (->> rows (keep #(some-> % :month viz/parse-month :year)) distinct count) + year (some-> rows first :month viz/parse-month :year) + monthly-spec (when year + (project-monthly-chart-spec project-hours conf year)) + cumulative-spec (viz/project-cumulative-chart-spec project-hours task-details) + budget-spec (when (seq (:rows task-details)) + (viz/project-task-budget-chart-spec task-details)) + annual-spec (when (> years 1) + (viz/project-annual-hours-chart-spec project-hours))] + [:section {:class "space-y-4"} + [:div {:class "space-y-1"} + [:h2 {:class "text-2xl font-semibold"} "Project activity"] + [:p {:class "text-sm text-base-content/70"} + "Hours-only charts stay above the detailed tables. Managers see effort, not costs."]] + (if (seq rows) + [:div {:class "grid gap-4 xl:grid-cols-2"} + (when cumulative-spec + [:div {:class "xl:col-span-2"} + (viz/plotly-chart-block + (chart-id "project" projname "cumulative") + "Cumulative hours" + cumulative-spec + {:description "Actual hours against planned hours derived from configured task schedules." + :fallback "No valid plan data is available for a cumulative comparison."})]) + [:div + (viz/plotly-chart-block + (chart-id "project" projname "monthly") + "Monthly composition" + monthly-spec + {:description "Stacked hours by task or by person when tasks are not useful." + :fallback "No monthly activity is available for this project."})] + (when budget-spec + [:div + (viz/plotly-chart-block + (chart-id "project" projname "budget") + "Task budget usage" + budget-spec + {:description "Actual hours versus the configured task budget." + :fallback "No task budget data is available for this project."})]) + (when annual-spec + [:div {:class "xl:col-span-2"} + (viz/plotly-chart-block + (chart-id "project" projname "annual") + "Annual hours" + annual-spec + {:description "Yearly totals shown only when the project spans more than one year." + :fallback "This project only has one year of data."})])] + [:div {:class "alert alert-info shadow-sm"} + "No recorded hours are available for this project."]) ])) + +(defn- fixed-cost-project-activity-section + [projname project-hours] + (let [rows (:rows project-hours) + years (->> rows (keep #(some-> % :month viz/parse-month :year)) distinct count) + year (some-> rows first :month viz/parse-month :year) + monthly-spec (when year + (viz/project-monthly-person-chart-spec project-hours year)) + annual-spec (when (> years 1) + (viz/project-annual-hours-chart-spec project-hours))] + [:section {:class "space-y-4"} + [:div {:class "space-y-1"} + [:h2 {:class "text-2xl font-semibold"} "Project activity"] + [:p {:class "text-sm text-base-content/70"} + "Hours-only charts sit above the fixed-cost tables."]] + (if (seq rows) + [:div {:class "grid gap-4 xl:grid-cols-2"} + [:div + (viz/plotly-chart-block + (chart-id "project" projname "monthly") + "Monthly composition" + monthly-spec + {:description "Stacked hours by person across the selected year." + :fallback "No monthly activity is available for this project."})] + (when annual-spec + [:div {:class "xl:col-span-2"} + (viz/plotly-chart-block + (chart-id "project" projname "annual") + "Annual hours" + annual-spec + {:description "Yearly totals shown only when the project spans more than one year." + :fallback "This project only has one year of data."})])] + [:div {:class "alert alert-info shadow-sm"} + "No recorded hours are available for this project."]) ])) + +(defn- project-detail-tabs + [account project-hours task-details] + [{:id "task-sum-hours" + :title "Task/Person totals" + :content [:div {:class "space-y-3"} + [:h2 "Totals grouped per person and per task"] + [:div {:class "overflow-x-auto"} + (if (s/can-view-costs? account) + (-> (map-col project-hours :tag #(if (= "VOL" %) "VOL" "")) + (aggr [:hours :cost] [:name :tag :task]) + (tab/select-cols [:name :tag :task :hours :cost]) to-table) + (-> (map-col project-hours :tag #(if (= "VOL" %) "VOL" "")) + (aggr [:hours] [:name :tag :task]) + (tab/select-cols [:name :tag :task :hours]) to-table))]]} + {:id "task-totals" + :title "Task totals" + :content [:div {:class "space-y-3"} + [:h2 "Totals per task"] + [:div {:class "overflow-x-auto"} + (-> task-details + (tab/select-cols [:task :hours :tot-hours :pm :progress :description]) to-table)]]} + {:id "person-totals" + :title "Person totals" + :content [:div {:class "space-y-3"} + [:h2 "Totals per person"] + [:div {:class "overflow-x-auto"} + (if (s/can-view-costs? account) + (-> (map-col project-hours :tag #(if (= "VOL" %) "VOL" "")) + (aggr [:hours :cost] [:name :tag]) + (tab/select-cols [:name :tag :hours :cost]) to-table) + (-> (map-col project-hours :tag #(if (= "VOL" %) "VOL" "")) + (aggr [:hours] [:name :tag]) + (tab/select-cols [:name :tag :hours]) to-table))]]} + {:id "monthly-details" + :title "Monthly details" + :content [:div {:class "space-y-3"} + [:h2 "Detail of monthly hours used per person on each task"] + [:div {:class "overflow-x-auto"} + (if (s/can-view-costs? account) + (-> project-hours + (sort :month :desc) + to-table) + (-> project-hours + (tab/select-cols [:month :name :task :hours]) + (sort :month :desc) + to-table))]]}]) + (defn- project-fragment [body] [:div {:id project-details-id @@ -180,10 +332,10 @@ request account [:div {:class "space-y-6"} + [:h1 {:class "text-4xl font-semibold"} projname] (if-not (empty? (:tasks conf)) [:div {:class "space-y-4"} [:div {:class "flex flex-wrap items-center gap-3"} - [:h1 {:class "text-4xl font-semibold"} projname] [:button {:class "btn btn-info ml-auto" :onclick "toggleMode(this)"} "Scale to Fit"]] [:div {:class "rounded-box border border-base-300 bg-base-100 p-2 shadow-sm"} @@ -206,8 +358,8 @@ var tasks = { data:" (chesh/generate-string gantt-tasks) "}; gantt.init('gantt'); gantt.parse(tasks); ")])] - [:h1 {:class "text-4xl font-semibold"} projname]) - (when (s/admin? account) + (project-activity-section projname project-hours task-details conf)) + (when (s/admin? account) (web/button "/projects/edit" "Edit project configuration" (hf/hidden-field "project" projname) "btn btn-primary btn-lg edit-project")) @@ -272,57 +424,14 @@ gantt.parse(tasks); (:rows empty-tasks)))] (-> (tab/append-rows overview-cols used-tasks unused-tasks) (tab/order-by-col :task :asc) - to-table))]] + to-table))] [:div {:class "space-y-4"} [:h1 "Details " [:small "(switch views using tabs below)"]] (web/tabs (str "project-details-" projname) - [{:id "task-sum-hours" - :title "Task/Person totals" - :content [:div {:class "space-y-3"} - [:h2 "Totals grouped per person and per task"] - [:div {:class "overflow-x-auto"} - (if (s/can-view-costs? account) - (-> (map-col project-hours :tag #(if (= "VOL" %) "VOL" "")) - (aggr [:hours :cost] [:name :tag :task]) - (tab/select-cols [:name :tag :task :hours :cost]) to-table) - (-> (map-col project-hours :tag #(if (= "VOL" %) "VOL" "")) - (aggr [:hours] [:name :tag :task]) - (tab/select-cols [:name :tag :task :hours]) to-table))]]} - {:id "task-totals" - :title "Task totals" - :content [:div {:class "space-y-3"} - [:h2 "Totals per task"] - [:div {:class "overflow-x-auto"} - (-> task-details - (tab/select-cols [:task :hours :tot-hours :pm :progress :description]) to-table)]]} - {:id "person-totals" - :title "Person totals" - :content [:div {:class "space-y-3"} - [:h2 "Totals per person"] - [:div {:class "overflow-x-auto"} - (if (s/can-view-costs? account) - (-> (map-col project-hours :tag #(if (= "VOL" %) "VOL" "")) - (aggr [:hours :cost] [:name :tag]) - (tab/select-cols [:name :tag :hours :cost]) to-table) - (-> (map-col project-hours :tag #(if (= "VOL" %) "VOL" "")) - (aggr [:hours] [:name :tag]) - (tab/select-cols [:name :tag :hours]) to-table))]]} - {:id "monthly-details" - :title "Monthly details" - :content [:div {:class "space-y-3"} - [:h2 "Detail of monthly hours used per person on each task"] - [:div {:class "overflow-x-auto"} - (if (s/can-view-costs? account) - (-> project-hours - (sort :month :desc) - to-table) - (-> project-hours - (tab/select-cols [:month :name :task :hours]) - (sort :month :desc) - to-table))]]}])]]) - (f/when-failed [e] - (web/render account (web/render-error (f/message e))))))) + (project-detail-tabs account project-hours task-details))]]]) + (f/when-failed [e] + (web/render account (web/render-error (f/message e))))))) (defn infra ([config account projname] @@ -338,6 +447,7 @@ gantt.parse(tasks); (derive-years config project-conf))] (render-project-response request account [:div + (fixed-cost-project-activity-section projname project-hours) [:h1 (str projname " fixed costs overview")] [:h2 "Yearly totals"] (if (s/can-view-costs? account) @@ -371,6 +481,7 @@ gantt.parse(tasks); (derive-years config project-conf))] (render-project-response request account [:div + (fixed-cost-project-activity-section projname project-hours) [:h1 (str projname " fixed costs overview")] [:h2 "Yearly totals"] (if (s/can-view-costs? account) diff --git a/src/agiladmin/view_timesheet.clj b/src/agiladmin/view_timesheet.clj index cf39029..14d1ed3 100644 --- a/src/agiladmin/view_timesheet.clj +++ b/src/agiladmin/view_timesheet.clj @@ -507,7 +507,7 @@ (let [path (s/param req :path)] (if (.exists (io/file path)) (let [repo (conf/q conf [:agiladmin :budgets :path]) - dst (str repo (fs/base-name path))] + dst (str repo (.getName (io/file path)))] (if (not (and (seq repo) (.isDirectory (io/file repo)))) (render-commit-message req acct (str "Timesheet submit is unavailable until the budgets directory exists: " repo)) diff --git a/src/agiladmin/visualization.clj b/src/agiladmin/visualization.clj new file mode 100644 index 0000000..60161de --- /dev/null +++ b/src/agiladmin/visualization.clj @@ -0,0 +1,496 @@ +;; Agiladmin visualization helpers + +(ns agiladmin.visualization + (:require + [clojure.set :as set] + [clojure.string :as str] + [cheshire.core :as json] + [failjure.core :as f] + [scicloj.tableplot.v1.plotly :as plotly] + [tablecloth.api :as tc] + [agiladmin.tabular :as tab])) + +(def month-pattern + #"^(\d{4})-(\d{1,2})$") + +(defn parse-month + "Parse an application month value like `2026-1` or `2026-01`." + [month] + (let [value (str/trim (str month))] + (if-let [[_ year month-number] (re-matches month-pattern value)] + (let [year (Integer/parseInt year) + month-number (Integer/parseInt month-number)] + (if (and (<= 1 month-number) (<= month-number 12)) + {:year year + :month month-number + :month-index (+ (* year 12) month-number) + :month-label (format "%04d-%02d" year month-number) + :month-date (format "%04d-%02d-01" year month-number) + :quarter (str "Q" (inc (quot (dec month-number) 3)))} + (f/fail (str "Invalid month value: " value)))) + (f/fail (str "Invalid month value: " value))))) + +(defn month-sort-key + "Return a sortable key for a normalized month string." + [month] + (:month-index (parse-month month))) + +(defn month->label + "Normalize a month string to `YYYY-MM`." + [month] + (:month-label (parse-month month))) + +(defn month->date + "Normalize a month string to an ISO first-of-month date." + [month] + (:month-date (parse-month month))) + +(defn month->quarter + "Return the quarter label for a month string." + [month] + (:quarter (parse-month month))) + +(defn to-tablecloth + "Convert an Agiladmin tabular dataset into a Tablecloth dataset." + [data] + (tc/dataset (tab/rows data))) + +(defn- escape-json-text + [s] + (str/escape s {\< "\\u003c" + \> "\\u003e" + \& "\\u0026" + \u2028 "\\u2028" + \u2029 "\\u2029"})) + +(defn safe-json + "Serialize a value to JSON and escape characters that can break a script tag." + [value] + (-> value + json/generate-string + escape-json-text)) + +(defn- chart-layout + [title] + {:title {:text title} + :paper_bgcolor "rgba(0,0,0,0)" + :plot_bgcolor "rgba(0,0,0,0)" + :font {:family "system-ui, sans-serif" + :color "#2e3440"} + :margin {:l 48 :r 24 :t 48 :b 56} + :legend {:orientation "h" + :x 0 + :y -0.2} + :xaxis {:gridcolor "#d8dee9" + :zeroline false + :automargin true} + :yaxis {:gridcolor "#d8dee9" + :zeroline false + :automargin true}}) + +(defn realize-plot + "Realize a raw Plotly spec through Tableplot." + [spec] + (plotly/plot spec)) + +(defn plotly-chart + "Render a realized Plotly specification into a Hiccup chart block." + [id title spec {:keys [description fallback]}] + [:section {:class "space-y-3"} + [:div {:class "space-y-1"} + [:h2 {:class "text-xl font-semibold"} title] + (when description + [:p {:class "text-sm text-base-content/70"} description])] + [:div {:class "rounded-box border border-base-300 bg-base-100 p-3 shadow-sm"} + [:div {:id id + :class "min-h-80 w-full" + :data-plotly-chart "true" + :data-plotly-spec (safe-json spec)} + [:p {:class "text-sm text-base-content/60"} fallback]]]]) + +(defn- sum-hours + [rows] + (reduce + 0 (map #(double (or (:hours %) 0)) rows))) + +(defn- complete-year-months + [year rows] + (let [year (Integer/parseInt (str year)) + rows-by-month (group-by #(month->label (:month %)) rows)] + (mapv (fn [month] + (let [month-label (format "%04d-%02d" year month) + info (parse-month month-label) + month-rows (get rows-by-month month-label [])] + {:month month-label + :month-index (:month-index info) + :month-label month-label + :month-date (:month-date info) + :quarter (:quarter info) + :hours (sum-hours month-rows)})) + (range 1 13)))) + +(defn- group-sum + [rows key-fn] + (->> rows + (group-by key-fn) + (mapv (fn [[k group]] + [k (sum-hours group)])))) + +(defn person-monthly-project-data + "Return monthly hours per project for a year." + [hours year] + (let [year (Integer/parseInt (str year)) + rows (->> (tab/rows hours) + (filter #(= (some-> % :month parse-month :year) year)) + (sort-by #(month-sort-key (:month %)))) + months (complete-year-months year rows) + projects (->> rows (map :project) distinct sort) + by-month-project (group-by (juxt #(month->label (:month %)) :project) rows)] + (tab/dataset + (for [month months + project projects] + (let [month-project-rows (get by-month-project [(:month month) project] [])] + (merge month + {:project project + :hours (sum-hours month-project-rows)})))))) + +(defn person-period-data + "Return quarter totals for a year's personnel activity." + [hours year] + (let [year (Integer/parseInt (str year)) + rows (->> (tab/rows hours) + (filter #(= (some-> % :month parse-month :year) year)))] + (tab/dataset + (for [quarter ["Q1" "Q2" "Q3" "Q4"]] + {:year year + :period quarter + :hours (sum-hours (filter #(= (month->quarter (:month %)) quarter) rows))})))) + +(defn project-monthly-task-data + "Return monthly hours per task for a project." + [hours year] + (let [year (Integer/parseInt (str year)) + rows (->> (tab/rows hours) + (filter #(= (some-> % :month parse-month :year) year)) + (sort-by #(month-sort-key (:month %)))) + tasks (->> rows (map :task) distinct sort) + months (complete-year-months year rows) + by-month-task (group-by (juxt #(month->label (:month %)) :task) rows)] + (tab/dataset + (for [month months + task tasks] + (merge month + {:task task + :hours (sum-hours (get by-month-task [(:month month) task] []))}))))) + +(defn project-monthly-person-data + "Return monthly hours per person for a project." + [hours year] + (let [year (Integer/parseInt (str year)) + rows (->> (tab/rows hours) + (filter #(= (some-> % :month parse-month :year) year)) + (sort-by #(month-sort-key (:month %)))) + people (->> rows (map :name) distinct sort) + months (complete-year-months year rows) + by-month-person (group-by (juxt #(month->label (:month %)) :name) rows)] + (tab/dataset + (for [month months + person people] + (merge month + {:name person + :hours (sum-hours (get by-month-person [(:month month) person] []))}))))) + +(defn project-annual-hours-data + "Return annual totals for multi-year project data." + [hours] + (let [rows (tab/rows hours)] + (tab/dataset + (for [[year rows] (->> rows + (group-by #(some-> % :month parse-month :year)) + (sort-by key))] + {:year year + :hours (sum-hours rows)})))) + +(defn task-budget-data + "Build actual-versus-budget rows from project task configuration." + [task-details] + (tab/dataset + (for [row (tab/rows task-details)] + (let [hours (double (or (:hours row) 0)) + planned (double (* 150 (or (:pm row) 0)))] + {:task (:task row) + :description (:description row) + :actual hours + :planned planned + :remaining (- planned hours) + :utilization (if (pos? planned) (/ hours planned) 0)})))) + +(defn cumulative-hours-data + "Build cumulative actual and planned series for a project." + [hours planned-hours] + (let [hours-rows (tab/rows hours) + planned-rows (tab/rows planned-hours) + year (some-> hours-rows first :month parse-month :year) + actual-months (complete-year-months year hours-rows) + actual-by-month (group-by :month-label hours-rows) + valid-tasks (filter #(and (:start %) + (pos? (double (or (:duration %) 0))) + (pos? (double (or (:pm %) 0)))) + planned-rows) + date-format (java.time.format.DateTimeFormatter/ofPattern "dd-MM-yyyy") + planned-by-month + (reduce + (fn [acc row] + (let [start (java.time.LocalDate/parse (:start row) date-format) + duration (int (or (:duration row) 0)) + budget (* 150 (double (or (:pm row) 0))) + monthly-share (if (pos? duration) (/ budget duration) 0)] + (reduce + (fn [acc month-offset] + (let [month (.plusMonths start month-offset) + month-label (format "%04d-%02d" (.getYear month) (.getMonthValue month))] + (update acc month-label (fnil + 0) monthly-share))) + acc + (range duration)))) + {} + valid-tasks)] + (tab/dataset + (map (fn [actual] + (let [month-label (:month-label actual)] + {:month month-label + :month-date (:month-date actual) + :actual (sum-hours (get actual-by-month month-label [])) + :planned (double (or (get planned-by-month month-label) 0))})) + actual-months)))) + +(defn- plot-bar + [x y & {:keys [name color orientation text customdata hovertemplate]}] + (cond-> {:type "bar" + :x x + :y y} + name (assoc :name name) + color (assoc :marker {:color color}) + orientation (assoc :orientation orientation) + text (assoc :text text :textposition "auto") + customdata (assoc :customdata customdata) + hovertemplate (assoc :hovertemplate hovertemplate))) + +(defn- plot-line + [x y & {:keys [name color dash]}] + (cond-> {:type "scatter" + :mode "lines+markers" + :x x + :y y} + name (assoc :name name) + color (assoc :line (cond-> {:color color} dash (assoc :dash dash))))) + +(defn- plot-heatmap + [x y z] + {:type "heatmap" + :x x + :y y + :z z + :colorscale "Blues"}) + +(defn person-monthly-project-chart-spec + [hours year] + (let [data (person-monthly-project-data hours year) + rows (tab/rows data) + months (mapv :month-label (complete-year-months year rows)) + projects (->> rows (map :project) distinct sort) + traces (mapv (fn [project] + (let [project-rows (filter #(= (:project %) project) rows)] + (plot-bar + months + (mapv :hours project-rows) + :name project + :hovertemplate "%{x}
%{y:.1f} hours%{fullData.name}"))) + projects)] + (-> {:data traces + :layout (assoc (chart-layout (str "Monthly activity in " year)) + :barmode "stack" + :hovermode "x unified")} + realize-plot))) + +(defn person-period-chart-spec + [hours year] + (let [data (person-period-data hours year) + rows (tab/rows data)] + (-> {:data [(plot-bar (mapv :period rows) + (mapv :hours rows) + :name "Hours" + :hovertemplate "%{x}
%{y:.1f} hours")] + :layout (assoc (chart-layout (str "Quarterly activity in " year)) + :barmode "group")} + realize-plot))) + +(defn person-activity-heatmap-spec + [hours year] + (let [year (Integer/parseInt (str year)) + rows (->> (tab/rows hours) + (filter #(= (some-> % :month parse-month :year) year)) + (sort-by #(month-sort-key (:month %)))) + top-projects (->> rows + (group-by :project) + (map (fn [[project group]] + [project (sum-hours group)])) + (sort-by second >) + (take 8)) + visible-projects (vec (map first top-projects)) + other-projects (set/difference (set (map :project rows)) + (set visible-projects)) + months (mapv #(format "%04d-%02d" year %) (range 1 13)) + project-order (cond-> visible-projects + (seq other-projects) (conj "Other")) + matrix (mapv (fn [project] + (mapv (fn [month] + (sum-hours + (filter + #(and (= (month->label (:month %)) month) + (if (= project "Other") + (contains? other-projects (:project %)) + (= (:project %) project))) + rows))) + months)) + project-order)] + (-> {:data [(plot-heatmap months project-order matrix)] + :layout (chart-layout (str "Project mix in " year))} + realize-plot))) + +(defn project-monthly-task-chart-spec + [hours year] + (let [data (project-monthly-task-data hours year) + rows (tab/rows data) + months (mapv :month-label (complete-year-months year rows)) + tasks (->> rows (map :task) distinct sort) + traces (mapv (fn [task] + (let [task-rows (filter #(= (:task %) task) rows)] + (plot-bar months + (mapv :hours task-rows) + :name task + :hovertemplate "%{x}
%{y:.1f} hours%{fullData.name}"))) + tasks)] + (-> {:data traces + :layout (assoc (chart-layout (str "Monthly task activity in " year)) + :barmode "stack" + :hovermode "x unified")} + realize-plot))) + +(defn project-monthly-person-chart-spec + [hours year] + (let [data (project-monthly-person-data hours year) + rows (tab/rows data) + months (mapv :month-label (complete-year-months year rows)) + people (->> rows (map :name) distinct sort) + traces (mapv (fn [person] + (let [person-rows (filter #(= (:name %) person) rows)] + (plot-bar months + (mapv :hours person-rows) + :name person + :hovertemplate "%{x}
%{y:.1f} hours%{fullData.name}"))) + people)] + (-> {:data traces + :layout (assoc (chart-layout (str "Monthly person activity in " year)) + :barmode "stack" + :hovermode "x unified")} + realize-plot))) + +(defn project-annual-hours-chart-spec + [hours] + (let [data (project-annual-hours-data hours) + rows (tab/rows data)] + (when (> (count rows) 1) + (-> {:data [(plot-bar (mapv :year rows) + (mapv :hours rows) + :name "Hours" + :hovertemplate "%{x}
%{y:.1f} hours")] + :layout (chart-layout "Annual hours")} + realize-plot)))) + +(defn chart-eligibility + "Describe whether a chart has enough source data to be useful." + [hours chart] + (let [rows (tab/rows hours) + active-months (count (distinct (map #(month->label (:month %)) + (filter #(pos? (double (or (:hours %) 0))) rows)))) + active-projects (count (distinct (map :project + (filter #(pos? (double (or (:hours %) 0))) rows))))] + (cond + (empty? rows) + {:status :empty :reason "No recorded hours for this period"} + + (and (= chart :heatmap) + (or (< active-months 2) (< active-projects 2))) + {:status :omitted + :reason "A heatmap needs at least two active projects and two active months"} + + :else + {:status :ready}))) + +(defn project-task-budget-chart-spec + [task-details] + (let [data (task-budget-data task-details) + rows (->> (tab/rows data) + (sort-by :utilization >)) + tasks (mapv :task rows)] + (-> {:data [(plot-bar (mapv :actual rows) + tasks + :name "Actual" + :orientation "h" + :hovertemplate "%{y}
%{x:.1f} hoursActual") + (plot-bar (mapv :planned rows) + tasks + :name "Budget" + :orientation "h" + :hovertemplate "%{y}
%{x:.1f} hoursBudget")] + :layout (assoc (chart-layout "Task budget usage") + :barmode "group")} + realize-plot))) + +(defn project-cumulative-chart-spec + [hours task-details] + (let [hours-rows (tab/rows hours) + task-rows (tab/rows task-details) + year (some-> hours-rows first :month parse-month :year) + valid-tasks (filter #(and (:start %) + (pos? (double (or (:duration %) 0))) + (pos? (double (or (:pm %) 0)))) + task-rows)] + (when (and year (seq valid-tasks)) + (let [months (complete-year-months year hours-rows) + actual-by-month (group-by #(month->label (:month %)) hours-rows) + date-format (java.time.format.DateTimeFormatter/ofPattern "dd-MM-yyyy") + planned-by-month + (reduce + (fn [acc row] + (let [start (java.time.LocalDate/parse (:start row) date-format) + duration (int (or (:duration row) 0)) + budget (* 150 (double (or (:pm row) 0))) + monthly-share (if (pos? duration) (/ budget duration) 0)] + (reduce + (fn [acc month-offset] + (let [month (.plusMonths start month-offset) + month-label (format "%04d-%02d" (.getYear month) (.getMonthValue month))] + (update acc month-label (fnil + 0) monthly-share))) + acc + (range duration)))) + {} + valid-tasks) + actual-series (rest (reductions + 0 (map #(sum-hours (get actual-by-month (:month-label %) [])) months))) + planned-series (rest (reductions + 0 (map #(double (or (get planned-by-month (:month-label %)) 0)) months))) + month-labels (mapv :month-label months)] + (-> {:data [(plot-line month-labels actual-series + :name "Actual" + :color "#5e81ac") + (plot-line month-labels planned-series + :name "Planned" + :color "#bf616a" + :dash "dash")] + :layout (assoc (chart-layout "Cumulative hours") + :hovermode "x unified")} + realize-plot))))) + +(defn plotly-chart-block + "Render a chart spec as a complete Hiccup block." + [id title spec {:keys [description fallback]}] + (plotly-chart id title spec {:description description + :fallback fallback})) diff --git a/src/agiladmin/webpage.clj b/src/agiladmin/webpage.clj index 9ee1cdd..5ef4f90 100644 --- a/src/agiladmin/webpage.clj +++ b/src/agiladmin/webpage.clj @@ -425,6 +425,7 @@ (page/include-js (asset-path config "/static/js/dhtmlxgantt_marker.js")) (page/include-js (asset-path config "/static/js/sorttable.js")) (page/include-js (asset-path config "/static/js/htmx.min.js")) + (page/include-js (asset-path config "/static/js/plotly.min.js")) (page/include-js (str (asset-path config "/static/js/app.js") "?v=" version/current)) diff --git a/test/agiladmin/config_test.clj b/test/agiladmin/config_test.clj index 5a2d117..8bcb98e 100644 --- a/test/agiladmin/config_test.clj +++ b/test/agiladmin/config_test.clj @@ -2,6 +2,7 @@ (:use midje.sweet) (:require [agiladmin.config :as conf] [agiladmin.core :as core] + [clojure.string :as str] [failjure.core :as f] [schema.core :as s])) @@ -133,14 +134,16 @@ :filename "agiladmin.yaml"} proj (conf/load-project badfields-config "BADFIELDS")] (f/failed? proj) => true - (f/message proj) => (contains "Invalid project configuration at test/assets/BADFIELDS.yaml") + (-> (f/message proj) (str/replace "\\" "/")) => (contains "Invalid project configuration at test/assets/BADFIELDS.yaml") (f/message proj) => (contains ":duration"))) (fact "Application config loader reports field-level schema errors with the file path" - (let [conf (conf/load-config "invalid-config" conf/default-settings)] + (let [conf (conf/load-config "test-resources/invalid-config.yaml" + conf/default-settings)] (f/failed? conf) => true (f/message conf) => (contains "Invalid configuration at") - (f/message conf) => (contains "test-resources/invalid-config.yaml") + (-> (f/message conf) (str/replace "\\" "/")) + => (contains "test-resources/invalid-config.yaml") (f/message conf) => (contains ":path"))) (fact "Application config loader accepts an explicit yaml file path" @@ -227,10 +230,10 @@ (fact "Project loader reports invalid YAML in the project file" (let [broken-config {:agiladmin {:budgets {:path "test/assets/"}} - :filename "agiladmin.yaml"} + :filename "agiladmin.yaml"} proj (conf/load-project broken-config "INVALIDYAML")] (f/failed? proj) => true - (f/message proj) => (contains "Invalid YAML at test/assets/INVALIDYAML.yaml"))) + (-> (f/message proj) (str/replace "\\" "/")) => (contains "Invalid YAML at test/assets/INVALIDYAML.yaml"))) (fact "Bulk project loads reuse one project file scan" (let [calls (atom 0) @@ -318,11 +321,13 @@ (core/load-all-projects counting-config) @calls => 2))) -(fact "Application config loader currently rejects runtime-only keys missing from the schema" - (let [conf (conf/load-config "extra-keys-config" conf/default-settings)] +(fact "Application config loader rejects runtime-only keys missing from the schema" + (let [conf (conf/load-config "test-resources/extra-keys-config.yaml" + conf/default-settings)] (f/failed? conf) => true (f/message conf) => (contains "Invalid configuration at") - (f/message conf) => (contains "test-resources/extra-keys-config.yaml") + (-> (f/message conf) (str/replace "\\" "/")) + => (contains "test-resources/extra-keys-config.yaml") (f/message conf) => (contains "disallowed-key"))) (fact "Application config loader rejects non-string webserver base keys" diff --git a/test/agiladmin/test_runner.clj b/test/agiladmin/test_runner.clj index 476fe92..e6749ed 100644 --- a/test/agiladmin/test_runner.clj +++ b/test/agiladmin/test_runner.clj @@ -1,6 +1,29 @@ (ns agiladmin.test-runner (:require [midje.repl :as midje])) +(doseq [ns-sym '[agiladmin.auth-test + agiladmin.config-test + agiladmin.core-test + agiladmin.dev-auth-test + agiladmin.graphics-test + agiladmin.handlers-test + agiladmin.pocketbase-integration-test + agiladmin.pocketbase-test + agiladmin.ring-test + agiladmin.session-test + agiladmin.tabular-test + agiladmin.timesheet-test + agiladmin.utils-test + agiladmin.version-test + agiladmin.view-auth-test + agiladmin.view-person-test + agiladmin.view-project-test + agiladmin.view-reload-test + agiladmin.view-timesheet-test + agiladmin.webpage-test + agiladmin.visualization-test]] + (require ns-sym)) + (defn -main [& _] (midje/load-facts :all) (let [ok? (every? true? (doall (map midje/check-one-fact diff --git a/test/agiladmin/version_test.clj b/test/agiladmin/version_test.clj index df4fc7e..ece1f04 100644 --- a/test/agiladmin/version_test.clj +++ b/test/agiladmin/version_test.clj @@ -3,7 +3,9 @@ [midje.sweet :refer :all])) (fact "Version reads the baked classpath resource when present" - (let [tmp (doto (java.io.File/createTempFile "agiladmin-version" ".edn") + (let [tmp-dir (doto (java.io.File. "target/test-tmp") + (.mkdirs)) + tmp (doto (java.io.File/createTempFile "agiladmin-version" ".edn" tmp-dir) (spit "{:version \"9.9.9\"}"))] (with-redefs [clojure.java.io/resource (fn [path] diff --git a/test/agiladmin/view_project_test.clj b/test/agiladmin/view_project_test.clj index 1b96cee..f7b83ae 100644 --- a/test/agiladmin/view_project_test.clj +++ b/test/agiladmin/view_project_test.clj @@ -1,6 +1,7 @@ (ns agiladmin.view-project-test (:require [agiladmin.view-project :as view-project] [failjure.core] + [agiladmin.tabular :as tab] [midje.sweet :refer :all])) (fact "Project start dispatches infra projects to the infra view" @@ -278,6 +279,24 @@ (:body response) =not=> (contains ":cost") (:body response) =not=> (contains ">cost<")))) +(fact "Project monthly chart falls back to person grouping when only one distinct task exists" + (with-redefs [agiladmin.visualization/project-monthly-task-chart-spec + (fn [& _] :task-chart) + agiladmin.visualization/project-monthly-person-chart-spec + (fn [& _] :person-chart)] + (#'agiladmin.view-project/project-monthly-chart-spec + {:rows [{:task "TASK-1"} {:task "TASK-1"} {:task ""}]} + {} + 2026) => :person-chart)) + +(fact "Project activity section keeps the empty-state message when there are no recorded hours" + (let [html (#'agiladmin.view-project/project-activity-section + "CORE" + (tab/dataset []) + (tab/dataset []) + {})] + (str html) => (contains "No recorded hours are available for this project."))) + (fact "Admin project monthly details retain cost output" (with-redefs [agiladmin.config/load-project (fn [_ _] diff --git a/test/agiladmin/view_timesheet_test.clj b/test/agiladmin/view_timesheet_test.clj index 35c7464..76704e9 100644 --- a/test/agiladmin/view_timesheet_test.clj +++ b/test/agiladmin/view_timesheet_test.clj @@ -269,8 +269,12 @@ (:body response) => (contains "Uploaded: upload.xlsx")))) (fact "Timesheet upload accepts a real xlsx workbook fixture" - (let [temp-root (.toFile (java.nio.file.Files/createTempDirectory "agiladmin-upload-test" - (make-array java.nio.file.attribute.FileAttribute 0))) + (let [temp-parent (doto (io/file "target/test-tmp") + (.mkdirs)) + temp-root (.toFile (java.nio.file.Files/createTempDirectory + (.toPath temp-parent) + "agiladmin-upload-test" + (make-array java.nio.file.attribute.FileAttribute 0))) upload-path (str temp-root "/fixture-upload.xlsx") budgets-path (str temp-root "/budgets/")] (.mkdirs (io/file budgets-path)) diff --git a/test/agiladmin/visualization_test.clj b/test/agiladmin/visualization_test.clj new file mode 100644 index 0000000..b129542 --- /dev/null +++ b/test/agiladmin/visualization_test.clj @@ -0,0 +1,109 @@ +(ns agiladmin.visualization-test + (:require [agiladmin.tabular :as tab] + [agiladmin.visualization :as viz] + [hiccup.core :as hiccup] + [midje.sweet :refer :all] + [failjure.core :as f])) + +(def sample-hours + (tab/dataset + [:month :project :task :tag :hours] + [{:month "2026-1" :project "CORE" :task "T1" :tag "" :hours 10} + {:month "2026-2" :project "CORE" :task "T1" :tag "" :hours 5} + {:month "2026-2" :project "ALPHA" :task "T2" :tag "" :hours 3} + {:month "2025-12" :project "CORE" :task "T1" :tag "" :hours 2}])) + +(fact "Month helpers normalize labels and quarters" + (viz/parse-month "2026-1") => (contains {:year 2026 + :month 1 + :month-label "2026-01" + :quarter "Q1"}) + (viz/month->label "2026-9") => "2026-09" + (viz/month->quarter "2026-10") => "Q4") + +(fact "Invalid month strings fail explicitly" + (f/failed? (viz/parse-month "not-a-month")) => truthy) + +(fact "Safe JSON escapes script-breaking content" + (let [json (viz/safe-json {:text " \"quoted\""})] + json => (contains "\\u003c/script\\u003e") + json => (contains "\\\"quoted\\\""))) + +(fact "Plotly chart markup exposes the serialized specification in a data attribute" + (let [html (hiccup/html + (viz/plotly-chart + "chart-1" + "Monthly hours" + {:data [] :layout {:title {:text "Monthly hours"}}} + {:description "Hours by month" + :fallback "No data available."}))] + html => (contains "data-plotly-chart=\"true\"") + html => (contains "data-plotly-spec=") + html => (contains "Monthly hours") + html => (contains "No data available."))) + +(fact "Monthly project data keeps a chronological yearly grid" + (let [data (viz/person-monthly-project-data sample-hours 2026) + rows (:rows data)] + (count rows) => 24 + (tab/sum-col data :hours) => 18.0 + (map :month-label (take 4 rows)) => ["2026-01" "2026-01" "2026-02" "2026-02"])) + +(fact "Quarter totals conserve yearly hours" + (let [data (viz/person-period-data sample-hours 2026)] + (map :period (:rows data)) => ["Q1" "Q2" "Q3" "Q4"] + (tab/sum-col data :hours) => 18.0)) + +(fact "Heatmap eligibility requires two active projects and months" + (viz/chart-eligibility sample-hours :heatmap) => (contains {:status :ready}) + (viz/chart-eligibility + (tab/dataset [{:month "2026-1" :project "CORE" :hours 1}]) + :heatmap) => (contains {:status :omitted})) + +(fact "Heatmap reduces more than eight projects before serialization" + (let [hours (tab/dataset + (for [project (range 10) + month ["2026-1" "2026-2"]] + {:month month + :project (str "P" project) + :hours (inc project)})) + spec (viz/person-activity-heatmap-spec hours 2026) + trace (first (:data spec))] + (count (:y trace)) => 9 + (last (:y trace)) => "Other" + (count (:z trace)) => 9)) + +(fact "Task budget rows preserve actual and planned values" + (let [data (viz/task-budget-data (tab/dataset + [:task :description :hours :pm] + [{:task "T1" :description "Task one" :hours 30 :pm 1} + {:task "T2" :description "Task two" :hours 0 :pm 0.5}])) + rows (:rows data)] + (map :planned rows) => [150.0 75.0] + (map :utilization rows) => [0.2 0.0])) + +(fact "Task budget chart uses numeric x values for horizontal bars" + (let [spec (viz/project-task-budget-chart-spec + (tab/dataset + [{:task "T1" :description "Task one" :hours 30 :pm 1} + {:task "T2" :description "Task two" :hours 15 :pm 0.5}])) + actual-trace (first (:data spec))] + (:orientation actual-trace) => "h" + (:x actual-trace) => [30.0 15.0] + (:y actual-trace) => ["T1" "T2"] + (:hovertemplate actual-trace) => "%{y}
%{x:.1f} hoursActual")) + +(fact "Project cumulative charts expose actual and planned traces" + (let [hours (tab/dataset + [:month :name :project :task :tag :hours] + [{:month "2026-1" :name "Ada" :project "CORE" :task "T1" :tag "" :hours 10} + {:month "2026-2" :name "Ada" :project "CORE" :task "T1" :tag "" :hours 5}]) + tasks (tab/dataset + [:task :description :start :duration :pm] + [{:task "T1" :description "Task one" :start "01-01-2026" :duration 2 :pm 1}]) + spec (viz/project-cumulative-chart-spec hours tasks)] + (count (:data spec)) => 2 + (map :name (:data spec)) => ["Actual" "Planned"] + (count (:x (first (:data spec)))) => 12 + (count (:y (first (:data spec)))) => 12 + (get-in spec [:layout :title :text]) => "Cumulative hours")) diff --git a/test/e2e/personnel-visibility.spec.js b/test/e2e/personnel-visibility.spec.js index 966e51a..3756d83 100644 --- a/test/e2e/personnel-visibility.spec.js +++ b/test/e2e/personnel-visibility.spec.js @@ -33,6 +33,10 @@ test("admin can upload from an individual person page", async ({ page }) => { }); test("manager sees own person page instead of the personnel list", async ({ page }) => { + const consoleErrors = []; + page.on("console", (message) => { + if (message.type() === "error") consoleErrors.push(message.text()); + }); await loginAs(page, "manager"); await page.goto("/persons/list"); @@ -40,6 +44,18 @@ test("manager sees own person page instead of the personnel list", async ({ page await expect(page.locator("#timesheet-workspace")).toBeVisible(); await expect(page.getByRole("heading", { name: "Persons", exact: true })).toHaveCount(0); await expect(page.getByRole("button", { name: "Guest", exact: true })).toHaveCount(0); + await expect(page.locator('[data-plotly-chart="true"]').first()).toHaveAttribute( + "data-plotly-initialized", + "true", + ); + await expect(page.locator('[data-plotly-chart="true"] svg').first()).toHaveCount(1); + await expect(page.getByText("Monthly project mix")).toBeVisible(); + await expect(page.getByText("Average per active month")).toBeVisible(); + + await page.setViewportSize({ width: 390, height: 844 }); + await expect(page.locator('[data-plotly-chart="true"]').first()).toBeVisible(); + await expect(page.getByRole("button", { name: "Download current timesheet" })).toBeVisible(); + expect(consoleErrors).toEqual([]); }); test("manager can upload from their person page", async ({ page }) => { diff --git a/test/e2e/project-access.spec.js b/test/e2e/project-access.spec.js index 13af9f9..d9d7050 100644 --- a/test/e2e/project-access.spec.js +++ b/test/e2e/project-access.spec.js @@ -1,8 +1,7 @@ import { test, expect } from "@playwright/test"; import { expectLoginForm, loginAs } from "./helpers/agiladmin.js"; -async function openFirstProjectFromList(page) { - const candidates = ["DUE", "TRE", "UNO"]; +async function openFirstProjectFromList(page, candidates = ["DUE", "TRE", "UNO"]) { let clicked = false; for (const project of candidates) { @@ -25,9 +24,20 @@ test("admin can access project list and open a project", async ({ page }) => { }); test("manager can access project list and open a project", async ({ page }) => { + const consoleErrors = []; + page.on("console", (message) => { + if (message.type() === "error") consoleErrors.push(message.text()); + }); await loginAs(page, "manager"); await page.goto("/projects/list"); - await openFirstProjectFromList(page); + await openFirstProjectFromList(page, ["UNO"]); + + expect(await page.evaluate(() => typeof window.Plotly)).toBe("object"); + await expect(page.getByText(/cost/i)).toHaveCount(0); + + await page.setViewportSize({ width: 390, height: 844 }); + await expect(page.locator("#project-details .tabs")).toBeVisible(); + expect(consoleErrors).toEqual([]); }); test("guest is denied project list", async ({ page }) => {